/* ============================================================
   林安 — 个人网站
   3 种极简风格变体: editorial (刊物) / quiet (静谧) / grid (格物)
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "ss02", "cv11";
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
button { cursor: none; background: none; border: 0; color: inherit; font: inherit; padding: 0; }
img { display: block; max-width: 100%; }
::selection { background: var(--fg); color: var(--bg); }

/* ----- THEMES --------------------------------------------- */
:root {
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 144px; --s-11: 200px;
  --page-max: 1280px;
  --font-script: "Italianno", "EB Garamond", cursive;
  --font-flourish: "Cormorant Garamond", "EB Garamond", "Source Han Serif SC", "Noto Serif SC", serif;
  --luma-grad: linear-gradient(135deg, #7E2BC9 0%, #B53AAF 35%, #F5A623 70%, #F77433 100%);
  --luma-purple: #7E2BC9;
  --luma-orange: #F77433;
  --luma-gold: #F5A623;
}

[data-style="editorial"] {
  --bg: #F6F4EE;
  --bg-soft: #ECE9DF;
  --fg: #14110D;
  --muted: #6E6A60;
  --line: rgba(20,17,13,0.14);
  --accent: #14110D;
  --tag: #14110D;
  --font-display: "EB Garamond", "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
  --font-body: "EB Garamond", "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
  --font-sans: "Inter", "Noto Sans SC", system-ui, sans-serif;
}

[data-style="quiet"] {
  --bg: #FBFBFB;
  --bg-soft: #F2F2F4;
  --fg: #111114;
  --muted: #8A8A93;
  --line: rgba(17,17,20,0.08);
  --accent: #7E2BC9;
  --tag: #111114;
  --font-display: "Inter", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
  --font-sans: "Inter", "Noto Sans SC", system-ui, sans-serif;
}

[data-style="grid"] {
  --bg: #EFEDE7;
  --bg-soft: #E5E2DA;
  --fg: #1A1A18;
  --muted: #88857C;
  --line: rgba(26,26,24,0.18);
  --accent: #1A1A18;
  --tag: #1A1A18;
  --font-display: "JetBrains Mono", "Noto Sans SC", monospace;
  --font-body: "Inter", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
  --font-sans: "Inter", "Noto Sans SC", system-ui, sans-serif;
}

/* dark variant overrides */
.dark[data-style="editorial"] { --bg:#14110D; --bg-soft:#1E1A14; --fg:#F6F4EE; --muted:#A7A294; --line:rgba(246,244,238,0.16); --accent:#F6F4EE; --tag:#F6F4EE; }
.dark[data-style="quiet"]     { --bg:#0B0B0E; --bg-soft:#16161B; --fg:#F1F1F4; --muted:#73737C; --line:rgba(255,255,255,0.08); --accent:#8A95F2; --tag:#F1F1F4; }
.dark[data-style="grid"]      { --bg:#161613; --bg-soft:#1F1F1B; --fg:#EAE7DD; --muted:#7C7A71; --line:rgba(234,231,221,0.18); --accent:#EAE7DD; --tag:#EAE7DD; }

/* ============================================================
   FLOURISH — script + decorative serif italic for <em> accents
   applied to editorial variant most strongly
   ============================================================ */
[data-style="editorial"] .hero-display em,
[data-style="editorial"] .section-title em,
[data-style="editorial"] .contact-display em,
[data-style="editorial"] .bento-title em,
[data-style="editorial"] .marquee-item em,
[data-style="editorial"] .about-text em.flourish,
[data-style="editorial"] .pp-pn-card em {
  font-family: var(--font-flourish);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
[data-style="editorial"] .hero-display em { font-weight: 400; }

/* True script font for signatures + special moments (editorial only) */
.signature {
  font-family: var(--font-script);
  font-style: normal;
  font-size: 1.6em;
  line-height: 0.7;
  letter-spacing: 0.01em;
  color: var(--fg);
  vertical-align: -0.05em;
}
[data-style="editorial"] .signature { font-size: 1.9em; }
[data-style="grid"] .signature, [data-style="quiet"] .signature { font-family: var(--font-flourish); font-style: italic; font-size: 1.05em; }
.page { position: relative; }
.container { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--s-6); }
@media (max-width: 720px) { .container { padding: 0 var(--s-5); } }

/* ============================================================
   AMBIENT GRID BG (canvas)
   ============================================================ */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.85;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0.3) 75%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0.3) 75%, transparent 100%);
}
.page, .nav, .scroll-progress, .twk-panel, .cursor-dot, .cursor-ring, .crosshair, .crosshair-coord, .work-preview { position: relative; z-index: 1; }
.nav { z-index: 100; }
.scroll-progress { z-index: 200; }
.twk-panel { z-index: 1000; }
.cursor-dot, .cursor-ring { z-index: 9999; }

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--line); }
.scroll-progress-bar { height: 100%; background: var(--fg); transform-origin: left center; transform: scaleX(0); transition: transform 80ms linear; }

/* ============================================================
   CROSSHAIR
   ============================================================ */
.crosshair { position: fixed; pointer-events: none; z-index: 50; background: var(--fg); opacity: 0.07; transition: opacity .2s; }
.crosshair-h { left: 0; right: 0; top: 0; height: 1px; will-change: transform; }
.crosshair-v { top: 0; bottom: 0; left: 0; width: 1px; will-change: transform; }
.crosshair-coord {
  position: fixed; right: 20px; bottom: 64px; z-index: 50; pointer-events: none;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  background: color-mix(in oklab, var(--bg) 80%, transparent); padding: 4px 8px;
  border: 1px solid var(--line); border-radius: 2px; letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}
@media (max-width: 720px) { .crosshair, .crosshair-coord { display: none; } }

/* ============================================================
   LAYOUT
   ============================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; left: 0; top: 0; pointer-events: none; z-index: 9999;
  will-change: transform; mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.cursor-ring { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #fff; transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease; }
.cursor-ring.is-hover { width: 60px; height: 60px; background: rgba(255,255,255,0.08); }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } body { cursor: auto; } button, a { cursor: pointer; } }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: var(--s-5) 0;
  transition: backdrop-filter .3s ease, background .3s ease;
}
.nav.scrolled { backdrop-filter: blur(14px); background: color-mix(in oklab, var(--bg) 70%, transparent); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); }
.nav-brand { font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; display: flex; align-items: center; gap: var(--s-3); }
.nav-brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--fg); position: relative; }
[data-style="grid"] .nav-brand-mark { border-radius: 2px; }
[data-style="grid"] .nav-brand { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
[data-style="quiet"] .nav-brand { font-weight: 600; font-size: 15px; }
.nav-links { display: flex; align-items: center; gap: var(--s-6); }
.nav-links a { font-family: var(--font-sans); font-size: 13px; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
[data-style="editorial"] .nav-links a { font-family: var(--font-display); font-size: 16px; font-style: italic; }
[data-style="grid"] .nav-links a { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.nav-time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.05em; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 180px 0 var(--s-10); position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; }
.hero-meta { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--s-5); font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); margin-bottom: var(--s-9); }
.hero-meta-label { display: block; font-size: 10px; opacity: 0.7; margin-bottom: 4px; }
.hero-meta-value { color: var(--fg); font-size: 12px; }
.hero-meta-value .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2EA56C; margin-right: 6px; vertical-align: middle; animation: pulse 2s ease-in-out infinite; }

.hero-display { font-family: var(--font-display); font-weight: 400; line-height: 0.94; letter-spacing: -0.035em; }
[data-style="editorial"] .hero-display {
  font-family: "EB Garamond", "ZCOOL XiaoWei", "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(64px, 13vw, 220px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
/* ============================================================
   林安 emphasis — GLITCH (RGB chromatic aberration + jitter)
   ============================================================ */
[data-style="editorial"] .hero-display em.emp {
  font-family: "ZCOOL QingKe HuangYou", "ZCOOL XiaoWei", serif;
  font-style: normal;
  font-weight: 400;
  display: inline-block;
  position: relative;
  isolation: isolate;
  vertical-align: baseline;
  color: var(--fg);
  letter-spacing: 0.05em;
  padding: 0 0.04em;
  animation: glitch-jitter 4.6s infinite steps(1, end);
}
[data-style="editorial"] .hero-display em.emp > span { display: inline-block; position: relative; }

[data-style="editorial"] .hero-display em.emp::before,
[data-style="editorial"] .hero-display em.emp::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding: 0 0.04em;
  letter-spacing: 0.05em;
  pointer-events: none;
  mix-blend-mode: screen;
}
[data-style="editorial"] .hero-display em.emp::before {
  color: #FF2BD6;
  transform: translate(-3px, 0);
  z-index: -1;
  animation: glitch-shift-m 3.4s infinite ease-in-out;
}
[data-style="editorial"] .hero-display em.emp::after {
  color: #00E0FF;
  transform: translate(3px, 0);
  z-index: -2;
  animation: glitch-shift-c 3.4s infinite ease-in-out reverse;
}
/* scanline overlay on each character */
[data-style="editorial"] .hero-display em.emp > span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0 2px, transparent 2px 4px);
  pointer-events: none;
  mix-blend-mode: multiply;
}
@keyframes glitch-jitter {
  0%, 88%, 100% { transform: translate(0, 0); clip-path: none; }
  90% { transform: translate(3px, -1px); }
  91% { transform: translate(-2px, 2px); clip-path: inset(20% 0 50% 0); }
  92% { transform: translate(1px, 0); clip-path: none; }
  93% { transform: translate(-4px, 1px); clip-path: inset(60% 0 5% 0); }
  94% { transform: translate(0, 0); clip-path: none; }
}
@keyframes glitch-shift-m {
  0%,100% { transform: translate(-2px, 0); }
  50%     { transform: translate(-5px, 1px); }
}
@keyframes glitch-shift-c {
  0%,100% { transform: translate(2px, 0); }
  50%     { transform: translate(5px, -1px); }
}

[data-style="quiet"] .hero-display { font-size: clamp(54px, 10vw, 168px); font-weight: 500; letter-spacing: -0.045em; }
[data-style="quiet"] .hero-display em { font-style: normal; background: var(--luma-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-style="grid"] .hero-display { font-size: clamp(48px, 9vw, 144px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
[data-style="grid"] .hero-display em { font-style: normal; color: var(--muted); }

.hero-line { overflow: hidden; padding: 4px 0; }
.hero-line > span { display: block; }
.reveal-up { transform: translateY(110%); transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1); }
.revealed .reveal-up, .hero.revealed .reveal-up { transform: translateY(0); }

.hero-bottom { margin-top: var(--s-9); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: end; }
@media (max-width: 720px) { .hero-bottom { grid-template-columns: 1fr; gap: var(--s-6); } .hero-meta { grid-template-columns: 1fr 1fr; row-gap: var(--s-4); } }

.hero-tagline { max-width: 440px; font-size: 18px; line-height: 1.55; color: var(--muted); }
[data-style="editorial"] .hero-tagline { font-size: 20px; font-style: italic; line-height: 1.45; }
[data-style="grid"] .hero-tagline { font-size: 14px; font-family: var(--font-sans); line-height: 1.6; }

.hero-scroll { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; justify-self: end; }
.hero-scroll-line { width: 80px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform: translateX(-100%); animation: scrollIndicator 2.4s ease-in-out infinite; }
@keyframes scrollIndicator { 0% { transform: translateX(-100%); } 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* aurora blob for quiet variant */
[data-style="quiet"] .hero::before {
  content: ""; position: absolute; top: 10%; right: -10%; width: 60vw; height: 60vw; max-width: 800px; max-height: 800px;
  background: radial-gradient(circle, color-mix(in oklab, var(--luma-purple) 25%, transparent), transparent 65%);
  filter: blur(40px); pointer-events: none; z-index: 0; animation: float 18s ease-in-out infinite;
}
[data-style="quiet"] .hero::after {
  content: ""; position: absolute; bottom: 20%; left: -10%; width: 50vw; height: 50vw; max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, color-mix(in oklab, var(--luma-orange) 22%, transparent), transparent 65%);
  filter: blur(40px); pointer-events: none; z-index: 0; animation: float 22s ease-in-out infinite reverse;
}
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, 30px); } }
.hero > * { position: relative; z-index: 1; }

/* grid lines for grid variant */
[data-style="grid"] .hero::after {
  content: ""; position: absolute; inset: 120px var(--s-6) 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.55;
  z-index: 0;
}

/* ============================================================
   SECTION HEAD
   ============================================================ */
.section { padding: var(--s-10) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: var(--s-6); border-bottom: 1px solid var(--line); margin-bottom: var(--s-8); gap: var(--s-5); }
.section-num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.section-title { font-family: var(--font-display); font-size: clamp(40px, 6vw, 84px); font-weight: 400; letter-spacing: -0.03em; line-height: 1; }
[data-style="editorial"] .section-title em { font-style: italic; color: var(--muted); }
[data-style="quiet"] .section-title { font-weight: 500; letter-spacing: -0.04em; }
[data-style="grid"] .section-title { font-size: clamp(28px, 4vw, 52px); font-weight: 500; }
.section-aside { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; text-align: right; max-width: 220px; }

/* ============================================================
   NOW / 当下
   ============================================================ */
.now-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .now-grid { grid-template-columns: 1fr; } }
.now-cell { padding: var(--s-6) var(--s-5); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); position: relative; }
.now-cell:nth-child(3n) { border-right: 0; }
@media (max-width: 720px) { .now-cell { border-right: 0; } }
.now-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--s-3); }
.now-value { font-family: var(--font-display); font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
[data-style="editorial"] .now-value { font-size: 26px; }
.now-meta { font-family: var(--font-sans); font-size: 12px; color: var(--muted); margin-top: var(--s-2); }

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-9); align-items: start; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: var(--s-7); } }
.about-text { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.4; letter-spacing: -0.01em; }
[data-style="editorial"] .about-text { font-size: clamp(24px, 2.5vw, 36px); }
[data-style="quiet"] .about-text { font-weight: 400; }
[data-style="grid"] .about-text { font-family: var(--font-body); font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; }
.about-text p + p { margin-top: var(--s-6); }
.about-text .quiet { color: var(--muted); }

.about-side { display: flex; flex-direction: column; gap: var(--s-6); }
.about-block-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); }
.about-list { display: flex; flex-direction: column; }
.about-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-family: var(--font-sans); font-size: 13px; }
.about-list li:last-child { border-bottom: 0; }
.about-list .role { color: var(--fg); }
.about-list .year { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.skills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.skills span { font-family: var(--font-mono); font-size: 11px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
[data-style="grid"] .skills span { border-radius: 2px; }

/* ============================================================
   WORKS
   ============================================================ */
.works-list { display: flex; flex-direction: column; }
.work {
  display: grid; grid-template-columns: 80px 1fr 240px 100px;
  gap: var(--s-5); align-items: center;
  padding: var(--s-5) 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: padding .35s cubic-bezier(0.2,0.7,0.1,1);
}
.work:last-child { border-bottom: 1px solid var(--line); }
.work::before {
  content: ""; position: absolute; left: 0; top: 0; width: 0; height: 1px; background: var(--fg);
  transition: width .55s cubic-bezier(0.2,0.7,0.1,1);
}
.work:hover::before { width: 100%; }
.work:hover { padding-left: var(--s-4); }
@media (max-width: 720px) { .work { grid-template-columns: 50px 1fr 60px; gap: var(--s-4); } .work-type { display: none; } }
.work-year { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.work-title { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -0.02em; }
[data-style="editorial"] .work-title { font-weight: 400; }
[data-style="quiet"] .work-title { font-weight: 500; }
[data-style="grid"] .work-title { font-size: clamp(18px, 1.8vw, 24px); font-weight: 500; }
.work-type { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.work-arrow { justify-self: end; font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: gap .3s, color .3s; }
.work:hover .work-arrow { gap: 14px; color: var(--fg); }
.work-arrow svg { transition: transform .3s; }
.work:hover .work-arrow svg { transform: translateX(4px) translateY(-4px); }

/* Work preview that pops out on hover */
.work-preview { position: fixed; pointer-events: none; z-index: 50; width: 320px; height: 220px; transform: translate(-50%, -50%); opacity: 0; transition: opacity .25s ease; overflow: hidden; }
.work-preview.show { opacity: 1; }
.work-preview .ws { width: 100%; height: 100%; background: var(--bg-soft); border-radius: 4px; }
[data-style="grid"] .work-preview .ws { border-radius: 0; }
.work-preview .ws::after { content: attr(data-label); position: absolute; bottom: 10px; left: 12px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* ============================================================
   PHOTOGRAPHY
   ============================================================ */
.photo-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-3); grid-auto-rows: 80px; }
.photo { position: relative; overflow: hidden; }
.photo image-slot { width: 100%; height: 100%; }
.p1 { grid-column: span 5; grid-row: span 5; }
.p2 { grid-column: span 4; grid-row: span 3; }
.p3 { grid-column: span 3; grid-row: span 4; }
.p4 { grid-column: span 4; grid-row: span 2; }
.p5 { grid-column: span 3; grid-row: span 3; }
.p6 { grid-column: span 5; grid-row: span 3; }
.p7 { grid-column: span 4; grid-row: span 3; }
@media (max-width: 720px) { .photo-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 70px; }
  .p1 { grid-column: span 4; grid-row: span 4; }
  .p2 { grid-column: span 2; grid-row: span 3; }
  .p3 { grid-column: span 2; grid-row: span 3; }
  .p4 { grid-column: span 2; grid-row: span 2; }
  .p5 { grid-column: span 2; grid-row: span 2; }
  .p6 { grid-column: span 4; grid-row: span 3; }
  .p7 { grid-column: span 4; grid-row: span 3; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: var(--s-10) 0 var(--s-9); border-top: 1px solid var(--line); margin-top: var(--s-9); }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-9); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: var(--s-7); } }
.contact-display { font-family: var(--font-display); font-size: clamp(40px, 5.5vw, 76px); font-weight: 400; line-height: 1.05; letter-spacing: -0.03em; }
[data-style="editorial"] .contact-display em { font-style: italic; color: var(--muted); }
[data-style="quiet"] .contact-display { font-weight: 500; }
[data-style="grid"] .contact-display { font-size: clamp(28px, 3.8vw, 48px); font-weight: 500; }
.contact-email { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-mono); font-size: 14px; color: var(--fg); margin-top: var(--s-6); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 100px; transition: border-color .2s, background .2s; }
.contact-email:hover { background: var(--bg-soft); border-color: var(--fg); }
[data-style="grid"] .contact-email { border-radius: 2px; }

.contact-links { display: flex; flex-direction: column; }
.contact-link { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4) 0; border-top: 1px solid var(--line); font-family: var(--font-sans); font-size: 14px; transition: padding .3s; position: relative; overflow: hidden; }
.contact-link:last-child { border-bottom: 1px solid var(--line); }
.contact-link:hover { padding-left: var(--s-3); }
.contact-link .handle { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
[data-style="editorial"] .contact-link { font-family: var(--font-display); font-size: 18px; font-style: italic; }

/* ============================================================
   STUDIO — Luma Studio side venture
   ============================================================ */
.studio { padding: var(--s-10) 0; position: relative; }
.studio-card {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-soft);
}
[data-style="grid"] .studio-card { border-radius: 0; }
[data-style="editorial"] .studio-card, [data-style="quiet"] .studio-card { border-radius: 12px; }

/* gradient atmosphere */
.studio-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(at 18% 30%, color-mix(in oklab, var(--luma-purple) 32%, transparent) 0%, transparent 45%),
    radial-gradient(at 82% 70%, color-mix(in oklab, var(--luma-orange) 32%, transparent) 0%, transparent 45%),
    radial-gradient(at 50% 50%, color-mix(in oklab, var(--luma-gold) 14%, transparent) 0%, transparent 60%);
  opacity: 0.85;
  pointer-events: none;
}
.studio-card::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.dark .studio-card::before { opacity: 1; }

.studio-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  min-height: 480px;
}
@media (max-width: 900px) { .studio-grid { grid-template-columns: 1fr; } }

.studio-left {
  padding: var(--s-7) var(--s-7);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: var(--s-6);
  border-right: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(20px);
}
@media (max-width: 900px) { .studio-left { border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s-6); } }

.studio-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 100px;
  width: max-content;
}
[data-style="grid"] .studio-tag { border-radius: 2px; }
.studio-tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--luma-gold); box-shadow: 0 0 8px var(--luma-gold); animation: pulse 2s infinite; }

.studio-name {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  background: var(--luma-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-style="editorial"] .studio-name { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.03em; }
[data-style="grid"] .studio-name { font-family: var(--font-body); font-weight: 600; font-size: clamp(40px, 6vw, 72px); }

.studio-sub {
  font-family: var(--font-flourish); font-style: italic;
  font-size: 22px; color: var(--muted); margin-top: var(--s-2);
}
[data-style="grid"] .studio-sub { font-family: var(--font-body); font-style: normal; font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; }

.studio-desc {
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.65; color: var(--muted);
  max-width: 420px;
}
[data-style="editorial"] .studio-desc { font-family: var(--font-display); font-size: 18px; line-height: 1.55; }

.studio-meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
.studio-meta-row { display: flex; flex-direction: column; gap: 4px; }
.studio-meta-row .lbl { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.studio-meta-row strong { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--fg); }

.studio-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--fg); color: var(--bg);
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.12em;
  border-radius: 4px;
  width: max-content;
  transition: transform .25s, opacity .25s;
}
[data-style="grid"] .studio-cta { border-radius: 0; }
.studio-cta:hover { transform: translateY(-2px); }
.studio-cta-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--luma-gold); }

/* right side — visual showcase of the logo */
.studio-right {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: var(--s-7);
  overflow: hidden;
}
.studio-mark {
  position: relative; z-index: 2;
  width: min(72%, 420px);
  filter: drop-shadow(0 8px 30px rgba(126, 43, 201, 0.25)) drop-shadow(0 4px 14px rgba(247, 116, 51, 0.18));
  animation: studio-float 8s ease-in-out infinite;
}
@keyframes studio-float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }

/* halo pulse behind the mark */
.studio-halo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--luma-gold) 60%, transparent), transparent 70%);
  filter: blur(40px);
  animation: pulse-halo 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulse-halo { 0%,100% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.95); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }

/* corner brackets reinforcing studio chrome */
.studio-corner { position: absolute; width: 18px; height: 18px; z-index: 3; pointer-events: none; opacity: 0.65; }
.studio-corner.tl { top: 14px; left: 14px; border-top: 1px solid var(--fg); border-left: 1px solid var(--fg); }
.studio-corner.tr { top: 14px; right: 14px; border-top: 1px solid var(--fg); border-right: 1px solid var(--fg); }
.studio-corner.bl { bottom: 14px; left: 14px; border-bottom: 1px solid var(--fg); border-left: 1px solid var(--fg); }
.studio-corner.br { bottom: 14px; right: 14px; border-bottom: 1px solid var(--fg); border-right: 1px solid var(--fg); }

.studio-stamp {
  position: absolute; bottom: 18px; right: 18px; z-index: 3;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* ============================================================
   WORKS — image grid for design pieces
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
@media (max-width: 900px) { .works-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); } }
@media (max-width: 540px) { .works-grid { grid-template-columns: 1fr; } }

.work-card {
  display: flex; flex-direction: column; gap: var(--s-3);
  cursor: none;
  transition: transform .45s cubic-bezier(0.2,0.7,0.1,1);
}
.work-card:hover { transform: translateY(-4px); }

.work-cover {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transition: border-color .3s;
}
[data-style="grid"] .work-cover { border-radius: 0; }
[data-style="editorial"] .work-cover, [data-style="quiet"] .work-cover { border-radius: 4px; }
.work-card:hover .work-cover { border-color: var(--fg); }

.work-cover image-slot { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .8s cubic-bezier(0.2,0.7,0.1,1); }
.work-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(0.2,0.7,0.1,1); }
.work-card:hover .work-cover image-slot,
.work-card:hover .work-cover-img { transform: scale(1.04); }

.work-cover-corner { position: absolute; width: 12px; height: 12px; z-index: 2; opacity: 0.6; transition: opacity .3s, width .35s, height .35s; pointer-events: none; }
.work-card:hover .work-cover-corner { opacity: 1; width: 18px; height: 18px; }
.work-cover-corner.tl { top: 8px; left: 8px; border-top: 1px solid rgba(255,255,255,0.85); border-left: 1px solid rgba(255,255,255,0.85); }
.work-cover-corner.tr { top: 8px; right: 8px; border-top: 1px solid rgba(255,255,255,0.85); border-right: 1px solid rgba(255,255,255,0.85); }
.work-cover-corner.bl { bottom: 8px; left: 8px; border-bottom: 1px solid rgba(255,255,255,0.85); border-left: 1px solid rgba(255,255,255,0.85); }
.work-cover-corner.br { bottom: 8px; right: 8px; border-bottom: 1px solid rgba(255,255,255,0.85); border-right: 1px solid rgba(255,255,255,0.85); }

.work-cover-tag {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.9);
  text-transform: uppercase; letter-spacing: 0.12em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.work-card-info { padding: 4px 2px; display: flex; flex-direction: column; gap: 6px; }
.work-card-row { display: flex; justify-content: space-between; align-items: center; }
.work-card-year { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.work-card-arrow { color: var(--muted); transition: transform .3s, color .3s; display: inline-flex; }
.work-card:hover .work-card-arrow { color: var(--fg); transform: translate(3px, -3px); }
.work-card-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px); line-height: 1.25; letter-spacing: -0.02em;
}
[data-style="quiet"] .work-card-title { font-weight: 500; }
[data-style="grid"] .work-card-title { font-size: 16px; font-weight: 500; font-family: var(--font-body); }
.work-card-desc { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }

/* ============================================================
   SHOWCASE / BENTO
   ============================================================ */
.bento { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--s-5); align-items: stretch; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr; } }

.bento-frame {
  position: relative; aspect-ratio: 16 / 10; min-height: 380px;
  border: 1px solid var(--line); background: #0A0A0E;
  overflow: hidden; cursor: none;
  transition: border-color .3s, transform .5s cubic-bezier(0.2,0.7,0.1,1);
}
[data-style="grid"] .bento-frame { border-radius: 0; }
[data-style="editorial"] .bento-frame, [data-style="quiet"] .bento-frame { border-radius: 6px; }
.bento-frame:hover { border-color: var(--fg); }
.bento-frame iframe { width: 100%; height: 100%; border: 0; display: block; transition: transform .8s cubic-bezier(0.2,0.7,0.1,1), filter .4s; pointer-events: none; }
.bento-frame.is-hover iframe { transform: scale(1.03); }

.bento-corner { position: absolute; width: 14px; height: 14px; z-index: 3; pointer-events: none; transition: width .35s, height .35s; }
.bento-frame.is-hover .bento-corner { width: 22px; height: 22px; }
.bento-corner.tl { top: 10px; left: 10px; border-top: 1px solid rgba(242,242,244,0.7); border-left: 1px solid rgba(242,242,244,0.7); }
.bento-corner.tr { top: 10px; right: 10px; border-top: 1px solid rgba(242,242,244,0.7); border-right: 1px solid rgba(242,242,244,0.7); }
.bento-corner.bl { bottom: 10px; left: 10px; border-bottom: 1px solid rgba(242,242,244,0.7); border-left: 1px solid rgba(242,242,244,0.7); }
.bento-corner.br { bottom: 10px; right: 10px; border-bottom: 1px solid rgba(242,242,244,0.7); border-right: 1px solid rgba(242,242,244,0.7); }

.bento-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(10,10,14,0.0), rgba(10,10,14,0.55));
  opacity: 0; transition: opacity .35s; z-index: 2; pointer-events: none;
}
.bento-frame.is-hover .bento-overlay { opacity: 1; }
.bento-launch {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 24px; border: 1px solid rgba(242,242,244,0.6); border-radius: 100px;
  color: #F2F2F4; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  backdrop-filter: blur(10px); background: rgba(10,10,14,0.4);
  transform: translateY(8px); transition: transform .35s;
}
.bento-frame.is-hover .bento-launch { transform: translateY(0); }
[data-style="grid"] .bento-launch { border-radius: 2px; }

.bento-status {
  position: absolute; bottom: 18px; left: 18px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid rgba(242,242,244,0.18); border-radius: 100px;
  background: rgba(10,10,14,0.55); backdrop-filter: blur(10px);
  color: rgba(242,242,244,0.85); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
}
[data-style="grid"] .bento-status { border-radius: 2px; }
.bento-dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 10px #34D399; animation: pulse 2s infinite ease-in-out; }

.bento-info { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5) var(--s-5); border: 1px solid var(--line); position: relative; background: color-mix(in oklab, var(--bg-soft) 50%, transparent); }
[data-style="grid"] .bento-info { border-radius: 0; }
[data-style="editorial"] .bento-info, [data-style="quiet"] .bento-info { border-radius: 6px; }
.bento-num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.bento-title { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -0.025em; line-height: 1.05; }
[data-style="editorial"] .bento-title em { font-style: italic; color: var(--muted); }
[data-style="quiet"] .bento-title em { font-style: normal; color: var(--accent); font-weight: 500; }
[data-style="grid"] .bento-title em { font-style: normal; color: var(--muted); }
.bento-desc { font-size: 14px; line-height: 1.55; color: var(--muted); font-family: var(--font-sans); }
[data-style="editorial"] .bento-desc { font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
.bento-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bento-grid > div { display: flex; flex-direction: column; gap: 2px; }
.bento-grid span { font-family: var(--font-mono); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.bento-grid strong { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--fg); }
.bento-grid strong.green { color: #2EA56C; }
.bento-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bento-tags span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--line); border-radius: 100px; }
[data-style="grid"] .bento-tags span { border-radius: 2px; }
.bento-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; background: var(--fg); color: var(--bg);
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  border-radius: 4px; transition: transform .2s, background .2s;
}
[data-style="grid"] .bento-cta { border-radius: 0; }
.bento-cta:hover { transform: translateY(-2px); }

.bento-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); margin-top: var(--s-5); }
@media (max-width: 720px) { .bento-row { grid-template-columns: 1fr; } }
.bento-small {
  border: 1px solid var(--line); padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
  transition: border-color .25s, transform .35s, background .25s;
  background: color-mix(in oklab, var(--bg-soft) 30%, transparent);
  min-height: 160px;
}
[data-style="grid"] .bento-small { border-radius: 0; }
[data-style="editorial"] .bento-small, [data-style="quiet"] .bento-small { border-radius: 6px; }
.bento-small:hover { border-color: var(--fg); transform: translateY(-3px); }
.bento-small-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.bento-small-title { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; }
.bento-small-meta { margin-top: auto; font-family: var(--font-sans); font-size: 12px; color: var(--muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { padding: var(--s-6) 0 var(--s-7); display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; border-top: 1px solid var(--line); gap: var(--s-4); }
.foot-left { display: flex; gap: var(--s-5); }
.foot-mid { display: flex; gap: var(--s-5); justify-content: center; }
.foot > div:last-child { text-align: right; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr; row-gap: 8px; } .foot-mid { justify-content: flex-start; } .foot > div:last-child { text-align: left; } }

/* ============================================================
   REVEAL HELPERS
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s cubic-bezier(0.2,0.7,0.1,1), transform 1s cubic-bezier(0.2,0.7,0.1,1); }
[data-reveal].revealed { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }
[data-reveal][data-delay="5"] { transition-delay: .4s; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: var(--s-4) 0; margin: var(--s-9) 0; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: var(--s-7); animation: marquee 38s linear infinite; }
.marquee-item { font-family: var(--font-display); font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.02em; font-weight: 400; }
[data-style="editorial"] .marquee-item em { font-style: italic; color: var(--muted); }
[data-style="grid"] .marquee-item { font-family: var(--font-mono); font-size: clamp(20px, 2.4vw, 32px); text-transform: uppercase; letter-spacing: 0.04em; }
.marquee-dot { display: inline-flex; align-items: center; color: var(--muted); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
