/* =========================
   Theme tokens
   ========================= */
:root {
  /* Signature palette: electric sky + warm amber on deep navy.
     The unusual cyan→amber gradient reads as "engineer working with
     hardware and instruments" — distinct from generic cyan→purple. */
  --bg: #070b18;
  --bg-2: #0c1325;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #e8eef7;
  --muted: #93a1b8;
  --accent: #38bdf8;     /* signal sky */
  --accent-2: #fbbf24;   /* instrument amber */
  --accent-3: #f472b6;   /* signal pink */
  --led: #34d399;        /* status LED */
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.55);

  --radius: 14px;
  --radius-lg: 20px;
  --container: 1140px;

  --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="light"] {
  --bg: #faf9f5;
  --bg-2: #f0eee6;
  --surface: rgba(0, 0, 0, 0.025);
  --surface-2: rgba(0, 0, 0, 0.05);
  --border: rgba(0, 0, 0, 0.08);
  --border-2: rgba(0, 0, 0, 0.16);
  --text: #0e1320;
  --muted: #5a6478;
  --accent: #0284c7;
  --accent-2: #b45309;
  --accent-3: #db2777;
  --led: #059669;
  --shadow: 0 20px 50px -25px rgba(20, 30, 60, 0.2);
}

/* =========================
   Reset & base
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p { margin: 0; }

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #001018;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* =========================
   Background decoration
   ========================= */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(34, 211, 238, 0.15), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(167, 139, 250, 0.12), transparent 60%),
    var(--bg);
}
.bg-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.5;
}

[data-theme="light"] .bg-grid {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(8, 145, 178, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(124, 58, 237, 0.08), transparent 60%),
    var(--bg);
}

.bg-glow {
  position: fixed;
  z-index: -1;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  background: radial-gradient(circle, var(--accent), transparent 60%);
  opacity: 0.10;
  pointer-events: none;
  top: 10%;
  left: -200px;
  animation: float 18s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(80px, 60px); }
}

/* =========================
   Navigation
   ========================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.05em;
  box-shadow: 0 4px 14px -4px color-mix(in oklab, var(--accent) 60%, transparent);
}
.brand-mark::after {
  /* LED status dot — signature detail */
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 8px var(--led);
  animation: led-blink 2.4s ease-in-out infinite;
}
@keyframes led-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.brand-text {
  font-size: 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.brand-text::after {
  content: ".";
  color: var(--accent);
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 6px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--border-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
  box-shadow: 0 8px 24px -6px color-mix(in oklab, var(--accent) 50%, transparent);
}
.btn-primary:hover {
  box-shadow: 0 14px 32px -8px color-mix(in oklab, var(--accent) 70%, transparent);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-2); }

.btn-block { width: 100%; justify-content: center; }

/* =========================
   Hero
   ========================= */
.hero {
  position: relative;
  padding: 120px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 28px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px color-mix(in oklab, #10b981 25%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in oklab, #10b981 25%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in oklab, #10b981 8%, transparent); }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  max-width: 920px;
  margin-bottom: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-line {
  display: block;
  text-align: center;
  text-wrap: balance;
  max-width: 100%;
}

.grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-2 {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.typing-line {
  /* Fixed-size placeholder: reserves 2 lines of vertical space.
     font-size: 0.75em + font-weight: 500 keeps 35-char Inter lines under
     the h1's 920px content cap, so the JS-inserted breaks are the only
     ones that fire. Also gives a nice typographic hierarchy: bold name
     on top, lighter rotating phrase below. */
  display: block;
  width: 100%;
  max-width: 95vw;
  min-height: 2.3em;
  margin: 0 auto;
  text-align: center;
  font-size: 0.75em;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.typing-text {
  display: inline;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.type-cursor {
  display: inline-block;
  width: 4px;
  height: 0.8em;
  background: var(--accent-2);
  vertical-align: -4%;
  margin-left: 6px;
  border-radius: 1px;
  animation: blink 1s steps(2) infinite;
  box-shadow: 0 0 12px color-mix(in oklab, var(--accent-2) 50%, transparent);
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 16px;
  text-wrap: balance;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-stack {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  max-width: 820px;
  margin: 0 auto 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  letter-spacing: 0.01em;
}
.hero-stack span {
  position: relative;
  padding: 0 10px;
}
.hero-stack span:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -2px;
  color: color-mix(in oklab, var(--accent) 60%, transparent);
}
.hero-stack span:hover { color: var(--text); transition: color 0.2s; }

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}
.badge svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.badge strong { color: var(--text); font-weight: 600; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 720px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* =========================
   Console card (hero signature element)
   ========================= */
.console {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 40px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-2) 90%, transparent), var(--bg));
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: var(--shadow);
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.console-bar .dots {
  display: inline-flex;
  gap: 6px;
}
.console-bar .dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.console-bar .dots span:nth-child(1) { background: #ef4444cc; border-color: transparent; }
.console-bar .dots span:nth-child(2) { background: #fbbf24cc; border-color: transparent; }
.console-bar .dots span:nth-child(3) { background: #22c55ecc; border-color: transparent; }
.console-bar .title {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.console-body {
  padding: 16px 18px;
  line-height: 1.85;
  color: var(--text);
}
.console .prompt { color: var(--accent); user-select: none; }
.console .cmd { color: var(--text); }
.console .key { color: var(--muted); display: inline-block; min-width: 84px; }
.console .val { color: var(--text); }
.console .val .pop { color: var(--accent-2); font-weight: 600; }
.console .val .star { color: var(--accent-2); }
.console .val .ok { color: var(--led); }
.console .cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--muted); font-size: 13px; }

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 2px solid var(--border-2);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 6px;
  opacity: 0.6;
}
.scroll-hint span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--text);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* =========================
   Sections (shared)
   ========================= */
.section { padding: 100px 0; position: relative; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-eyebrow::before {
  content: attr(data-num);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
}
.section-eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-left: 4px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}
.lead { font-size: 1.05rem; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

/* =========================
   About
   ========================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 100px;
}
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.profile-meta h3 { font-size: 1.2rem; margin-bottom: 2px; }
.profile-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.profile-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* =========================
   Skills
   ========================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.skill { position: relative; overflow: hidden; }
.skill::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -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 0.25s, background 0.25s;
}
.skill:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.skill-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 22px;
  margin-bottom: 16px;
}
.skill h3 { font-size: 1.1rem; margin-bottom: 6px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.chip {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* =========================
   Projects
   ========================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.project { padding: 0; overflow: hidden; }
.project.featured {
  grid-column: 1 / -1;
}
.project.featured .project-cover { height: 200px; }
.project.featured .project-emoji { font-size: 64px; }
.project-cover {
  height: 160px;
  background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.badge-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.25), transparent 50%);
}
.project-emoji { font-size: 48px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
.project-body { padding: 22px; }
.project-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 500;
  font-size: 14px;
  transition: gap 0.2s;
}
.link:hover { gap: 8px; }

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: gap 0.2s, color 0.2s, border-color 0.2s, background 0.2s;
}
.case-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface);
}
.case-link .case-arrow {
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.2s;
}
.case-link:hover .case-arrow { transform: translateX(3px); }

.more-row {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.more-projects {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.more-projects:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.more-projects .more-dots {
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 1px;
  line-height: 1;
}
.more-projects svg {
  width: 11px;
  height: 11px;
  color: var(--accent);
  flex-shrink: 0;
}

/* =========================
   Case study pages
   ========================= */
.case-study {
  padding: 100px 0 80px;
}
.case-study .container { max-width: 880px; }
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  transition: gap 0.2s;
}
.case-back:hover { gap: 8px; color: var(--text); }
.case-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 8px 0 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.case-tagline {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 48px;
  line-height: 1.5;
  text-wrap: balance;
}
.case-cover {
  height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--accent-2)));
  display: grid;
  place-items: center;
  margin-bottom: 56px;
  position: relative;
  overflow: hidden;
}
.case-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.2), transparent 60%);
}
.case-emoji {
  font-size: 96px;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.4));
  position: relative;
  z-index: 1;
}
.case-study section {
  margin: 0 0 44px;
}
.case-study section h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  margin-bottom: 14px;
  color: var(--text);
}
.case-study section p {
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.75;
  font-size: 1.05rem;
}
.case-study section p strong { color: var(--text); font-weight: 600; }
.case-study section .chips { margin-top: 16px; }
.case-cta {
  margin-top: 12px;
}
@media (max-width: 720px) {
  .case-cover { height: 200px; }
  .case-emoji { font-size: 72px; }
}

/* =========================
   Testimonials — infinite horizontal marquee
   ========================= */
.testimonial {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}
.testimonial .stars {
  color: var(--accent-2);
  font-size: 18px;
  letter-spacing: 2px;
  font-family: var(--font-mono);
}
.testimonial blockquote {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}
.testimonial figcaption { margin-top: auto; }

.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 20px;
  padding: 0 10px;
  animation: marquee-scroll 55s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
.marquee .testimonial {
  flex: 0 0 340px;
  max-width: 340px;
  min-height: 200px;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 10px)); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0 24px;
  }
}
@media (max-width: 720px) {
  .marquee .testimonial { flex-basis: 280px; max-width: 280px; }
}

/* =========================
   Contact
   ========================= */
.contact-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.email-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.email-cta:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface-2);
}
.email-cta svg { width: 18px; height: 18px; color: var(--accent); }

.booking-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 28px auto 0;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  box-shadow: 0 8px 24px -6px color-mix(in oklab, var(--accent) 50%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.booking-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px color-mix(in oklab, var(--accent) 70%, transparent);
}
.booking-cta svg { width: 18px; height: 18px; color: #001018; }
.contact-inner .booking-cta + .email-cta { margin-top: 14px; }


.socials {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}
.socials a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.socials a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* =========================
   Footer
   ========================= */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.signature {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.signature .accent { color: var(--accent-2); }

/* =========================
   Reveal animations
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================
   Mobile
   ========================= */
@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    background: color-mix(in oklab, var(--bg) 96%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
  }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-links.open { transform: translateY(0); }
  .menu-toggle { display: flex; }
}

@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .nav-inner { padding: 14px 4px; }
  .hero { padding: 80px 0 80px; }
  .section { padding: 80px 0; }
  .hero-title { font-size: clamp(1.9rem, 7.5vw, 3rem); }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .profile-card { position: static; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); padding: 18px; gap: 16px; }
  .footer-inner { justify-content: center; text-align: center; }
  .project.featured { grid-column: auto; }
  .project.featured .project-cover { height: 160px; }
  .project.featured .project-emoji { font-size: 48px; }
}
