/* =====================================================
   DESIGN SYSTEM — YASH PATEL PORTFOLIO
   Dark theme · Amber accent · Outfit + Inter + JetBrains Mono
   ===================================================== */

/* ── Variables ───────────────────────────────────── */
:root {
  --bg:           #09090b;
  --surface:      #111113;
  --surface-2:    #18181b;
  --border:       #27272a;
  --border-hover: #3f3f46;

  --accent:       #f0a30a;
  --accent-hover: #f5bb38;
  --accent-dim:   rgba(240, 163, 10, 0.10);
  --accent-bdr:   rgba(240, 163, 10, 0.22);

  --text:         #fafafa;
  --text-muted:   #71717a;
  --text-dim:     #3f3f46;

  --font-sans:    'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --nav-h:        72px;
  --radius:       6px;
  --radius-lg:    12px;
  --max-w:        1180px;
  --pad:          clamp(1.25rem, 5vw, 3rem);

  --t:            0.24s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:       0.5s  cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { border: none; background: none; font: inherit; cursor: pointer; color: inherit; }


/* ── Layout ─────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── Section label (eyebrow text) ────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.section-label::after {
  content: '';
  flex: 1;
  max-width: 64px;
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: var(--t);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(240, 163, 10, 0.25);
}
.btn-ghost {
  color: var(--text-muted);
  padding: 0.75rem 0;
}
.btn-ghost:hover { color: var(--text); }
.btn-icon {
  font-size: 1rem;
  display: inline-block;
  transition: transform var(--t);
}
.btn-primary:hover .btn-icon { transform: translate(2px, -2px); }
.btn-ghost:hover   .btn-icon { transform: translateY(3px); }

/* ── Navigation ─────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--t), backdrop-filter var(--t), border-color var(--t);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}
.nav-logo em {
  color: var(--accent);
  font-style: normal;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color var(--t);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--t);
}
.nav-link:hover,
.nav-link.active { color: var(--text); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-book {
  background: var(--accent-dim);
  border: 1px solid var(--accent-bdr);
  color: var(--accent);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--t);
}
.nav-book:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--t);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.75rem var(--pad) 2rem;
  z-index: 99;
  flex-direction: column;
  gap: 1.5rem;
  display: none;
}
.nav-drawer.open { display: flex; }
.nav-drawer .nav-link {
  font-size: 1.125rem;
  color: var(--text-muted);
}
.nav-drawer .nav-book {
  align-self: flex-start;
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.hero-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 4rem var(--pad) 5rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2.75rem;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.1s;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45);
  animation: pulseDot 2.5s ease infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0   rgba(74, 222, 128, 0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0   rgba(74, 222, 128, 0); }
}

.hero-headline {
  font-family: var(--font-sans);
  font-size: clamp(3.25rem, 9.5vw, 9.75rem);
  line-height: 1.0;
  letter-spacing: 0.03em;
  margin-bottom: 2.5rem;
}
.hero-headline .line { display: block; }
.line-heavy { font-weight: 800; color: var(--text); }
.line-light { font-weight: 300; color: rgba(250, 250, 250, 0.55); }
.line-mix   { font-weight: 700; color: var(--text); }
.accent-char { color: var(--accent); font-style: normal; }

.hero-headline .line:nth-child(1) { animation: fadeUp 0.65s ease both; animation-delay: 0.15s; }
.hero-headline .line:nth-child(2) { animation: fadeUp 0.65s ease both; animation-delay: 0.25s; }
.hero-headline .line:nth-child(3) { animation: fadeUp 0.65s ease both; animation-delay: 0.35s; }

.hero-sub {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 2.75rem;
  animation: fadeUp 0.65s ease both;
  animation-delay: 0.45s;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  animation: fadeUp 0.65s ease both;
  animation-delay: 0.55s;
}

/* Scroll cue */
.hero-scroll {
  position: absolute;
  bottom: 2.75rem;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeUp 0.65s ease both;
  animation-delay: 0.9s;
}
.hero-scroll-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  writing-mode: vertical-lr;
}
.hero-scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollBob 2s ease infinite;
}
@keyframes scrollBob {
  0%, 100% { transform: scaleY(1);   opacity: 0.35; }
  50%       { transform: scaleY(0.7); opacity: 1; }
}

/* ── Hero content column (left) ─────────────────── */
.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  animation: fadeUp 0.5s ease both;
  animation-delay: 0.05s;
}
.hero-name {
  font-family: var(--font-sans);
  font-size: clamp(2.9rem, 5.75vw, 5.25rem);
  font-weight: 650;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1rem;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.15s;
}
.accent-dot { color: var(--accent); }
.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 0;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.25s;
}
.hero-tagline::after {
  content: '';
  display: block;
  width: 2.25rem;
  height: 2px;
  background: var(--accent);
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  opacity: 0.75;
  border-radius: 1px;
}
.hero-tagline strong { font-weight: 700; }
.accent-word { color: var(--accent); font-style: italic; }
.hero-content .hero-sub {
  margin-bottom: 2rem;
  animation-delay: 0.35s;
}
.hero-content .hero-actions {
  margin-bottom: 2.25rem;
  animation-delay: 0.45s;
}

/* ── Terminal wrapper (holds the below-glow) ────────── */
.hero-terminal-wrap {
  position: relative;
  animation: fadeUp 0.7s ease both;
  animation-delay: 0.25s;
}
.hero-terminal-wrap::after {
  content: '';
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 48px;
  background: radial-gradient(ellipse, rgba(245, 166, 0, 0.65), rgba(245, 166, 0, 0.18), transparent 70%);
  filter: blur(14px);
  pointer-events: none;
  z-index: -1;
}
.hero-terminal-wrap.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 82vw;
  max-width: 1160px;
  z-index: 1000;
  animation: none;
}
.hero-terminal-wrap.expanded::after { display: none; }

/* ── Terminal ────────────────────────────────────── */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Terminal overlay (backdrop) ──────────────────── */
.term-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 999;
}
.term-overlay.open { display: block; }
.term-chrome {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 0.6875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  user-select: none;
  min-height: 42px;
}
.term-dots { display: flex; gap: 0.375rem; align-items: center; }
.term-dot  { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.term-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  pointer-events: none;
}
.term-user { color: #22c55e; }
.term-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--t), background var(--t);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.term-expand-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}
.term-expand-btn .icon-compress { display: none; }
.hero-terminal-wrap.expanded .term-expand-btn .icon-expand  { display: none; }
.hero-terminal-wrap.expanded .term-expand-btn .icon-compress { display: flex; }
.term-body {
  padding: 1.125rem 1.25rem 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  overflow-y: auto;
  max-height: 370px;
  min-height: 280px;
  scroll-behavior: smooth;
}
.hero-terminal-wrap.expanded .term-body {
  max-height: calc(82vh - 200px);
  min-height: 420px;
}
.term-body::-webkit-scrollbar { width: 4px; }
.term-body::-webkit-scrollbar-track { background: transparent; }
.term-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.term-entry-prompt { margin-bottom: 0.25rem; }
.term-prompt { color: #22c55e; white-space: nowrap; }
.term-typed  { color: var(--text); }
.term-section-lbl {
  color: #22c55e;
  margin-bottom: 0.5rem;
}
.term-help-body {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.term-cmds { flex: 1; }
.term-cmds > div { line-height: 1.9; }
.term-k {
  display: inline-block;
  min-width: 9ch;
  color: var(--text);
  font-weight: 500;
}
.term-sep { color: var(--text-muted); }
.term-v   { color: var(--text-muted); }
.term-si {
  border: 1px solid var(--border);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  min-width: 185px;
  flex-shrink: 0;
}
.term-si-title {
  color: #22c55e;
  display: block;
  font-weight: 500;
  text-align: center;
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.term-si-row {
  display: grid;
  grid-template-columns: 6.5ch 1fr;
  gap: 0.375rem;
  font-size: 0.72rem;
  line-height: 1.75;
  align-items: start;
}
.term-si-k { color: #22c55e; }
.term-si-v { color: var(--text); }
.term-hint { color: var(--text-muted); margin-top: 0.375rem; }
.term-err  {
  color: #f87171;
  display: block;
  margin-bottom: 0.375rem;
}
.term-accent { color: var(--accent); }
.term-input-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  cursor: text;
}
.term-input-display {
  flex: 1;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  min-width: 0;
}
.term-typed-text {
  color: var(--text);
  white-space: pre;
}
@keyframes termBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.term-cursor-block {
  display: inline-block;
  width: 7px;
  height: 0.85em;
  background: #22c55e;
  animation: termBlink 1s step-end infinite;
  vertical-align: text-bottom;
  flex-shrink: 0;
}
.term-input {
  /* No position:absolute — keeps element in flex flow so the browser
     never needs to scroll the page to bring the caret into view */
  width: 0;
  min-width: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border: none;
  outline: none;
  background: none;
  flex-shrink: 0;
}
.term-footer {
  border-top: 1px solid var(--border);
  padding: 0.6875rem 1.25rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  background: var(--surface-2);
  flex-wrap: wrap;
}
.term-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: color var(--t);
  white-space: nowrap;
}
.term-link:hover { color: var(--accent); }

/* ── Marquee strip ───────────────────────────────── */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 38s linear infinite;
}
.marquee-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
  white-space: nowrap;
}
.marquee-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.marquee-sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
}
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Pinned Projects (homepage) ──────────────────── */
.pinned-section { padding: 8rem 0; }

/* Centered section heading */
.pinned-header {
  text-align: center;
  margin-bottom: 4rem;
}
.pinned-heading {
  font-family: var(--font-sans);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.pinned-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* ── 12-column zigzag grid ────────────────────────────
   Row 1 — wide (7 col) + standard (5 col)
   Row 2 — equal  (6 col) + equal   (6 col)
   Row 3 — standard (5 col) + wide  (7 col)  ← future
   Gap: 20px · Max-width: 1100px · Centered          */
.pinned-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

/* — Column spans — */
.pinned-card:nth-child(1) { grid-column: span 7; }   /* Row 1 wide    */
.pinned-card:nth-child(2) { grid-column: span 5; }   /* Row 1 std     */
.pinned-card:nth-child(3) { grid-column: span 6; }   /* Row 2 equal   */
.pinned-card:nth-child(4) { grid-column: span 6; }   /* Row 2 equal   */
/* Future Row 3 (zigzag reverses):
   .pinned-card:nth-child(5) { grid-column: span 5; }
   .pinned-card:nth-child(6) { grid-column: span 7; } */

/* — Base card: flex column, image on top, content below — */
.pinned-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  text-decoration: none;
  color: inherit;
}
.pinned-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  z-index: 1;
}
.pinned-card:hover::before { transform: scaleX(1); }
.pinned-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
}

/* — Image area — */
.pinned-img {
  width: 100%;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pinned-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pinned-img-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  user-select: none;
  position: relative;
  z-index: 1;
}

/* Wide cards (span 7): taller image */
.pinned-card:nth-child(1) .pinned-img { height: 260px; }
/* Future Row 3 wide card:
   .pinned-card:nth-child(6) .pinned-img { height: 260px; } */

/* Standard / equal cards (span 5–6): standard image */
.pinned-card:nth-child(2) .pinned-img,
.pinned-card:nth-child(3) .pinned-img,
.pinned-card:nth-child(4) .pinned-img { height: 200px; }

/* — Card body: sits below image in normal flow — */
.pinned-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.pinned-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-bdr);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  align-self: flex-start;
}
.pinned-title {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}
/* Wide card gets a touch more title weight */
.pinned-card:nth-child(1) .pinned-title {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
}

.pinned-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.72;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
}
.pinned-arrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap var(--t);
}
.pinned-card:hover .pinned-arrow { gap: 0.625rem; }

/* Section footer link */
.work-footer {
  margin-top: 3rem;
  display: flex;
  align-items: center;
}
.work-footer-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color var(--t), border-color var(--t);
}
.work-footer-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── About section ───────────────────────────────── */
.about-section {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4.5rem;
  align-items: center; /* vertically center image with text */
}

/* Circular animated image */
.about-image-col {
  display: flex;
  justify-content: center;
}
.about-image-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  flex-shrink: 0;
}
/* Rotating conic-gradient ring */
.about-image-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent)               0deg,
    rgba(240, 163, 10, 0.35)   70deg,
    transparent                150deg,
    transparent                210deg,
    rgba(240, 163, 10, 0.35)   290deg,
    var(--accent)              360deg
  );
  /* animation: spinRing 8s linear infinite; */
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask:         radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  z-index: 0;
}
.about-img-inner {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.about-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
/* Placeholder shown until photo is added */
.about-img-placeholder {
  font-family: var(--font-sans);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: -0.04em;
  user-select: none;
}
@keyframes spinRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.about-content p {
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.about-content p:last-of-type { margin-bottom: 2rem; }
.about-content strong { color: var(--text); font-weight: 500; }
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--t);
}
.social-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface);
}

/* ── CTA section ─────────────────────────────────── */
.cta-section {
  padding: 10rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
}
.cta-headline {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.cta-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cta-or { color: var(--text-dim); font-size: 0.875rem; }
.cta-email {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--t);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.cta-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Footer ──────────────────────────────────────── */
footer { border-top: 1px solid var(--border); }
.footer {
  padding: 2rem var(--pad);
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.footer-top {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: color var(--t);
}
.footer-top:hover { color: var(--accent); }

/* ── Page header (projects / contact) ────────────── */
.page-header {
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.page-header .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-title {
  font-family: var(--font-sans);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 650;
  line-height: 1.0;
  letter-spacing: -0.03em;
}
.page-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.7;
  margin-top: 0.25rem;
}

/* ── Projects page ───────────────────────────────── */
.projects-section { padding: 5rem 0 8rem; }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--t);
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* Project grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Project card */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  cursor: pointer;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.38s ease;
  z-index: 2;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.project-card.hidden { display: none; }

/* Stretch-link overlay — makes the whole card clickable */
.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-lg);
}

/* Card image slot */
.card-img {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}
.card-img-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  user-select: none;
}

/* Inner content sits above the overlay */
.card-inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  position: relative;
  z-index: 2;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.card-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-bdr);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
}
.card-title {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}
.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.card-divider {
  height: 1px;
  background: var(--border);
  margin-top: auto;
}
.card-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.25rem;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t), gap var(--t);
  position: relative;  /* must be set for z-index to apply */
  z-index: 2;          /* sit above the card-overlay-link (z-index: 1) */
  text-decoration: none;
}
.card-link:hover {
  color: var(--accent);
  gap: 0.6rem;
}

/* ── Contact page ────────────────────────────────── */
.contact-section { padding: 5rem 0 8rem; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}
.contact-sidebar h3 {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.contact-sidebar p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.contact-sidebar a { color: var(--accent); }
.contact-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.contact-meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  transition: var(--t);
}
.contact-meta-item:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface);
}
.contact-meta-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-meta-icon svg {
  display: block;
}
.cal-embed-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
}
.cal-placeholder p {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ── Scroll reveal ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ── Keyframes ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────── */

/* Pinned grid: 2 equal columns at 900–1100px */
@media (max-width: 1100px) {
  .pinned-grid {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }
  /* Reset all explicit spans → auto-place into 2-col grid */
  .pinned-card:nth-child(1),
  .pinned-card:nth-child(2),
  .pinned-card:nth-child(3),
  .pinned-card:nth-child(4) { grid-column: auto; }
  /* Equal image heights at 2-col */
  .pinned-card:nth-child(1) .pinned-img { height: 200px; }
}

/* Pinned grid: single column below 900px */
@media (max-width: 900px) {
  .pinned-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  /* Hero: stack on tablet */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: var(--max-w);
  }
  .term-body { max-height: 320px; }

  /* About: stack image above text */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    justify-items: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }

  /* Hide terminal on phones — no side space, commands not phone-friendly */
  .hero-terminal-wrap { display: none; }

  /* With terminal gone, center the hero content vertically */
  .hero { justify-content: center; }
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  /* Leftover terminal responsive rules (no-op once hidden, kept for safety) */
  .term-help-body { flex-direction: column; gap: 1rem; }
  .term-si { min-width: unset; width: 100%; }
  .term-footer { gap: 1rem; }

  /* Pinned grid: single column on mobile */
  .pinned-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .pinned-card:nth-child(1) .pinned-img,
  .pinned-card:nth-child(2) .pinned-img,
  .pinned-card:nth-child(3) .pinned-img,
  .pinned-card:nth-child(4) .pinned-img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* About: image centered above text */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    justify-items: center;
  }
  .about-image-col { justify-content: center; }
  .about-content   { width: 100%; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }

  /* About / CTA */
  .about-section { padding: 5rem 0; }
  .cta-section   { padding: 6rem 0; }

  /* Footer */
  .footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 520px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
  }
  .hero-actions .btn { justify-content: center; }

  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
  }
  .cta-actions .btn { width: 100%; justify-content: center; }

  .filter-bar { gap: 0.375rem; }
}
