/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html, body { background: #08080a; color: #fafafa; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; color: inherit; cursor: none; }
ul { list-style: none; }
em, i { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }

:root {
  --bg: #08080a;
  --bg-2: #0e0e11;
  --surface: #14141a;
  --surface-2: #1a1a22;
  --line: rgba(255,255,255,0.08);
  --text: #fafafa;
  --muted: #8a8a94;
  --muted-2: #5a5a64;
  --accent: #d4ff3e;
  --accent-2: #a78bfa;
  --container: 1320px;
  --pad-x: clamp(20px, 5vw, 80px);
}

/* ============ CANVAS / NOISE ============ */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
}
.noise {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* ============ CUSTOM CURSOR ============ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.15s, background 0.2s, width 0.2s, height 0.2s;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  background: rgba(212,255,62,0.1);
  border-color: var(--accent);
}
.cursor-ring.view {
  width: 90px; height: 90px;
  background: rgba(212,255,62,0.15);
  border-color: var(--accent);
  mix-blend-mode: difference;
}
.cursor-ring.view::after {
  content: 'view'; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: #000; font-weight: 600;
}
@media (max-width: 900px) {
  body { cursor: auto; }
  button, a { cursor: pointer; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad-x);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8,8,10,0.6);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
}
.nav-logo i { color: var(--accent); font-style: normal; font-family: 'Instrument Serif',serif; }
.logo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}
.nav-links { display: flex; gap: 28px; font-size: 14px; }
.nav-links a {
  color: var(--muted); transition: color 0.2s; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.music-toggle {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.3s;
}
.music-toggle:hover { border-color: var(--accent); }
.music-toggle .bar {
  display: inline-block; width: 2px; height: 8px;
  background: var(--muted);
  border-radius: 1px;
  transition: background 0.3s;
}
.music-toggle.playing .bar {
  background: var(--accent);
  animation: barAnim 1.2s ease-in-out infinite;
}
.music-toggle.playing .bar:nth-child(2) { animation-delay: 0.15s; }
.music-toggle.playing .bar:nth-child(3) { animation-delay: 0.3s; }
.music-toggle.playing .bar:nth-child(4) { animation-delay: 0.45s; }
@keyframes barAnim {
  0%,100% { height: 4px; }
  50% { height: 14px; }
}
.nav-cta {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; color: var(--text);
  transition: border-color 0.3s, background 0.3s;
}
.nav-cta:hover { border-color: var(--accent); background: rgba(212,255,62,0.05); }
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 2s ease-in-out infinite;
}

/* ============ HERO ============ */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh;
  padding: 140px var(--pad-x) 80px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--container); margin: 0 auto; width: 100%;
}
.hero-meta {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 13px;
  letter-spacing: 0.02em; margin-bottom: 32px;
}
.meta-line { display: inline-block; width: 40px; height: 1px; background: var(--accent); }
.hero-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 36px;
}
.hero-title .line {
  display: block; overflow: hidden;
}
.hero-title .line > span {
  display: inline-block;
}
.hero-title em {
  color: var(--accent);
  font-family: 'Instrument Serif',serif;
  font-weight: 400; font-style: italic;
}
.hero-title i {
  font-family: 'Instrument Serif',serif;
  font-style: italic; font-weight: 400;
  color: rgba(255,255,255,0.85);
}
.hero-sub {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55; color: var(--muted);
  max-width: 540px;
  margin-bottom: 40px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #b8e635; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(212,255,62,0.25); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: rgba(255,255,255,0.04); }

/* Hero portrait */
.hero-right { display: flex; justify-content: center; align-items: center; }
.portrait-wrap {
  position: relative;
  width: clamp(280px, 32vw, 380px);
  aspect-ratio: 4/5;
}
.portrait-glow {
  position: absolute; inset: -40px;
  background: radial-gradient(circle at 50% 40%, rgba(125, 211, 252, 0.40), transparent 60%);
  filter: blur(40px);
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%,100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}
.portrait {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 16px;
  position: relative; z-index: 1;
  filter: contrast(1.05) saturate(1.05);
}
.portrait-frame {
  position: absolute; inset: -1px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 17px;
  z-index: 2;
  pointer-events: none;
}
.floating-tag {
  position: absolute; z-index: 3;
  background: rgba(20,20,26,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.floating-tag span { color: var(--accent); font-size: 9px; }
.tag-1 { top: 8%; left: -30%; animation-delay: 0s; }
.tag-2 { bottom: 18%; right: -20%; animation-delay: 1.2s; }
.tag-3 { bottom: -5%; left: -10%; animation-delay: 2.4s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.scroll-indicator {
  position: absolute; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted-2); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 50px;
  background: var(--line); position: relative; overflow: hidden;
}
.scroll-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 50%;
  background: var(--accent);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* ============ MARQUEE ============ */
.marquee {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  overflow: hidden;
  background: rgba(14,14,17,0.5);
}
.marquee-track {
  display: flex; gap: 40px;
  animation: marquee 50s linear infinite;
  width: max-content;
}
.marquee-group {
  display: flex; align-items: center; gap: 40px;
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee-group span:nth-child(odd) { color: var(--text); }
.marquee-group span:nth-child(even) { color: var(--accent); font-size: 14px; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ SECTION COMMON ============ */
.section-head {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad-x);
  margin-bottom: 60px;
}
.section-num {
  display: inline-block;
  color: var(--accent); font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 900px;
}
.section-title em, .section-title i {
  font-family: 'Instrument Serif',serif;
  font-style: italic; font-weight: 400;
  color: var(--accent);
}
.section-desc {
  margin-top: 18px;
  color: var(--muted); font-size: 16px;
  max-width: 540px;
}

/* ============ SERVICES ============ */
.services {
  position: relative; z-index: 2;
  padding: 120px 0;
}
.services-grid {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px 28px;
  position: relative;
  transition: transform 0.4s, border-color 0.4s, background 0.4s;
  overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,0%), rgba(212,255,62,0.08), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(212,255,62,0.4); }
.service-card:hover::before { opacity: 1; }
.service-card.featured {
  background: linear-gradient(180deg, rgba(212,255,62,0.06), var(--surface));
  border-color: rgba(212,255,62,0.25);
}
.featured-badge {
  position: absolute; top: 24px; right: 24px;
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent); color: #000;
  padding: 5px 10px; border-radius: 999px;
  font-weight: 600;
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(212,255,62,0.1);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.service-card p {
  color: var(--muted); font-size: 14px; line-height: 1.6;
  margin-bottom: 22px;
}
.service-list { display: flex; flex-direction: column; gap: 10px; }
.service-list li {
  font-size: 13px; color: var(--muted);
  padding-left: 18px; position: relative;
}
.service-list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 8px; height: 1px; background: var(--accent);
}

/* ============ WORK ============ */
.work {
  position: relative; z-index: 2;
  padding: 60px 0 140px;
}
.work-grid {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.work-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1), border-color 0.4s;
  display: flex; flex-direction: column;
}
.work-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); }
.work-thumb {
  aspect-ratio: 5/3.5;
  overflow: hidden;
  position: relative;
}
.thumb-art {
  width: 100%; height: 100%;
  transition: transform 0.7s cubic-bezier(0.2,0.8,0.2,1);
}
.work-card:hover .thumb-art { transform: scale(1.06); }
.work-meta { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.work-tags span {
  font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted);
}
.work-card h3 {
  font-size: 26px; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 10px;
}
.work-card p {
  color: var(--muted); font-size: 14px; line-height: 1.6;
  margin-bottom: 22px; flex: 1;
}
.work-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--accent);
  font-weight: 500;
  align-self: flex-start;
}
.work-link svg { transition: transform 0.3s; }
.work-card:hover .work-link svg { transform: translate(3px, -3px); }

/* ============ ABOUT ============ */
.about {
  position: relative; z-index: 2;
  padding: 0 0 140px;
}
.about-grid {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-text .lead {
  font-size: 22px; line-height: 1.5;
  color: var(--text); margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.about-text .lead strong { color: var(--accent); font-weight: 500; }
.about-text p {
  color: var(--muted); font-size: 16px; line-height: 1.65;
  margin-bottom: 16px;
}
.about-stack { margin-top: 36px; }
.stack-label {
  display: block; color: var(--accent); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 16px;
}

/* Experience timeline */
.experience-timeline {
  margin-top: 44px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  position: relative;
}
.experience-timeline .stack-label {
  margin-left: -28px; padding-left: 28px;
  position: relative;
}
.experience-timeline .stack-label::before {
  content: ''; position: absolute; left: -5px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.exp-item {
  position: relative;
  margin-bottom: 32px;
  padding-bottom: 4px;
}
.exp-item::before {
  content: ''; position: absolute;
  left: -33px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  transition: background 0.3s;
}
.exp-item:hover::before { background: var(--accent); }
.exp-head {
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.exp-head h4 {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.exp-tag {
  display: inline-block;
  font-size: 10px; font-weight: 500;
  padding: 2px 8px; margin-left: 6px;
  border-radius: 999px;
  background: rgba(212,255,62,0.12);
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}
.exp-date {
  font-size: 12px; color: var(--muted-2);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.exp-company {
  display: block;
  font-size: 13px; color: var(--accent);
  margin-bottom: 8px;
  font-weight: 500;
}
.exp-item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 14px;
}
.exp-item p strong {
  color: var(--text); font-weight: 500;
}
.exp-stack {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.exp-stack span {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.exp-stack span:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-tags span {
  font-size: 13px; padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}
.stack-tags span:hover { border-color: var(--accent); color: var(--accent); }
.about-side { display: flex; flex-direction: column; gap: 14px; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 6px;
}
.info-card.highlight {
  background: linear-gradient(180deg, rgba(212,255,62,0.08), var(--surface));
  border-color: rgba(212,255,62,0.3);
}
.info-label {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-2);
}
.info-value {
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(212,255,62,0.5);
  animation: ringPulse 2s ease-out infinite;
}
@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(212,255,62,0.5); }
  100% { box-shadow: 0 0 0 12px rgba(212,255,62,0); }
}

/* ============ CONTACT ============ */
.contact {
  position: relative; z-index: 2;
  padding: 80px 0 100px;
  border-top: 1px solid var(--line);
}
.contact-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad-x);
  text-align: center;
}
.contact-headline {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 24px 0;
}
.contact-headline em, .contact-headline i {
  font-family: 'Instrument Serif',serif;
  font-style: italic; font-weight: 400;
  color: var(--accent);
}
.contact-desc {
  color: var(--muted); font-size: 17px; max-width: 520px;
  margin: 0 auto 44px;
}
.email-cta {
  display: inline-flex; align-items: center; gap: 20px;
  padding: 22px 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.email-cta:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(212,255,62,0.25);
}
.email-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  transition: transform 0.3s;
}
.email-cta:hover .email-arrow {
  background: #000; color: var(--accent);
  transform: rotate(45deg);
}
.contact-links {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 30px;
  margin-top: 48px;
}
.contact-links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted);
  transition: color 0.2s;
}
.contact-links a:hover { color: var(--accent); }

/* ============ FOOTER ============ */
.footer {
  position: relative; z-index: 2;
  padding: 32px var(--pad-x);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.footer-row {
  max-width: var(--container); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.footer-brand i { color: var(--accent); font-style: normal; font-family: 'Instrument Serif',serif; }
.footer-copy { color: var(--muted-2); }
.footer-top { color: var(--muted); transition: color 0.2s; }
.footer-top:hover { color: var(--accent); }

/* ============ REVEAL ANIMATIONS ============ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 1s, transform 1s; }
.reveal.in { opacity: 1; transform: none; }
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity 0.9s, transform 0.9s; }
.reveal-up.in { opacity: 1; transform: none; }
.reveal-line > span { display: inline-block; transform: translateY(110%); transition: transform 0.9s cubic-bezier(0.2,0.8,0.2,1); }
.reveal-line.in > span { transform: none; }
.reveal-line:nth-child(2).in > span { transition-delay: 0.1s; }
.reveal-line:nth-child(3).in > span { transition-delay: 0.2s; }
.reveal-portrait { opacity: 0; transform: scale(0.95); transition: opacity 1.2s, transform 1.2s; }
.reveal-portrait.in { opacity: 1; transform: none; }

/* ============ CASE STUDY PAGES ============ */
.case-page {
  position: relative; z-index: 2;
  padding-top: 120px;
}
.case-hero {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad-x) 60px;
}
.case-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  margin-bottom: 32px;
  transition: color 0.2s;
}
.case-back:hover { color: var(--accent); }
.case-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.case-tags span {
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted);
}
.case-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 24px;
}
.case-title em { font-family: 'Instrument Serif',serif; font-style: italic; font-weight: 400; color: var(--accent); }
.case-lede {
  font-size: 20px; color: var(--muted);
  max-width: 720px; line-height: 1.55;
}
.case-thumb-large {
  max-width: var(--container); margin: 0 auto 80px;
  padding: 0 var(--pad-x);
}
.case-thumb-large > div {
  aspect-ratio: 16/8;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.case-thumb-large svg { width: 100%; height: 100%; }
.case-info-strip {
  max-width: var(--container); margin: 0 auto 80px;
  padding: 32px var(--pad-x);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.case-info-strip .info-block {
  display: flex; flex-direction: column; gap: 6px;
}
.case-info-strip .info-block span:first-child {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-2);
}
.case-info-strip .info-block span:last-child {
  font-size: 15px; font-weight: 500;
}
.case-content {
  max-width: 820px; margin: 0 auto;
  padding: 0 var(--pad-x);
}
.case-block { margin-bottom: 60px; }
.case-block h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600; letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.case-block h2 .num {
  color: var(--accent); font-family: 'Instrument Serif',serif;
  font-style: italic; font-weight: 400;
  margin-right: 12px;
}
.case-block p {
  font-size: 16px; line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}
.case-block p + p { margin-top: -4px; }
.case-block ul { margin: 18px 0; }
.case-block ul li {
  font-size: 15px; line-height: 1.65;
  color: rgba(255,255,255,0.85);
  padding-left: 24px;
  position: relative;
  margin-bottom: 10px;
}
.case-block ul li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 12px; height: 1px; background: var(--accent);
}
.case-block strong { color: var(--text); font-weight: 600; }
.case-block code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  background: rgba(212,255,62,0.08);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
.architecture-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.arch-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.arch-item span:first-child {
  display: block; font-size: 11px; letter-spacing: 0.1em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 6px;
}
.arch-item span:last-child { font-size: 14px; color: rgba(255,255,255,0.9); }
.stack-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0;
}
.stack-list span {
  font-size: 13px; padding: 7px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255,255,255,0.9);
}
.case-cta {
  margin: 100px 0 120px;
  padding: 60px var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--line);
}
.case-cta h3 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.case-cta h3 em { font-family: 'Instrument Serif',serif; font-style: italic; font-weight: 400; color: var(--accent); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-right { order: -1; }
  .services-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .case-info-strip { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .architecture-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .floating-tag { display: none; }
  .hero { padding: 120px 20px 60px; }
  .hero-meta { font-size: 12px; }
  .services { padding: 80px 0; }
  .work { padding: 40px 0 80px; }
  .about { padding-bottom: 80px; }
  .case-info-strip { grid-template-columns: 1fr; gap: 18px; }
  .footer-row { flex-direction: column; text-align: center; }
}
