/* ========================================
   七叶怀瑾 — Editorial Magazine Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Warm cream palette */
  --bg: #f7f4ef;
  --bg-alt: #efeae3;
  --bg-card: #fff;
  --bg-dark: #1a1816;

  --text: #1a1816;
  --text-secondary: #6b6560;
  --text-muted: #a39e98;
  --text-light: #c8c3bc;

  --accent: #b8860b;
  --accent-muted: rgba(184, 134, 11, 0.08);

  --border: #e2ddd6;
  --border-light: #ece8e1;

  /* Typography */
  --font-serif: "Playfair Display", "Noto Serif SC", Georgia, serif;
  --font-sans: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;

  /* Radius */
  --radius: 12px;

  /* Ease */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ========================================
   Reset
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto; /* We handle smooth scroll in JS */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

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

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

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

::selection {
  background: var(--accent-muted);
  color: var(--text);
}

/* ========================================
   Custom Cursor
   ======================================== */

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.15s ease, opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

.cursor-circle {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(26, 24, 22, 0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease), height 0.4s var(--ease),
              border-color 0.3s ease, background 0.3s ease;
}

/* Hover state — circle grows, dot hides */
.cursor-hover .cursor-dot {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.cursor-hover .cursor-circle {
  width: 64px;
  height: 64px;
  border-color: var(--accent);
  background: rgba(184, 134, 11, 0.06);
}

/* Text hover — blend mode */
.cursor-text .cursor-circle {
  width: 100px;
  height: 100px;
  background: var(--text);
  mix-blend-mode: difference;
  border-color: transparent;
}

.cursor-text .cursor-dot {
  opacity: 0;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  transition: all 0.5s var(--ease);
}

.nav.scrolled {
  padding: 16px 48px;
  background: rgba(247, 244, 239, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.nav-brand {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--text);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 160px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

/* ---- Hero Visual (right side) ---- */

.hero-visual {
  flex-shrink: 0;
  position: relative;
  width: 440px;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeInVisual 1.2s var(--ease) 0.6s forwards;
}

@keyframes fadeInVisual {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.hero-avatar-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.6s var(--ease);
}

.hero-avatar:hover {
  border-color: var(--text-muted);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
}

/* Inner ring */
.hero-avatar-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  animation: ringPulse 4s ease-in-out infinite;
  z-index: 1;
}

.hero-avatar-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  opacity: 0.4;
  animation: ringRotate 30s linear infinite;
}

/* Outer ring */
.hero-avatar-ring--outer {
  inset: -40px;
  border: 1px solid var(--border-light);
  opacity: 0.35;
  animation: ringPulse 5s ease-in-out infinite 1s;
}

.hero-avatar-ring--outer::after {
  display: none;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Decorative accent dots */
.hero-avatar-accent {
  position: absolute;
  border-radius: 50%;
  background: var(--text-muted);
  z-index: 1;
  opacity: 0;
  animation: fadeInVisual 1.2s var(--ease) 1.2s forwards;
}

.hero-avatar-accent--1 {
  width: 8px;
  height: 8px;
  top: 30px;
  right: 50px;
  opacity: 0.3;
  animation: accentFloat1 6s ease-in-out infinite;
}

.hero-avatar-accent--2 {
  width: 5px;
  height: 5px;
  bottom: 60px;
  left: 25px;
  opacity: 0.2;
  animation: accentFloat2 8s ease-in-out infinite 1s;
}

.hero-avatar-accent--3 {
  width: 12px;
  height: 12px;
  bottom: 20px;
  right: 30px;
  background: transparent;
  border: 1px solid var(--border);
  opacity: 0.4;
  animation: accentFloat3 7s ease-in-out infinite 0.5s;
}

@keyframes accentFloat1 {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-10px); opacity: 0.5; }
}

@keyframes accentFloat2 {
  0%, 100% { transform: translate(0, 0); opacity: 0.2; }
  50% { transform: translate(5px, -8px); opacity: 0.4; }
}

@keyframes accentFloat3 {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  50% { transform: translateY(-12px) rotate(180deg); opacity: 0.6; }
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.hero-label span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.8s var(--ease) 0.1s;
}

.hero-label.visible span {
  transform: translateY(0);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(72px, 12vw, 160px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

/* Each character animated individually */
.hero-title .char {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
}

.hero-title .char.visible {
  transform: translateY(0);
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.hero-subtitle .word {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.8s var(--ease), opacity 0.6s ease;
}

.hero-subtitle .word.visible {
  transform: translateY(0);
  opacity: 1;
}

.hero-desc {
  max-width: 520px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease) 0.8s;
}

.hero-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-scroll {
  position: absolute;
  bottom: 48px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
  opacity: 0;
  animation: fadeIn 0.6s ease 1.5s forwards;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--text-muted);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ========================================
   Marquee
   ======================================== */

.marquee-wrapper {
  overflow: hidden;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee 25s linear infinite;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  white-space: nowrap;
  padding: 0 24px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 24px;
}

.marquee-item::after {
  content: "✦";
  font-style: normal;
  font-size: 10px;
  color: var(--text-light);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   Sections — Shared
   ======================================== */

.section {
  padding: var(--space-2xl) 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ========================================
   About
   ======================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  align-items: start;
}

.about-text {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.about-text p + p {
  margin-top: 24px;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-quote {
  font-family: var(--font-serif);
  font-size: 24px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin: 40px 0;
  padding-left: 28px;
  border-left: 2px solid var(--text);
}

.about-details {
  padding-top: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-row:first-child {
  border-top: 1px solid var(--border-light);
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tech-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.3s var(--ease);
}

.tech-item:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ========================================
   Projects — Horizontal Scroll
   ======================================== */

.projects-outer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
}

.projects-header {
  padding: 0 48px;
  max-width: 1400px;
  margin: 0 auto var(--space-xl);
}

.projects-wrapper {
  position: relative;
}

.projects-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.projects-track {
  display: flex;
  gap: 40px;
  padding: 0 48px;
  will-change: transform;
}

.project-card {
  flex-shrink: 0;
  width: 520px;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card:hover {
  border-color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.project-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

.project-name {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.project-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.project-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: gap 0.3s var(--ease);
}

.project-link:hover {
  gap: 16px;
}

.project-link-arrow {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--text);
  position: relative;
  transition: width 0.3s var(--ease);
}

.project-link-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text);
  border-top: 1.5px solid var(--text);
  transform: rotate(45deg);
}

.project-link:hover .project-link-arrow {
  width: 36px;
}

/* Coming Soon card */
.project-card--coming {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.coming-symbol {
  font-size: 32px;
  color: var(--text-light);
  margin-bottom: 20px;
  font-family: var(--font-serif);
}

.coming-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  color: var(--text-muted);
}

.coming-sub {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 8px;
}

/* ========================================
   Content Section (Blog + Podcast)
   ======================================== */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: var(--space-xl);
}

.content-card {
  padding: 56px 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease;
}

.content-card:hover {
  border-color: var(--text-muted);
}

.content-card-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.1em;
  margin-bottom: 28px;
}

.content-card-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.content-card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Typewriter cursor */
.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Waveform */
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  margin-top: 28px;
}

.waveform-bar {
  width: 2px;
  border-radius: 1px;
  background: var(--text-muted);
  opacity: 0.3;
  animation: wave 1.4s ease-in-out infinite;
}

.waveform-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.waveform-bar:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.waveform-bar:nth-child(3) { height: 22px; animation-delay: 0.2s; }
.waveform-bar:nth-child(4) { height: 10px; animation-delay: 0.3s; }
.waveform-bar:nth-child(5) { height: 18px; animation-delay: 0.15s; }
.waveform-bar:nth-child(6) { height: 26px; animation-delay: 0.25s; }
.waveform-bar:nth-child(7) { height: 12px; animation-delay: 0.35s; }
.waveform-bar:nth-child(8) { height: 20px; animation-delay: 0.05s; }
.waveform-bar:nth-child(9) { height: 8px; animation-delay: 0.22s; }
.waveform-bar:nth-child(10) { height: 16px; animation-delay: 0.12s; }
.waveform-bar:nth-child(11) { height: 24px; animation-delay: 0.18s; }
.waveform-bar:nth-child(12) { height: 10px; animation-delay: 0.08s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.2); }
}

/* ========================================
   Footer
   ======================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 48px var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.7;
}

.footer-nav {
  display: flex;
  gap: 64px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-light);
}

/* ========================================
   Magnetic Button
   ======================================== */

.magnetic-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: 1.5px solid var(--text);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.magnetic-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  border-radius: inherit;
}

.magnetic-btn:hover::before {
  transform: translateY(0);
}

.magnetic-btn span {
  position: relative;
  z-index: 1;
  transition: color 0.4s ease;
}

.magnetic-btn:hover span {
  color: var(--bg);
}

/* ========================================
   Scrollbar (subtle)
   ======================================== */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  :root {
    --space-2xl: 80px;
  }

  .section, .hero, .projects-header {
    padding-left: 32px;
    padding-right: 32px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .project-card {
    width: 420px;
    padding: 36px;
  }

  .hero-visual {
    width: 300px;
    height: 300px;
  }

  .hero-avatar-wrapper {
    width: 200px;
    height: 200px;
  }

  .hero-flower {
    width: 90px;
    height: 90px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor-dot, .cursor-circle {
    display: none;
  }

  .nav {
    padding: 16px 20px;
  }

  .nav.scrolled {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    padding: 120px 20px 60px;
  }

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

  .hero-visual {
    width: 220px;
    height: 220px;
    order: -1;
    margin-bottom: 20px;
  }

  .hero-avatar-wrapper {
    width: 160px;
    height: 160px;
  }

  .hero-flower {
    width: 70px;
    height: 70px;
    top: -10px;
    right: -15px;
  }

  .hero-desc {
    max-width: 100%;
  }

  .section, .projects-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .projects-track {
    padding: 0 20px;
  }

  /* Disable horizontal scroll on mobile */
  .projects-wrapper {
    height: auto !important;
  }

  .projects-sticky {
    position: relative;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 0;
  }

  .projects-track {
    flex-direction: column;
    transform: none !important;
  }

  .project-card {
    width: 100%;
    padding: 28px;
  }

  .content-card {
    padding: 36px 24px;
  }

  .footer {
    padding: 48px 20px 32px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hero-scroll {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 56px;
  }

  .hero-subtitle {
    font-size: 22px;
  }

  .section-title {
    font-size: 32px;
  }

  .nav-links {
    display: none;
  }

  .marquee-item {
    font-size: 14px;
    padding: 0 16px;
  }
}

/* ========================================
   2026 Site Refresh
   ======================================== */

.nav-links a.nav-active {
  color: var(--text);
}

.nav-links a.nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--text);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--text);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button-link:hover {
  background: var(--text);
  color: var(--bg);
}

.button-link--ghost {
  border-color: var(--border);
  background: var(--bg-card);
}

.button-link--ghost:hover {
  border-color: var(--text);
}

.hero--home {
  min-height: auto;
  padding-bottom: 96px;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero--home .hero-title {
  font-size: clamp(54px, 9vw, 116px);
  line-height: 0.98;
  margin-bottom: 22px;
}

.hero-desc--home {
  opacity: 1;
  transform: none;
  transition: none;
  max-width: 620px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}

.summary-card,
.story-note,
.notes-aside,
.cta-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.summary-card {
  padding: 18px 20px;
}

.summary-label,
.story-note-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.summary-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.summary-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.hero-ledger {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: 250px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.hero-ledger-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-ledger-row:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.hero-ledger-row strong {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 32px;
  align-items: end;
  margin-bottom: var(--space-xl);
}

.section-head-side {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.section-intro {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.section-link::after,
.note-link::after,
.case-links a::after {
  content: "↗";
  font-size: 12px;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 360px);
  gap: 36px;
  align-items: start;
}

.story-copy {
  font-size: 17px;
  line-height: 1.95;
  color: var(--text-secondary);
}

.story-copy p + p {
  margin-top: 22px;
}

.story-copy strong {
  color: var(--text);
}

.story-rail {
  display: grid;
  gap: 14px;
}

.story-note {
  padding: 20px;
}

.story-note p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.case-meta,
.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.case-title,
.note-title,
.cta-title {
  font-family: var(--font-serif);
  color: var(--text);
}

.case-title {
  font-size: 30px;
  line-height: 1.15;
}

.case-desc,
.note-desc {
  font-size: 15px;
  line-height: 1.82;
  color: var(--text-secondary);
}

.case-scene {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 14px;
}

.scene-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.scene-panel--primary {
  background: rgba(26, 24, 22, 0.95);
  border-color: rgba(26, 24, 22, 0.95);
}

.scene-panel strong,
.scene-panel span {
  display: block;
}

.scene-panel strong {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}

.scene-panel span {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.scene-panel--primary strong,
.scene-panel--primary span {
  color: var(--bg);
}

.case-points,
.notes-aside-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.case-links a,
.note-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.note-card,
.notes-aside {
  min-height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.note-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.note-title {
  font-size: 28px;
  line-height: 1.22;
}

.notes-aside {
  display: grid;
  align-content: start;
  gap: 16px;
}

.notes-aside-title {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
}

.cta-panel {
  padding: 30px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 24px;
  align-items: center;
}

.cta-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.22;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1120px) {
  .case-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .story-layout,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .hero-summary {
    grid-template-columns: 1fr;
  }

  .hero-ledger {
    position: static;
    width: 100%;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .hero--home .hero-title {
    font-size: 54px;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button-link,
  .magnetic-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-links a {
    font-size: 12px;
  }
}

/* ========================================
   Advanced Layout
   ======================================== */

.pretext-balanced {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.06em;
  max-width: 100%;
  width: min(var(--pretext-width, 100%), 100%);
}

.pretext-line {
  display: block;
  width: fit-content;
}

.pretext-animated .pretext-line {
  opacity: 0;
  transform: translateY(18px);
  animation: pretext-line-in 0.7s var(--ease-out) forwards;
  animation-delay: calc(var(--line-index, 0) * 85ms);
}

@keyframes pretext-line-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title.pretext-balanced .pretext-line,
.page-title.pretext-balanced .pretext-line,
.featured-card-title.pretext-balanced .pretext-line,
.post-title.pretext-balanced .pretext-line {
  padding-right: 0.08em;
}

.page-title.pretext-balanced,
.post-title.pretext-balanced {
  margin-right: auto;
}

.spotlight-surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s var(--ease), border-color 0.28s ease, box-shadow 0.28s ease;
}

.spotlight-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    260px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(184, 134, 11, 0.16),
    rgba(184, 134, 11, 0.05) 28%,
    transparent 64%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 0;
}

.spotlight-surface > * {
  position: relative;
  z-index: 1;
}

.spotlight-surface:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 54px rgba(26, 24, 22, 0.08);
  border-color: rgba(26, 24, 22, 0.16);
}

.spotlight-surface:hover::after {
  opacity: 1;
}

.hero-ledger.spotlight-surface:hover,
.summary-card.spotlight-surface:hover,
.story-note.spotlight-surface:hover {
  transform: translateY(-2px);
}

.case-card.spotlight-surface:hover .case-scene,
.archive-card.spotlight-surface:hover .archive-visual,
.note-card.spotlight-surface:hover .note-link {
  transform: translateY(-2px);
}

.case-scene,
.archive-visual,
.note-link {
  transition: transform 0.28s var(--ease), gap 0.28s var(--ease);
}

.article-row.spotlight-surface {
  margin-left: -18px;
  margin-right: -18px;
  padding-left: 18px;
  padding-right: 18px;
  border-radius: 18px;
}

.article-row.spotlight-surface:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 768px) {
  .hero-title.pretext-balanced,
  .page-title.pretext-balanced,
  .post-title.pretext-balanced {
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    text-align: center;
  }

  .article-row.spotlight-surface {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0;
    background: transparent;
  }
}
