/* ============================================================
   Jay Guwalani - Portfolio (2026 redesign)
   Single design system for all pages.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Light editorial theme. Dark surfaces are reserved for the constellation
     "island" so the 3D graph still reads as a dramatic feature. */
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef1fa;
  --surface: rgba(13, 17, 48, 0.04);
  --surface-hover: rgba(13, 17, 48, 0.08);
  --border: rgba(13, 17, 48, 0.10);
  --border-strong: rgba(13, 17, 48, 0.18);

  --text: #0d1130;
  --text-muted: #4a5072;
  --text-dim: #6c7396;

  --accent: #5b3df5;
  --accent-2: #0a9fbf;
  --accent-3: #e0457b;

  --gradient-primary: linear-gradient(135deg, #5b3df5 0%, #0a9fbf 100%);
  --gradient-warm: linear-gradient(135deg, #e0457b 0%, #f59e6b 100%);
  --gradient-text: linear-gradient(135deg, #0d1130 0%, #5b3df5 50%, #0a9fbf 100%);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 10px rgba(13, 17, 48, 0.06);
  --shadow: 0 12px 32px rgba(13, 17, 48, 0.10);
  --shadow-lg: 0 32px 80px rgba(13, 17, 48, 0.16);
  --glow: 0 0 80px rgba(91, 61, 245, 0.18);

  --maxw: 1200px;
  --maxw-narrow: 880px;

  --t: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark variant. Activated by setting data-theme="dark" on <html>. The
   constellation / graph stages keep their own dark gradients regardless,
   so the site only really has one component palette to swap. */
html[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-elev: #11121a;
  --bg-elev-2: #161824;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #f4f4f6;
  --text-muted: #a1a1ab;
  --text-dim: #6b6b78;

  --accent: #7c5cff;
  --accent-2: #21d4fd;
  --accent-3: #ff5c8a;

  --gradient-primary: linear-gradient(135deg, #7c5cff 0%, #21d4fd 100%);
  --gradient-warm: linear-gradient(135deg, #ff5c8a 0%, #ffb86c 100%);
  --gradient-text: linear-gradient(135deg, #f4f4f6 0%, #a78bfa 50%, #21d4fd 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --glow: 0 0 80px rgba(124, 92, 255, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(91, 61, 245, 0.08), transparent 50%),
    radial-gradient(circle at 88% 4%, rgba(10, 159, 191, 0.06), transparent 45%),
    linear-gradient(180deg, #f6f7fb 0%, #eef1fa 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 92, 255, 0.15), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(33, 212, 253, 0.12), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 92, 138, 0.08), transparent 50%),
    var(--bg);
  background-attachment: fixed;
}
html[data-theme="dark"] .nav { background: rgba(10, 10, 15, 0.72); }
html[data-theme="dark"] .footer { background: rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .tech-tag { background: var(--surface); }
html[data-theme="dark"] .btn-secondary { box-shadow: none; }
html[data-theme="dark"] ::selection { background: rgba(124, 92, 255, 0.4); color: var(--text); }

img { max-width: 100%; display: block; }

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: var(--text); }

::selection {
  background: rgba(91, 61, 245, 0.20);
  color: var(--text);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  width: 100%;
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 24px;
}
.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand:hover { color: var(--text); }
.nav-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: var(--glow);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--t);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-socials {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--t);
}
.nav-socials a:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.nav-socials svg { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-theme {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t);
  flex-shrink: 0;
  padding: 0;
}
.nav-theme:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.nav-theme svg { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .nav-links, .nav-socials { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links,
  .nav.open .nav-socials {
    display: flex;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
  }
  .nav.open .nav-inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(124, 92, 255, 0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(33, 212, 253, 0.15), transparent 40%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px #4ade80;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--gradient-text);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 92, 255, 0.5);
}
.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  color: var(--text);
  background: var(--bg-elev-2);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.hero-stat {
  border-left: 1px solid var(--border);
  padding-left: 18px;
}
.hero-stat:first-child {
  border-left: none;
  padding-left: 0;
}
.hero-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Headshot */
.hero-portrait {
  position: relative;
  display: grid;
  place-items: center;
}
.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
}
.portrait-frame::before,
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: var(--gradient-primary);
  filter: blur(40px);
  opacity: 0.45;
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}
.portrait-frame::after {
  inset: 10px;
  background: var(--gradient-warm);
  filter: blur(50px);
  opacity: 0.25;
  animation-delay: -4s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8px, -10px) scale(1.05); }
}
.portrait-img-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-lg), inset 0 0 0 6px rgba(255, 255, 255, 0.04);
}
.portrait-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-badge {
  position: absolute;
  z-index: 2;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 500;
}
.portrait-badge svg { width: 18px; height: 18px; color: var(--accent-2); }
.portrait-badge--top { top: 8%; left: -8%; }
.portrait-badge--bottom { bottom: 12%; right: -8%; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .eyebrow, .hero-actions { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-stat:first-child { padding-left: 0; }
  .portrait-frame { max-width: 280px; margin: 0 auto; }
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
  .hero-stat { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
  .hero-stat:first-child { border-top: none; padding-top: 0; }
}

/* ---------- Page header (sub-pages) ---------- */
.page-header {
  padding: 80px 0 40px;
  text-align: center;
  position: relative;
}
.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.page-header h1 .grad {
  background: var(--gradient-text);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Section ---------- */
.section { padding: 60px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-kicker::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent-2);
}
.section-sub { color: var(--text-muted); max-width: 540px; }

/* ---------- Project cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 60%, rgba(124, 92, 255, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.project-card:hover::after { opacity: 1; }

.project-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elev-2);
  position: relative;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.05); }

.project-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.project-title a { color: var(--text); }
.project-title a:hover { color: var(--accent-2); }

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.metric-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-2);
  background: rgba(33, 212, 253, 0.08);
  border: 1px solid rgba(33, 212, 253, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-2);
}
.project-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t);
}
.project-link:hover svg { transform: translate(2px, -2px); }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 56px;
  align-items: start;
}
.about-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 100px;
}
.about-card-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.about-card-img img { width: 100%; height: 100%; object-fit: cover; }
.about-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.about-card .role {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.about-card-meta {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.88rem;
}
.about-card-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}
.about-card-meta svg {
  width: 16px;
  height: 16px;
  color: var(--accent-2);
  flex-shrink: 0;
}
.about-card-meta a { color: var(--text-muted); }
.about-card-meta a:hover { color: var(--text); }

.about-content { display: grid; gap: 36px; }
.about-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: border-color var(--t);
}
.about-block:hover { border-color: var(--border-strong); }
.about-block-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.about-block-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.about-block-icon svg { width: 22px; height: 22px; }
.about-block h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.about-block p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}
.about-block p:last-child { margin-bottom: 0; }
.about-block strong { color: var(--text); font-weight: 600; }
.about-block .accent { color: var(--accent-2); font-weight: 500; }
.about-block em { font-style: italic; color: var(--text); }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-card { position: static; }
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.skill-cat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.skill-cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.skill-cat-head svg { width: 14px; height: 14px; }
.skill-cat ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-cat li {
  font-size: 0.82rem;
  color: var(--text);
  padding: 4px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: all var(--t);
}
.contact-card:hover {
  color: var(--text);
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-elev-2);
  box-shadow: var(--shadow);
}
.contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
  color: var(--accent-2);
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .contact-wrap { grid-template-columns: 1fr; }
}

/* ---------- Publication ---------- */
.pub-list { display: grid; gap: 24px; margin-top: 24px; }
.pub-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--t);
}
.pub-card:hover { border-color: var(--border-strong); }
.pub-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pub-venue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-2);
  background: rgba(33, 212, 253, 0.08);
  border: 1px solid rgba(33, 212, 253, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
}
.pub-date {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}
.pub-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  line-height: 1.3;
}
.pub-abstract {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}
.pub-meta-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pub-meta-list li {
  font-size: 0.86rem;
  color: var(--text-muted);
}
.pub-meta-list strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  color: var(--text-dim);
}
.pub-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 80px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy {
  font-size: 0.88rem;
  color: var(--text-dim);
}
.footer-socials {
  display: flex;
  gap: 8px;
}
.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--t);
}
.footer-socials a:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.footer-socials svg { width: 16px; height: 16px; }

/* ---------- Filter bar (project list search) ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 18px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t), box-shadow var(--t);
}
.filter-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.10);
}
.filter-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.filter-search svg { color: var(--text-dim); flex-shrink: 0; }
.filter-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  padding: 8px 0;
}
.filter-search input::placeholder { color: var(--text-dim); }
.filter-clear {
  display: none;
  padding: 6px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
}
.filter-clear:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.filter-bar.active .filter-clear { display: inline-flex; }
.filter-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.filter-empty {
  padding: 32px 20px;
  margin-bottom: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.filter-empty a { color: var(--accent); }
.filter-empty a:hover { color: var(--accent-2); }
@media (max-width: 600px) {
  .filter-bar { gap: 10px; padding: 8px 12px 8px 14px; }
  .filter-search input { font-size: 0.9rem; padding: 6px 0; }
  .filter-status { display: none; }
}

/* ---------- Pagination ---------- */
.pagination {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.pagination a, .pagination .page-link {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--t);
}
.pagination a:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.pagination .page-item.active a,
.pagination .active .page-link {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}
.pagination .disabled .page-link { opacity: 0.4; pointer-events: none; }

/* ---------- Featured project (large card) ---------- */
.featured-projects { display: grid; gap: 32px; margin-bottom: 56px; }
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--t);
}
.featured-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.featured-card-img {
  position: relative;
  background: var(--bg-elev-2);
  min-height: 360px;
  overflow: hidden;
}
.featured-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.featured-card:hover .featured-card-img img { transform: scale(1.05); }
.featured-card-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.featured-card-body .project-title { font-size: 1.5rem; }
.featured-card-body .project-desc {
  -webkit-line-clamp: unset;
  font-size: 0.95rem;
}
@media (max-width: 820px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card-img { min-height: 240px; }
  .featured-card-body { padding: 28px 24px; }
}

/* ---------- More projects list ---------- */
.more-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.more-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all var(--t);
}
.more-item:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateX(4px);
}
.more-item span { font-size: 0.92rem; font-weight: 500; }
.more-item svg { width: 14px; height: 14px; color: var(--accent-2); flex-shrink: 0; }

/* Article (single post) page */
.post-article {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 0 24px;
  color: var(--text);
}
.post-article img {
  border-radius: var(--radius);
  margin: 24px auto;
  border: 1px solid var(--border);
}
.post-article h1, .post-article h2, .post-article h3 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text);
}
.post-article h1 { font-size: 2.25rem; }
.post-article h2 { font-size: 1.5rem; }
.post-article p, .post-article li {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.post-article ul, .post-article ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.post-article a { color: var(--accent-2); }
.post-article a:hover { color: var(--text); }
.post-article code, .post-article pre {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.post-article code { padding: 2px 6px; font-size: 0.88em; }
.post-article pre { padding: 18px; overflow-x: auto; }
.post-article strong { color: var(--text); }

/* small reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
