/* ============================================================
   ANSHUL GAUTAM — PORTFOLIO DESIGN SYSTEM
   Graphite editorial foundation / muted bronze accent
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-raise: #0e0e10;
  --surface: #111113;
  --surface-2: #16161a;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #ececea;
  --text-dim: #a3a3a0;
  --text-faint: #6b6b68;
  --accent: #c9ab7c;
  --accent-dim: rgba(201, 171, 124, 0.14);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(201, 171, 124, 0.25); color: #fff; }

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; }

a { color: inherit; text-decoration: none; }

/* ---------- typography ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.kicker .idx { color: var(--accent); opacity: 0.85; }

.h-display {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--text);
}
.h-section {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--accent); }

.lede { font-size: 17px; color: var(--text-dim); line-height: 1.75; max-width: 620px; }

/* masked reveal */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(110%); }
.no-motion .reveal-line > span { transform: none; }

/* ============================================================
   NAV
   ============================================================ */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out), backdrop-filter 0.4s;
}
#site-nav.scrolled {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border);
}
#site-nav .wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.nav-brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--bg) !important;
  background: var(--text);
  padding: 8px 16px !important;
  border-radius: 999px;
  transition: transform 0.3s var(--ease-out), background 0.25s;
}
.nav-cta:hover { background: #fff; }
@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
#hero::before {
  /* atmospheric gradient */
  content: "";
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 1200px; height: 800px;
  background: radial-gradient(ellipse at center, rgba(201, 171, 124, 0.06) 0%, rgba(201, 171, 124, 0.015) 40%, transparent 70%);
  pointer-events: none;
}
#hero::after {
  /* fine grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 36px;
}
.hero-status .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #7fb069;
  box-shadow: 0 0 0 0 rgba(127, 176, 105, 0.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(127, 176, 105, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(127, 176, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 176, 105, 0); }
}
.hero-title {
  font-size: clamp(42px, 7.2vw, 88px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 30px;
}
.hero-title .dim { color: var(--text-faint); }
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 44px;
}
.hero-sub strong { color: var(--text); font-weight: 500; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.35s var(--ease-out);
  will-change: transform;
}
.btn:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.03); }
.btn-solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-solid:hover { background: #fff; border-color: #fff; }
.btn .arr { transition: transform 0.3s var(--ease-out); font-size: 15px; }
.btn:hover .arr { transform: translateX(3px); }

.hero-meta {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.hero-meta .hm {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-meta .hm b { display: block; font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); margin-top: 6px; }

.hero-scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 2;
}
.hero-scroll-hint .line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  animation: scrollline 2.2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scrollline {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ============================================================
   SECTION SHELL
   ============================================================ */
section.block { padding: 130px 0; position: relative; }
.section-head { margin-bottom: 56px; }
.section-head .h-section { margin-top: 18px; }
.section-head .lede { margin-top: 18px; }

/* ============================================================
   PROFILE / INTRO
   ============================================================ */
#profile { border-top: 1px solid var(--border); }
.profile-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 72px;
  align-items: start;
}
.profile-copy p { color: var(--text-dim); font-size: 17px; line-height: 1.8; }
.profile-copy p + p { margin-top: 20px; }
.profile-copy p strong { color: var(--text); font-weight: 500; }
.profile-facts { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.fact .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; }
.fact .v { font-size: 14px; color: var(--text); text-align: right; font-weight: 450; }
@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ============================================================
   MACBOOK SCROLL  (signature interaction)
   ============================================================ */
#work-intro { padding: 130px 0 0; text-align: center; }
#work-intro .kicker { justify-content: center; }
#work-intro .kicker::before { display: none; }
#work-intro .h-section { margin-top: 18px; }
#work-intro .lede { margin: 18px auto 0; }

#macbook-scroll {
  position: relative;
  height: 320vh; /* scroll runway */
}
.mac-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mac-sticky::before {
  content: "";
  position: absolute;
  bottom: -20%;
  left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(201,171,124,0.05), transparent 65%);
  pointer-events: none;
}
.mac-caption {
  position: absolute;
  top: 13vh;
  text-align: center;
  z-index: 5;
  padding: 0 24px;
}
.mac-caption .cap-a, .mac-caption .cap-b {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 90vw;
  top: 0;
}
.mac-caption .cap-title {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.mac-caption .cap-sub {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mac-caption .cap-b { opacity: 0; }
.mac-caption .cap-b .cap-sub { color: var(--accent); }

.mac-stage {
  perspective: 1600px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* -- machine -- */
.macbook { width: 720px; max-width: 88vw; position: relative; }

.mac-lid {
  position: relative;
  transform-origin: bottom center;
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 2;
}
.mac-screen-outer {
  position: relative;
  aspect-ratio: 16 / 10.4;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, #2a2a2e 0%, #1c1c20 100%);
  padding: 2.5%;
  padding-bottom: 1.4%;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 -2px 30px rgba(0,0,0,0.5);
}
.mac-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 8px;
  background: #060607;
  overflow: hidden;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,0.9);
}
.mac-screen .glass {
  position: absolute; inset: 0; z-index: 6;
  background: linear-gradient(115deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.015) 30%, transparent 55%);
  pointer-events: none;
  border-radius: 8px;
}
.mac-camera {
  position: absolute;
  top: 1.1%; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: #0a0a0c;
  box-shadow: inset 0 0 2px rgba(90,110,140,0.8);
  z-index: 7;
}
/* the "screen off" reflection shown while lid is closed-ish */
.mac-screen .screen-off {
  position: absolute; inset: 0; z-index: 5;
  background: linear-gradient(160deg, #101013 0%, #060607 60%);
  display: flex; align-items: center; justify-content: center;
  transition: none;
}
.mac-screen .screen-off .apple-mark {
  font-size: 26px; color: rgba(255,255,255,0.06);
}

.mac-base {
  position: relative;
  z-index: 3;
}
.mac-base .base-top {
  height: 12px;
  background: linear-gradient(180deg, #3b3b40 0%, #232327 55%, #1a1a1e 100%);
  border-radius: 0 0 3px 3px;
  position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}
.mac-base .base-top::after {
  /* thumb notch */
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 13%; height: 7px;
  background: linear-gradient(180deg, #101013, #232327);
  border-radius: 0 0 10px 10px;
}
.mac-base .base-body {
  height: 10px;
  background: linear-gradient(180deg, #19191c, #0c0c0e);
  border-radius: 0 0 14px 14px;
  margin: 0 1.5%;
  box-shadow: 0 24px 50px -12px rgba(0,0,0,0.75);
}
.mac-shadow {
  width: 78%;
  height: 26px;
  margin: 8px auto 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55), transparent 70%);
  filter: blur(6px);
}

/* ---------- CRM app inside the screen ---------- */
.crm {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 15.5% 1fr;
  background: #0d0e11;
  font-family: var(--sans);
  color: #d6d7da;
  opacity: 0;
  --u: 0.62vw; /* fluid unit relative to viewport, macbook is ~50vw wide */
  font-size: calc(var(--u) * 1.05);
  line-height: 1.35;
}
@media (min-width: 1180px) { .crm { --u: 7.3px; } }
.crm * { min-width: 0; }
.crm-side {
  background: #0a0b0d;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 6% 8%;
  display: flex; flex-direction: column; gap: calc(var(--u)*1.1);
}
.crm-logo {
  display: flex; align-items: center; gap: calc(var(--u)*0.7);
  font-weight: 700; font-size: calc(var(--u)*1.25);
  color: #fff; margin-bottom: calc(var(--u)*1.2);
}
.crm-logo .lg {
  width: calc(var(--u)*2.1); height: calc(var(--u)*2.1);
  border-radius: 26%;
  background: linear-gradient(135deg, #c9ab7c, #8a6f45);
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0b; font-size: calc(var(--u)*1.1); font-weight: 800;
}
.crm-nav-item {
  display: flex; align-items: center; gap: calc(var(--u)*0.8);
  padding: calc(var(--u)*0.55) calc(var(--u)*0.8);
  border-radius: calc(var(--u)*0.6);
  color: #85868c; font-size: calc(var(--u)*1.02); font-weight: 500;
  white-space: nowrap;
}
.crm-nav-item.on { background: rgba(201,171,124,0.12); color: #e8cf9f; }
.crm-nav-item i { width: calc(var(--u)*1.3); text-align: center; font-size: calc(var(--u)*0.95); }
.crm-main { display: flex; flex-direction: column; overflow: hidden; }
.crm-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--u)*1.1) calc(var(--u)*1.6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.crm-top .t { font-weight: 650; font-size: calc(var(--u)*1.35); color: #fff; }
.crm-top .crm-actions { display: flex; gap: calc(var(--u)*0.7); align-items: center; }
.crm-chip {
  font-size: calc(var(--u)*0.85); font-weight: 600;
  padding: calc(var(--u)*0.42) calc(var(--u)*0.9);
  border-radius: 99px;
  background: rgba(255,255,255,0.06); color: #b8b9be;
  white-space: nowrap;
}
.crm-chip.gold { background: linear-gradient(135deg, #c9ab7c, #a9885a); color: #131313; }
.crm-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--u)*1); padding: calc(var(--u)*1.2) calc(var(--u)*1.6) 0;
}
.crm-stat {
  background: #121317; border: 1px solid rgba(255,255,255,0.06);
  border-radius: calc(var(--u)*0.8);
  padding: calc(var(--u)*0.9) calc(var(--u)*1.1);
}
.crm-stat .l { font-size: calc(var(--u)*0.8); color: #77787e; font-weight: 500; white-space: nowrap; }
.crm-stat .n { font-size: calc(var(--u)*1.6); font-weight: 700; color: #fff; margin-top: calc(var(--u)*0.15); }
.crm-stat .d { font-size: calc(var(--u)*0.75); color: #7fb069; font-weight: 600; }
.crm-stat .d.down { color: #c96f6f; }
.crm-board {
  flex: 1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--u)*1);
  padding: calc(var(--u)*1.2) calc(var(--u)*1.6) calc(var(--u)*1.4);
  overflow: hidden;
}
.crm-col { display: flex; flex-direction: column; gap: calc(var(--u)*0.7); min-height: 0; }
.crm-col-h {
  display: flex; align-items: center; justify-content: space-between;
  font-size: calc(var(--u)*0.85); font-weight: 650; color: #9fa0a6;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 0 calc(var(--u)*0.2);
  white-space: nowrap;
}
.crm-col-h .cnt {
  background: rgba(255,255,255,0.07); border-radius: 99px;
  font-size: calc(var(--u)*0.75); padding: calc(var(--u)*0.1) calc(var(--u)*0.55);
  color: #85868c;
}
.crm-card {
  background: #15161b; border: 1px solid rgba(255,255,255,0.07);
  border-radius: calc(var(--u)*0.7);
  padding: calc(var(--u)*0.85) calc(var(--u)*0.95);
}
.crm-card .cn { font-size: calc(var(--u)*0.98); font-weight: 600; color: #e8e8ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-card .cv { font-size: calc(var(--u)*0.85); color: #c9ab7c; font-weight: 650; margin-top: calc(var(--u)*0.2); }
.crm-card .cm { display: flex; align-items: center; justify-content: space-between; margin-top: calc(var(--u)*0.55); }
.crm-card .cm .tag {
  font-size: calc(var(--u)*0.68); font-weight: 600;
  padding: calc(var(--u)*0.15) calc(var(--u)*0.5);
  border-radius: 99px; background: rgba(127,176,105,0.14); color: #9dc98a;
  white-space: nowrap;
}
.crm-card .cm .tag.warn { background: rgba(201,171,124,0.14); color: #d9bd8c; }
.crm-card .cm .tag.info { background: rgba(122,146,189,0.16); color: #a3b8de; }
.crm-card .av {
  width: calc(var(--u)*1.5); height: calc(var(--u)*1.5); border-radius: 50%;
  font-size: calc(var(--u)*0.62); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: #2a2c33; color: #b8b9be;
}
.crm-card.ai {
  border-color: rgba(201,171,124,0.35);
  background: linear-gradient(160deg, rgba(201,171,124,0.09), #15161b 55%);
}
.crm-card.ai .ail {
  display: flex; align-items: center; gap: calc(var(--u)*0.45);
  font-size: calc(var(--u)*0.7); font-weight: 700; letter-spacing: 0.08em;
  color: #d9bd8c; text-transform: uppercase; margin-bottom: calc(var(--u)*0.35);
}
.crm-card.ai .ait { font-size: calc(var(--u)*0.85); color: #b8b9be; line-height: 1.45; }

/* ---------- mobile fallback frame ---------- */
#work-mobile { display: none; }
.mobile-frame {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  background: #0d0e11;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.mobile-frame .bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: #16171b;
  border-bottom: 1px solid var(--border);
}
.mobile-frame .bar i { width: 10px; height: 10px; border-radius: 50%; background: #2e2f34; }
.mobile-frame .bar i:nth-child(1) { background: #574141; }
.mobile-frame .bar i:nth-child(2) { background: #57503d; }
.mobile-frame .bar i:nth-child(3) { background: #43523f; }
.mobile-frame .bar .url {
  flex: 1; margin-left: 8px;
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  background: rgba(255,255,255,0.04); border-radius: 6px; padding: 4px 10px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mobile-frame .crm-holder { position: relative; aspect-ratio: 16/10.4; }
.mobile-frame .crm { opacity: 1; --u: 1.7vw; font-size: calc(var(--u)*1.05); }

@media (max-width: 820px) {
  #macbook-scroll { display: none; }
  #work-mobile { display: block; padding: 56px 0 0; }
}

/* ============================================================
   CASE STUDY
   ============================================================ */
#case { padding-top: 96px; }
.case-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}
.case-head .links { display: flex; gap: 12px; }
.case-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}
.case-body h3 {
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 44px 0 16px;
}
.case-body h3:first-child { margin-top: 0; }
.case-body p { color: var(--text-dim); font-size: 16.5px; line-height: 1.8; }
.case-body p + p { margin-top: 14px; }
.case-body p strong { color: var(--text); font-weight: 500; }
.case-body ul { list-style: none; margin-top: 14px; }
.case-body ul li {
  position: relative;
  padding-left: 26px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.case-body ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 11px;
  width: 12px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.case-body ul li strong { color: var(--text); font-weight: 500; }

.case-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; }
.aside-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raise) 100%);
  padding: 26px 28px;
}
.aside-card .ac-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.stack-rows { display: flex; flex-direction: column; }
.stack-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.stack-row:last-child { border-bottom: 0; }
.stack-row .sk { color: var(--text-faint); white-space: nowrap; }
.stack-row .sv { color: var(--text); text-align: right; font-weight: 450; }

.test-banner {
  border: 1px solid rgba(127, 176, 105, 0.25);
  background: linear-gradient(160deg, rgba(127,176,105,0.07), transparent 60%);
  border-radius: 14px;
  padding: 24px 28px;
  font-family: var(--mono);
}
.test-banner .tb-num {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #a4cc93;
}
.test-banner .tb-num small { font-size: 16px; color: var(--text-faint); font-weight: 500; }
.test-banner .tb-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-top: 6px; }
.test-banner .tb-bar {
  margin-top: 16px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.test-banner .tb-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #6f9e5f, #a4cc93);
  border-radius: 99px;
}

@media (max-width: 920px) {
  .case-grid { grid-template-columns: 1fr; gap: 48px; }
  .case-aside { position: static; }
  .case-head { grid-template-columns: 1fr; align-items: start; }
}

/* ============================================================
   SKILLS
   ============================================================ */
#skills { border-top: 1px solid var(--border); }
.skill-groups { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.skill-group {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.35s;
}
.skill-group:hover { background: linear-gradient(90deg, rgba(255,255,255,0.016), transparent 70%); }
.skill-group .sg-name {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 17px; font-weight: 550; color: var(--text);
}
.skill-group .sg-name .sg-idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}
.skill-group .sg-note { font-size: 13px; color: var(--text-faint); margin-top: 6px; line-height: 1.6; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.skill-tag {
  font-size: 13.5px;
  font-weight: 480;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  border-radius: 999px;
  padding: 8px 18px;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.3s var(--ease-out);
  cursor: default;
}
.skill-tag:hover {
  color: var(--text);
  border-color: rgba(201,171,124,0.45);
  background: var(--accent-dim);
  transform: translateY(-2px);
}
@media (max-width: 760px) {
  .skill-group { grid-template-columns: 1fr; gap: 18px; padding: 28px 0; }
}

/* ============================================================
   BACKGROUND (education / certs / leadership)
   ============================================================ */
#background { border-top: 1px solid var(--border); }
.bg-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: start;
}
.timeline { border-left: 1px solid var(--border); margin-left: 6px; }
.tl-item { position: relative; padding: 0 0 40px 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -5px; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--text-faint);
}
.tl-item.current::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.tl-item .tl-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.tl-item .tl-title { font-size: 17px; font-weight: 550; color: var(--text); margin-top: 6px; }
.tl-item .tl-org { font-size: 14px; color: var(--text-dim); margin-top: 3px; }
.tl-item .tl-note { font-size: 13.5px; color: var(--text-faint); margin-top: 6px; }

.cert-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.cert {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 4px;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, padding 0.3s var(--ease-out);
}
.cert:hover { background: rgba(255,255,255,0.015); padding-left: 12px; }
.cert .c-name { font-size: 15px; font-weight: 500; color: var(--text); }
.cert .c-org { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--text-faint); white-space: nowrap; }
.bg-sub {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin: 48px 0 8px;
}
.vol-list { list-style: none; margin-top: 12px; }
.vol-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 14.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.vol-list li::before {
  content: ""; position: absolute; left: 0; top: 19px;
  width: 10px; height: 1px; background: var(--text-faint);
}
@media (max-width: 860px) { .bg-grid { grid-template-columns: 1fr; gap: 56px; } }

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  padding: 150px 0 60px;
}
#contact::before {
  content: "";
  position: absolute;
  bottom: -40%; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(201,171,124,0.055), transparent 65%);
  pointer-events: none;
}
.contact-inner { position: relative; text-align: center; }
.contact-inner .kicker { justify-content: center; }
.contact-inner .kicker::before { display: none; }
.contact-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 22px 0 18px;
}
.contact-sub { color: var(--text-dim); font-size: 17px; max-width: 480px; margin: 0 auto 44px; }
.contact-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.contact-channels {
  margin-top: 88px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 12px 44px;
  flex-wrap: wrap;
}
.channel {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 8px 4px;
  transition: color 0.25s;
}
.channel:hover { color: var(--text); }
.channel i { color: var(--text-faint); font-size: 13px; transition: color 0.25s; }
.channel:hover i { color: var(--accent); }

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
footer .wrap {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

/* ============================================================
   MOTION UTILITIES
   ============================================================ */
.fade-item { opacity: 0; transform: translateY(28px); }
.no-motion .fade-item { opacity: 1; transform: none; }
