/* ============================================================
   Apple HIG — Romulo Scampini Portfolio
   SF Pro system stack, Apple semantic colors, generous space
   Reference: developer.apple.com/design + apple.com/apple-intelligence
   ============================================================ */

/* SF Pro font — Apple CDN + local @font-face fallback */
@import url("https://www.apple.com/wss/fonts?families=SF+Pro+Display,v3|SF+Pro+Text,v3|SF+Pro+Icons,v3");

/* Ensure SF Pro Display is available as a named family on all platforms */
@font-face {
  font-family: "SF Pro Display";
  src: local("SF Pro Display"), local(".SFNSDisplay-Regular"), local("SFProDisplay-Regular");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "SF Pro Display";
  src: local("SF Pro Display Bold"), local(".SFNSDisplay-Bold"), local("SFProDisplay-Bold");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "SF Pro Display";
  src: local("SF Pro Display Semibold"), local(".SFNSDisplay-Semibold"), local("SFProDisplay-Semibold");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "SF Pro Text";
  src: local("SF Pro Text"), local(".SFNSText-Regular"), local("SFProText-Regular");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "SF Pro Text";
  src: local("SF Pro Text Semibold"), local(".SFNSText-Semibold"), local("SFProText-Semibold");
  font-weight: 600;
  font-style: normal;
}

:root {
  /* Apple system colors — light */
  --sys-orange: #FF9500;
  --sys-orange-tint: #FFB340;
  --sys-blue: #007AFF;
  --sys-indigo: #5856D6;
  --sys-green: #34C759;
  --sys-red: #FF3B30;
  --sys-purple: #AF52DE;
  --sys-pink: #FF2D55;
  --sys-yellow: #FFCC00;

  /* Label hierarchy — Apple exact */
  --label-primary: #1d1d1f;
  --label-secondary: #6e6e73;
  --label-tertiary: #86868b;
  --label-quaternary: #aeaeb2;

  /* Fill hierarchy */
  --fill-primary: rgba(120,120,128,0.12);
  --fill-secondary: rgba(120,120,128,0.08);
  --fill-tertiary: rgba(120,120,128,0.05);

  /* Background — Apple website exact */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --bg-tertiary: #FBFBFD;
  --bg-elevated: #FFFFFF;
  --bg-dark-section: #000000;

  /* Separator */
  --separator: rgba(60,60,67,0.12);
  --separator-opaque: #D2D2D7;

  /* Materials (translucent overlay) */
  --material-thick: rgba(255,255,255,0.72);
  --material-regular: rgba(255,255,255,0.55);
  --material-thin: rgba(255,255,255,0.35);
  --material-border: rgba(0,0,0,0.06);

  /* Accent — Apple Blue */
  --accent: #007AFF;
  --accent-hover: #0071E3;
  --accent-soft: rgba(0, 122, 255, 0.10);
  --accent-tint: rgba(0, 122, 255, 0.14);

  /* Cosmic Orange — warm secondary accent */
  --cosmic-orange: #FF9500;
  --cosmic-orange-soft: rgba(255, 149, 0, 0.10);

  /* Apple button colors */
  --btn-blue: #0071E3;
  --btn-blue-hover: #0077ED;

  /* Shadows — Apple layered */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-md: 2px 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 8px 8px 16px 0 rgba(0,0,0,0.08);
  --shadow-xl: 2px 4px 16px rgba(0,0,0,0.08), 0 16px 48px rgba(0,0,0,0.12);
  --shadow-float: 0 20px 60px rgba(0,0,0,0.15), 0 4px 20px rgba(0,0,0,0.08);

  /* Radii — macOS Tahoe rounded */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 32px;
  --r-2xl: 40px;
  --r-pill: 980px;

  /* Liquid Glass materials */
  --glass-bg: rgba(255,255,255,0.15);
  --glass-bg-heavy: rgba(255,255,255,0.25);
  --glass-border: rgba(255,255,255,0.3);
  --glass-shadow: 0 8px 32px rgba(31,38,135,0.12);
  --glass-inset: inset 0 1px 0 rgba(255,255,255,0.4);
  --glass-blur: blur(12px) saturate(180%);

  /* Type scale — SF Pro HIG reference */
  --fs-caption2: 11px;
  --fs-caption1: 12px;
  --fs-footnote: 14px;
  --fs-subhead: 15px;
  --fs-callout: 16px;
  --fs-body: 17px;
  --fs-headline: 17px;
  --fs-title3: 20px;
  --fs-title2: 22px;
  --fs-title1: 28px;
  --fs-lgtitle: 34px;
  /* Apple marketing display scale */
  --fs-display-sm: 48px;
  --fs-display-md: 64px;
  --fs-display-lg: 96px;

  /* Spacing — 8pt grid */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Apple layout widths */
  --content-max: 1260px;
  --content-narrow: 980px;
  --content-medium: 692px;
}

[data-theme="dark"] {
  --label-primary: #F5F5F7;
  --label-secondary: #86868B;
  --label-tertiary: #6e6e73;
  --label-quaternary: #48484a;

  --fill-primary: rgba(120,120,128,0.36);
  --fill-secondary: rgba(120,120,128,0.24);
  --fill-tertiary: rgba(120,120,128,0.16);

  --bg-primary: #000000;
  --bg-secondary: #161617;
  --bg-tertiary: #1c1c1e;
  --bg-elevated: #1c1c1e;

  --separator: rgba(84,84,88,0.36);
  --separator-opaque: #38383A;

  --material-thick: rgba(28,28,30,0.82);
  --material-regular: rgba(28,28,30,0.60);
  --material-thin: rgba(28,28,30,0.40);
  --material-border: rgba(255,255,255,0.06);

  --accent: #0A84FF;
  --accent-hover: #409CFF;
  --accent-soft: rgba(10, 132, 255, 0.14);
  --accent-tint: rgba(10, 132, 255, 0.20);

  --cosmic-orange: #FF9F0A;
  --cosmic-orange-soft: rgba(255, 159, 10, 0.14);

  --btn-blue: #2997FF;
  --btn-blue-hover: #40A2FF;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
  --shadow-md: 2px 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 8px 8px 16px 0 rgba(0,0,0,0.5);
  --shadow-xl: 2px 4px 16px rgba(0,0,0,0.6), 0 16px 48px rgba(0,0,0,0.6);
  --shadow-float: 0 20px 60px rgba(0,0,0,0.6), 0 4px 20px rgba(0,0,0,0.4);

  --glass-bg: rgba(255,255,255,0.08);
  --glass-bg-heavy: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.15);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.4);
  --glass-inset: inset 0 1px 0 rgba(255,255,255,0.12);
  --glass-blur: blur(12px) saturate(180%);
}

/* Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
  color: var(--label-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.022em;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Selection */
::selection { background: var(--accent-tint); color: var(--label-primary); }

/* Focus ring — Apple HIG */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

button, a { font: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; padding: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   Scroll-triggered reveal — Apple style
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   Scroll gallery — Apple paddlenav (bottom-right)
   ============================================================ */
.scroll-gallery-wrap {
  position: relative;
}
.paddlenav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: var(--sp-5);
  padding-right: var(--sp-2);
}
.paddlenav__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--label-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, opacity 0.2s;
  opacity: 0.7;
}
.paddlenav__btn:hover {
  color: var(--label-primary);
  background: var(--fill-tertiary);
  opacity: 1;
}
.paddlenav__btn:active { opacity: 0.5; }
.paddlenav__btn:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}
@media (max-width: 734px) {
  .paddlenav { display: none; }
}

/* ============================================================
   Typography — apple.com exact values
   SF Pro Display for headings, SF Pro Text for body
   ============================================================ */
.display {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1.07143;
}

.eyebrow {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .011em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 19px;
  line-height: 1.42105;
  letter-spacing: .012em;
  color: var(--label-secondary);
  font-weight: 400;
}

.mono {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, "Roboto Mono", monospace;
}

/* ============================================================
   Nav — Apple translucent bar (48px)
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  z-index: 1000;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.nav__inner {
  max-width: 1024px;
  width: 100%;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-caption1);
  font-weight: 600;
  color: var(--label-primary);
  letter-spacing: -0.01em;
}
.nav__logo-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--label-primary);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.nav__link {
  font-size: var(--fs-caption1);
  color: var(--label-primary);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  transition: color 0.24s, background 0.24s;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.nav__link:hover { color: var(--label-primary); background: var(--fill-tertiary); }
.nav__link--active {
  color: var(--accent);
  font-weight: 500;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-caption1);
  color: var(--label-secondary);
  background: var(--fill-tertiary);
  transition: background 0.24s, color 0.24s, transform 0.15s;
}
.nav-btn:hover { background: var(--fill-primary); color: var(--label-primary); }
.nav-btn:active { transform: scale(0.97); }
.nav-btn__kbd {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  background: var(--bg-primary);
  border: 1px solid var(--separator);
  border-radius: 4px;
  color: var(--label-tertiary);
}

/* Language picker */
.lang-picker {
  position: relative;
}
.lang-picker__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--material-thick);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--separator);
  border-radius: var(--r-sm);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 56px;
  z-index: 1100;
}
.lang-picker__item {
  padding: 6px 12px;
  font-size: var(--fs-caption1);
  font-weight: 500;
  border-radius: 8px;
  color: var(--label-secondary);
  text-align: center;
  transition: background 0.15s, color 0.15s;
}
.lang-picker__item:hover {
  background: var(--fill-tertiary);
  color: var(--label-primary);
}
.lang-picker__item[data-active="true"] {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   Section scaffolding — Apple macOS flat color blocks
   ============================================================ */
section { position: relative; }
.section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 160px var(--sp-6);
}
@media (max-width: 1068px) { .section { padding-top: 128px; padding-bottom: 128px; } }
@media (max-width: 734px) { .section { padding-top: 96px; padding-bottom: 96px; } }
.section--narrow { max-width: var(--content-narrow); }
.section--flush { padding-top: 0; }

/* Apple-style gradient fade between sections */
.section-fade {
  height: 120px;
  pointer-events: none;
  position: relative;
  z-index: 0;
}
.section-fade--to-alt {
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}
.section-fade--alt-to-white {
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
}
.section__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1.07143;
  margin: 0 0 var(--sp-2) 0;
}
.section__subtitle {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--label-secondary);
  max-width: 520px;
  margin: 0;
  letter-spacing: .011em;
  line-height: 1.381;
}

/* Buttons — Apple HIG exact */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-callout);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.24s, color 0.24s, transform 0.15s, box-shadow 0.24s;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { transform: scale(0.97); }
.btn--secondary {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inset);
  color: var(--label-primary);
}
.btn--secondary:hover { background: var(--glass-bg-heavy); }
.btn--ghost { background: transparent; color: var(--accent); padding: 0 12px; }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--sm { height: 32px; padding: 0 14px; font-size: var(--fs-footnote); }
.btn--lg { height: 52px; padding: 0 28px; font-size: var(--fs-title3); }

.btn .chev { transition: transform 0.24s; }
.btn:hover .chev { transform: translateX(3px); }

/* Chip / pill — Apple tag style */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-caption1);
  font-weight: 500;
  background: var(--fill-secondary);
  color: var(--label-secondary);
  border: 1px solid var(--material-border);
  letter-spacing: -0.01em;
}
.chip--accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ============================================================
   Hero — Apple-style full-bleed with glow
   ============================================================ */
.hero {
  min-height: 100vh;
  padding: 120px var(--sp-8) var(--sp-20);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Apple-style radial glow behind hero */
.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 80%;
  background: radial-gradient(
    ellipse 50% 70% at 50% 30%,
    var(--accent-soft) 0%,
    rgba(255,149,0,0.04) 35%,
    rgba(175,82,222,0.03) 55%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .hero::before {
  background: radial-gradient(
    ellipse 50% 70% at 50% 30%,
    rgba(10,132,255,0.10) 0%,
    rgba(255,159,10,0.05) 35%,
    rgba(175,82,222,0.04) 55%,
    transparent 70%
  );
}

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

/* Apple SF Hello — official SVG lettering in nav */
.nav__hello {
  position: relative;
  height: 22px;
  width: 72px;
}
.nav__hello-svg {
  position: absolute;
  left: 0;
  top: 0;
  height: 22px;
  width: auto;
  opacity: 0;
  overflow: visible;
  animation: navHelloFade 12s ease-in-out infinite;
}
.nav__hello-svg path {
  stroke: var(--label-primary);
  stroke-width: 60;
  fill: none;
  stroke-linecap: round;
}
.nav__hello-svg:nth-child(1) { animation-delay: 0s; }
.nav__hello-svg:nth-child(2) { animation-delay: 2.4s; }
.nav__hello-svg:nth-child(3) { animation-delay: 4.8s; }
.nav__hello-svg:nth-child(4) { animation-delay: 7.2s; }
.nav__hello-svg:nth-child(5) { animation-delay: 9.6s; }
@keyframes navHelloFade {
  0%     { opacity: 0; transform: translateY(3px); }
  3%     { opacity: 1; transform: translateY(0); }
  17%    { opacity: 1; transform: translateY(0); }
  20%    { opacity: 0; transform: translateY(-3px); }
  100%   { opacity: 0; }
}

/* Hero badge — Liquid Glass pill */
.hero__pre {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 36px;
  padding: 0 18px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  font-size: var(--fs-footnote);
  color: var(--label-secondary);
  margin-bottom: var(--sp-8);
  letter-spacing: -0.016em;
}
.hero__pre .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sys-green);
  box-shadow: 0 0 0 4px rgba(52,199,89,0.2);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(52,199,89,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(52,199,89,0.0); }
}

.hero__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1.05;
  margin: 0 0 var(--sp-6) 0;
  max-width: 1100px;
  font-size: clamp(48px, 8vw, 96px);
}
/* Apple Intelligence gradient text effect */
.hero__title .grad {
  background: linear-gradient(108deg, #007AFF, #5856D6 30%, #C959DD 55%, #FF9004 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 700;
  padding-right: 0.15em;
  margin-right: -0.05em;
}
[data-theme="dark"] .hero__title .grad {
  background: linear-gradient(108deg, #0A84FF, #5E5CE6 30%, #C959DD 55%, #FF9F0A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__title .inline-emoji {
  display: inline-block;
  vertical-align: -0.08em;
  margin: 0 0.04em;
  -webkit-text-fill-color: initial;
}

.hero__sub {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(19px, 1.6vw, 28px);
  color: var(--label-secondary);
  max-width: 680px;
  margin: 0 auto var(--sp-10) auto;
  line-height: 1.381;
  letter-spacing: 0.004em;
  font-weight: 400;
}

.hero__ctas {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--sp-16);
}

/* Stats — Apple macOS clean style */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  max-width: 940px;
  margin-top: var(--sp-12);
}
.hero__stat {
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
  position: relative;
}
/* Vertical dividers between stats */
.hero__stat + .hero__stat::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 0;
  bottom: 20%;
  width: 1px;
  background: var(--separator);
}
.hero__stat-num {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--label-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero__stat-label {
  font-size: var(--fs-subhead);
  color: var(--label-tertiary);
  margin-top: 8px;
  letter-spacing: -0.016em;
}

@media (max-width: 860px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  /* Reset divider for 2-col: hide left divider on first item of each row */
  .hero__stat:nth-child(3)::before { display: block; }
  .hero__stat:nth-child(1)::before,
  .hero__stat:nth-child(3)::before {
    display: none;
  }
  /* Add top border for second row */
  .hero__stat:nth-child(n+3) {
    border-top: 1px solid var(--separator);
  }
}

/* ============================================================
   Projects — Apple carousel, clean cards
   ============================================================ */
.projects {
  background: var(--bg-secondary);
  padding: var(--sp-24) 0 var(--sp-16);
}
.projects__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* Horizontal scroll carousel */
.projects__carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 420px;
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 var(--sp-4);
  scrollbar-width: none;
}
.projects__carousel::-webkit-scrollbar { display: none; }
@media (max-width: 1068px) { .projects__carousel { grid-auto-columns: 360px; } }
@media (max-width: 734px) { .projects__carousel { grid-auto-columns: 300px; } }

.project-card {
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-card:hover {
  transform: scale(1.02);
}

.project-card__visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-primary);
  display: grid;
  place-items: center;
  position: relative;
}
[data-theme="dark"] .project-card__visual {
  background: #1d1d1f;
}

.project-card__body {
  padding: 18px 2px 0;
  display: flex;
  flex-direction: column;
}
.project-card__eyebrow {
  font-size: 12px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -.003em;
  margin-bottom: 6px;
}
.project-card__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .007em;
  line-height: 1.14286;
  margin: 0 0 10px 0;
  color: var(--label-primary);
  transition: color 0.24s;
}
.project-card:hover .project-card__title {
  color: var(--accent);
}
.project-card__desc {
  font-size: 17px;
  color: var(--label-secondary);
  line-height: 1.47059;
  margin: 0;
  letter-spacing: -.022em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Skills — Apple Intelligence style (dark, immersive)
   ============================================================ */
.sec-intelligence {
  background: #000000;
  color: #f5f5f7;
  padding: 160px 0;
  position: relative;
  overflow: hidden;
}
@media (max-width: 1068px) { .sec-intelligence { padding: 128px 0; } }
@media (max-width: 734px) { .sec-intelligence { padding: 96px 0; } }

/* Ambient glow behind header */
.sec-intelligence::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 50%;
  background: radial-gradient(
    ellipse 50% 80% at 50% 20%,
    rgba(0,122,255,0.08) 0%,
    rgba(255,149,0,0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.sec-intelligence__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.sec-intelligence__header {
  text-align: left;
  max-width: 700px;
  margin: 0 auto var(--sp-16) 0;
}
.sec-intelligence__eyebrow {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .012em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #6e86ff, #b86eff 33%, #ff6eb4 66%, #ff9f0a);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: eyebrowShimmer 4s linear infinite;
}
.sec-intelligence__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -.005em;
  line-height: 1.07143;
  margin: var(--sp-3) 0 var(--sp-4);
  color: #f5f5f7;
}
.sec-intelligence__sub {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: #86868b;
  line-height: 1.381;
  letter-spacing: .011em;
  margin: 0;
}

/* Skill cards — horizontal carousel, no card boxes */
.intelligence-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 380px;
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--sp-6) var(--sp-4);
  scrollbar-width: none;
}
.intelligence-gallery::-webkit-scrollbar { display: none; }
@media (max-width: 1068px) { .intelligence-gallery { grid-auto-columns: 340px; } }
@media (max-width: 734px) { .intelligence-gallery { grid-auto-columns: 300px; } }

.intelligence-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

/* Placeholder image — rounded, no box container */
.intelligence-card__img {
  width: 100%;
  height: 280px;
  background: #1d1d1f;
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 734px) {
  .intelligence-card__img { height: 220px; }
}

/* SF icon in placeholder */
.intelligence-card__img svg {
  color: #48484a;
  transition: color 0.4s ease;
}
.intelligence-card:hover .intelligence-card__img svg {
  color: #6e6e73;
}

.intelligence-card__body {
  padding: var(--sp-5) var(--sp-1) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.intelligence-card__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0;
  color: #f5f5f7;
}
.intelligence-card__desc {
  font-size: 17px;
  color: #86868b;
  line-height: 1.47059;
  letter-spacing: -.022em;
  margin: 0;
}
.intelligence-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--sp-2);
}
.intelligence-card__chips .chip {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: #86868b;
}

/* Paddle nav — dark variant for intelligence section */
.sec-intelligence .paddlenav {
  padding-right: var(--sp-6);
}
.sec-intelligence .paddlenav__btn {
  color: #86868b;
}
.sec-intelligence .paddlenav__btn:hover {
  color: #f5f5f7;
  background: rgba(255,255,255,0.08);
}

/* ============================================================
   Writing — "Get the highlights" auto-scroll gallery
   ============================================================ */
.sec-highlights {
  background: var(--bg-secondary);
  padding: 160px 0;
}
[data-theme="dark"] .sec-highlights {
  background: #161617;
}
@media (max-width: 1068px) { .sec-highlights { padding: 128px 0; } }
@media (max-width: 734px) { .sec-highlights { padding: 96px 0; } }
.sec-highlights__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.sec-highlights__header {
  text-align: left;
  max-width: 700px;
  margin: 0 auto var(--sp-16) 0;
}
.sec-highlights__eyebrow {
  background: linear-gradient(90deg, #c30e3e, #e36479 33%, #c30e3e 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: eyebrowShimmer 3s linear infinite;
}
@keyframes eyebrowShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.sec-highlights__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.0625;
  margin: var(--sp-3) 0 var(--sp-5);
}
.sec-highlights__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-callout);
  color: var(--btn-blue);
  font-weight: 500;
  transition: color 0.2s;
}
.sec-highlights__link:hover { color: var(--btn-blue-hover); }

/* Highlight gallery — full-width image cards with overlay text */
.highlight-gallery {
  position: relative;
}
.highlight-gallery__track {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  position: relative;
}
@media (max-width: 734px) {
  .highlight-gallery__track { aspect-ratio: 4 / 5; }
}

.highlight-card {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2em, 4vw, 3.5em);
  color: #fff;
  text-decoration: none;
  position: relative;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 1s ease, transform 1s ease;
  cursor: pointer;
}
.highlight-card[data-active="true"] {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 1;
}
.highlight-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  pointer-events: none;
}
.highlight-card__content {
  position: relative;
  z-index: 2;
  max-width: 560px;
}
.highlight-card__badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--sp-4);
}
.highlight-card__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin: 0 0 var(--sp-3);
}
.highlight-card__desc {
  font-size: var(--fs-callout);
  color: rgba(255,255,255,0.8);
  line-height: 1.43;
  margin: 0 0 var(--sp-3);
  max-width: 480px;
}
.highlight-card__meta {
  font-size: var(--fs-caption1);
  color: rgba(255,255,255,0.5);
  font-variant-numeric: tabular-nums;
}

/* Controls — play/pause + dot nav */
.highlight-gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.highlight-gallery__playpause {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--label-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.highlight-gallery__playpause:hover {
  color: var(--label-primary);
  background: var(--fill-tertiary);
}
.highlight-gallery__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.highlight-dot {
  width: 8px;
  height: 8px;
  border-radius: 10px;
  background: var(--label-quaternary);
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: width 0.3s ease, background 0.3s;
}
.highlight-dot[data-active="true"] {
  width: 48px;
  background: var(--fill-secondary);
}
@media (max-width: 734px) {
  .highlight-dot[data-active="true"] { width: 32px; }
}
.highlight-dot__fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--label-secondary);
  border-radius: 10px;
  transition: none;
}

/* ============================================================
   Currently — "And so much more" grid (Apple macOS)
   ============================================================ */
.sec-more {
  background: var(--bg-secondary);
  padding: 80px 0 160px;
}
@media (max-width: 1068px) { .sec-more { padding: 128px 0; } }
@media (max-width: 734px) { .sec-more { padding: 96px 0; } }
.sec-more__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.sec-more__header {
  text-align: left;
  max-width: 700px;
  margin: 0 auto var(--sp-16) 0;
}
.sec-more__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.0625;
  margin: 0 0 var(--sp-4);
}
.sec-more__sub {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--label-secondary);
  line-height: 1.381;
  letter-spacing: .011em;
  margin: 0;
}

/* 3-col grid with generous gaps — Apple "more" section */
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 90px;
  row-gap: 80px;
}
@media (max-width: 1068px) {
  .more-grid { grid-template-columns: repeat(2, 1fr); column-gap: 60px; row-gap: 60px; }
}
@media (max-width: 734px) {
  .more-grid { grid-template-columns: 1fr; column-gap: 0; row-gap: 48px; }
}

.more-item {
  text-align: center;
}
.more-item__emoji {
  display: block;
  font-size: 80px;
  line-height: 1;
  margin: 0 auto var(--sp-5);
}
@media (max-width: 1068px) {
  .more-item__emoji { font-size: 56px; }
}
.more-item__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs-footnote);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-2);
  line-height: 1.286;
}
.more-item__text {
  font-size: var(--fs-title3);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 var(--sp-1);
  line-height: 1.2;
}
.more-item__meta {
  font-size: var(--fs-footnote);
  color: var(--label-secondary);
  line-height: 1.286;
  margin: 0;
}

/* ============================================================
   OSS — Apple Continuity style (clean grid, placeholder images)
   ============================================================ */
.sec-continuity {
  background: var(--bg-secondary);
  padding: 160px 0;
}
@media (max-width: 1068px) { .sec-continuity { padding: 128px 0; } }
@media (max-width: 734px) { .sec-continuity { padding: 96px 0; } }
.sec-continuity__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.sec-continuity__header {
  text-align: left;
  max-width: 700px;
  margin: 0 auto var(--sp-16) 0;
}
.sec-continuity__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.0625;
  margin: var(--sp-3) 0 var(--sp-4);
}
.sec-continuity__sub {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--label-secondary);
  line-height: 1.381;
  letter-spacing: .011em;
  margin: 0;
}
.sec-continuity__cta {
  text-align: center;
  margin-top: var(--sp-10);
}

/* Horizontal scroll gallery */
.continuity-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 340px;
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 var(--sp-4);
  scrollbar-width: none;
}
.continuity-scroll::-webkit-scrollbar { display: none; }
@media (max-width: 1068px) { .continuity-scroll { grid-auto-columns: 320px; } }
@media (max-width: 734px) { .continuity-scroll { grid-auto-columns: 280px; } }

.continuity-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.continuity-card:hover {
  transform: scale(1.03);
}

/* Placeholder image — white card, rounded */
.continuity-card__img {
  width: 100%;
  height: 240px;
  background: var(--bg-primary);
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .continuity-card__img {
  background: #1d1d1f;
}
.continuity-card__img svg {
  color: var(--label-quaternary);
  transition: color 0.4s ease;
}
.continuity-card:hover .continuity-card__img svg {
  color: var(--accent);
}
.continuity-card__lang-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
}

/* Text below image — no box, just typography */
.continuity-card__body {
  padding: var(--sp-4) var(--sp-1) 0;
}
.continuity-card__name {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .009em;
  line-height: 1.16667;
  color: var(--label-primary);
  display: block;
  margin-bottom: var(--sp-1);
}
.continuity-card__desc {
  font-size: 17px;
  color: var(--label-secondary);
  line-height: 1.47059;
  letter-spacing: -.022em;
  margin: 0;
}
.continuity-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-1) 0;
  font-size: var(--fs-caption1);
  color: var(--label-tertiary);
  margin-top: auto;
}
.continuity-card__lang {
  font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.continuity-card__lang-pip {
  width: 8px; height: 8px; border-radius: 50%;
}
.continuity-card__github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption1);
  font-weight: 500;
  color: var(--btn-blue);
  text-decoration: none;
  transition: color 0.2s;
}
.continuity-card__github:hover {
  color: var(--btn-blue-hover);
}

/* ============================================================
   Speaking
   ============================================================ */
/* Speaking section */
.sec-speaking {
  background: var(--bg-secondary);
  padding: 160px 0;
}
@media (max-width: 1068px) { .sec-speaking { padding: 128px 0; } }
@media (max-width: 734px) { .sec-speaking { padding: 96px 0; } }
.sec-speaking__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.talks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.talk {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border-radius: var(--r-md);
  background: var(--bg-primary);
  border: 1px solid var(--separator);
  transition: border-color 0.3s;
}
.talk:hover {
  border-color: var(--label-quaternary);
}
.talk__when {
  font-size: var(--fs-footnote);
  color: var(--label-tertiary);
  font-variant-numeric: tabular-nums;
}
.talk__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs-callout);
  font-weight: 600;
  margin: 0 0 2px 0;
}
.talk__where { font-size: var(--fs-footnote); color: var(--label-secondary); margin: 0; }
.talk__badge {
  font-size: var(--fs-caption1);
  color: var(--label-secondary);
  padding: 4px 12px;
  background: var(--fill-secondary);
  border-radius: var(--r-pill);
  font-weight: 500;
}
@media (max-width: 734px) {
  .talk { grid-template-columns: 1fr; gap: var(--sp-1); }
}

/* ============================================================
   Community — Apple-clean grid
   ============================================================ */
.sec-community {
  background: var(--bg-secondary);
  padding: 160px 0;
}
@media (max-width: 1068px) { .sec-community { padding: 128px 0; } }
@media (max-width: 734px) { .sec-community { padding: 96px 0; } }
.sec-community__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.sec-community__header {
  text-align: left;
  max-width: 700px;
  margin: 0 auto var(--sp-16) 0;
}
.sec-community__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.0625;
  margin: var(--sp-3) 0 var(--sp-4);
}
.sec-community__sub {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--label-secondary);
  line-height: 1.381;
  letter-spacing: .011em;
  margin: 0;
}
/* Community — meetup list + logo marquee */
.community-block {
  margin-bottom: var(--sp-32);
}
.community-block:last-child { margin-bottom: 0; }
.community-block__label {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs-title3);
  font-weight: 600;
  color: var(--label-primary);
  letter-spacing: -0.005em;
  margin-bottom: var(--sp-8);
  text-align: center;
}

/* Meetup list — clean vertical list */
.community-meetups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 860px) { .community-meetups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .community-meetups { grid-template-columns: 1fr; } }
.community-meetup {
  font-size: var(--fs-subhead);
  font-weight: 500;
  color: var(--label-primary);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-primary);
  border-radius: var(--r-sm);
  text-align: center;
  letter-spacing: -0.01em;
}

/* Logo marquee — infinite horizontal scroll */
.community-marquee {
  overflow: hidden;
  position: relative;
  padding: var(--sp-6) 0;
}
.community-marquee::before,
.community-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 1;
  pointer-events: none;
}
.community-marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary), transparent);
}
.community-marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary), transparent);
}
.community-marquee__track {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}
.community-marquee__track:hover {
  animation-play-state: paused;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.community-logo {
  flex-shrink: 0;
  font-size: var(--fs-callout);
  font-weight: 600;
  color: var(--label-tertiary);
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: color 0.3s;
  cursor: default;
}
.community-logo:hover {
  color: var(--label-primary);
}

/* ============================================================
   Coffee — rich dark section with Apple-style glow
   ============================================================ */
.coffee {
  background: linear-gradient(135deg, #3E2723 0%, #5D4037 50%, #8B4513 100%);
  color: #FFF8E7;
  border-radius: var(--r-2xl);
  padding: var(--sp-16) var(--sp-12);
  position: relative;
  overflow: hidden;
}
/* Apple-style ambient glow behind content */
.coffee::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(255,184,108,0.15) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .coffee {
  background: linear-gradient(135deg, #1a0e08 0%, #2A1A14 50%, #3D2519 100%);
}
.coffee__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-12);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 860px) { .coffee__grid { grid-template-columns: 1fr; } }

.coffee__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.0625;
  margin: 0 0 var(--sp-5) 0;
}
.coffee__text {
  font-size: var(--fs-callout);
  color: rgba(255,248,231,0.8);
  line-height: 1.55;
  margin: 0 0 var(--sp-8) 0;
  max-width: 440px;
}
.coffee__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--sp-8);
}
.coffee__stat-num {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600;
  color: var(--cosmic-orange);
  font-variant-numeric: tabular-nums;
  line-height: 1.0625;
}
.coffee__stat-label {
  font-size: var(--fs-footnote);
  color: rgba(255,248,231,0.7);
  margin-top: 4px;
}
.coffee__visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
}

/* ============================================================
   Contact / footer
   ============================================================ */
.contact {
  padding: var(--sp-32) var(--sp-6) var(--sp-24);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.contact__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.0625;
  margin: 0 0 var(--sp-6) 0;
}
.contact__title em {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(108deg, #007AFF, #5856D6 30%, #C959DD 55%, #FF9004 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .contact__title em {
  background: linear-gradient(108deg, #0A84FF, #5E5CE6 30%, #C959DD 55%, #FF9F0A 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.contact__sub {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--label-secondary);
  margin: 0 0 var(--sp-10) 0;
  letter-spacing: .011em;
  line-height: 1.381;
}
.contact__ctas {
  display: flex; gap: var(--sp-3); justify-content: center;
  flex-wrap: wrap;
}

footer.site-footer {
  border-top: 1px solid var(--separator);
  padding: var(--sp-10) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  max-width: var(--content-max);
  margin: 0 auto;
  font-size: var(--fs-footnote);
  color: var(--label-tertiary);
}
.site-footer__socials {
  display: flex; gap: var(--sp-2);
}
.socialbtn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--fill-secondary);
  display: grid; place-items: center;
  color: var(--label-secondary);
  transition: background 0.24s, color 0.24s;
}
.socialbtn:hover {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   Spotlight / Command-K — Apple Spotlight style
   ============================================================ */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 2000;
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.spotlight-overlay[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}
[data-theme="dark"] .spotlight-overlay {
  background: rgba(0,0,0,0.5);
}
.spotlight {
  width: min(640px, calc(100% - 48px));
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  overflow: hidden;
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.24s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.spotlight-overlay[data-open="true"] .spotlight {
  transform: scale(1) translateY(0);
}
.spotlight__input-row {
  display: flex; align-items: center;
  padding: var(--sp-3) var(--sp-4);
  gap: var(--sp-3);
  border-bottom: 1px solid var(--separator);
}
.spotlight__input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: var(--fs-title3);
  color: var(--label-primary);
  font-family: inherit;
  letter-spacing: -0.01em;
}
.spotlight__input::placeholder { color: var(--label-tertiary); }
.spotlight__results {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--sp-2);
}
.spotlight__group-label {
  font-size: var(--fs-caption2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--label-tertiary);
  padding: 10px 12px 6px;
}
.spotlight__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.spotlight__item[data-active="true"] {
  background: var(--btn-blue);
  color: #fff;
}
.spotlight__item[data-active="true"] .spotlight__item-sub { color: rgba(255,255,255,0.75); }
.spotlight__item-ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--fill-secondary);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.spotlight__item[data-active="true"] .spotlight__item-ic {
  background: rgba(255,255,255,0.18);
}
.spotlight__item-text { flex: 1; min-width: 0; }
.spotlight__item-title {
  font-size: var(--fs-callout);
  font-weight: 500;
  line-height: 1.3;
}
.spotlight__item-sub {
  font-size: var(--fs-caption1);
  color: var(--label-tertiary);
  line-height: 1.3;
}
.spotlight__footer {
  border-top: 1px solid var(--separator);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-caption1);
  color: var(--label-tertiary);
}
.spotlight__hint { display: flex; align-items: center; gap: 4px; }
.spotlight__hint kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--fill-tertiary);
  border: 1px solid var(--separator);
  border-radius: 4px;
}

/* ============================================================
   Project sheet — Apple HIG content page style
   Solid colors, clean borders, structured content sections
   ============================================================ */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.sheet-overlay[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(720px, 100vw);
  background: var(--bg-primary);
  border-left: 1px solid var(--separator);
  box-shadow: -2px 0 24px rgba(0,0,0,0.08);
  z-index: 1950;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .sheet {
  box-shadow: -2px 0 24px rgba(0,0,0,0.4);
}
.sheet[data-open="true"] {
  transform: translateX(0);
}

/* Header — Apple HIG nav breadcrumb bar */
.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  height: 52px;
  border-bottom: 1px solid var(--separator);
  background: var(--bg-primary);
  flex-shrink: 0;
  z-index: 2;
}
.sheet__header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--label-tertiary);
}
.sheet__breadcrumb {
  font-size: var(--fs-footnote);
  color: var(--label-tertiary);
  letter-spacing: -0.016em;
}
.sheet__breadcrumb--current {
  color: var(--label-primary);
  font-weight: 600;
}
.sheet__close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--fill-secondary);
  display: grid;
  place-items: center;
  transition: background 0.24s;
  color: var(--label-tertiary);
}
.sheet__close:hover {
  background: var(--fill-primary);
  color: var(--label-primary);
}

/* Body — scroll area */
.sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Hero visual — full-bleed in panel */
.sheet__hero {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  display: grid;
  place-items: center;
}

/* Title block — Apple HIG page header */
.sheet__title-block {
  padding: var(--sp-8) var(--sp-8) 0;
}
.sheet__label-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.sheet__category-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: capitalize;
}
.sheet__date {
  font-size: var(--fs-footnote);
  color: var(--label-tertiary);
  letter-spacing: -0.016em;
}
.sheet__title {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.071;
  margin: 0 0 var(--sp-4) 0;
  color: var(--label-primary);
}
.sheet__tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.sheet__tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 980px;
  font-size: var(--fs-caption1);
  font-weight: 500;
  background: var(--fill-secondary);
  color: var(--label-secondary);
  border: 1px solid rgba(0,0,0,0.04);
  letter-spacing: -0.01em;
}
[data-theme="dark"] .sheet__tag {
  border-color: rgba(255,255,255,0.04);
}

/* Section divider — Apple HIG horizontal rule */
.sheet__divider {
  border: none;
  height: 1px;
  background: var(--separator);
  margin: var(--sp-8) var(--sp-8) 0;
}

/* Content sections — consistent vertical rhythm */
.sheet__content-section {
  padding: var(--sp-6) var(--sp-8);
}

/* Section heading — Apple HIG h3 */
.sheet__heading {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs-title3);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 var(--sp-4) 0;
  color: var(--label-primary);
}

/* Overview paragraph — Apple HIG intro style */
.sheet__overview {
  font-size: 19px;
  color: var(--label-secondary);
  line-height: 1.421;
  letter-spacing: 0.012em;
  margin: 0;
}

/* Metrics — Apple HIG info cards */
.sheet__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.sheet__metric {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  box-shadow: var(--glass-shadow), var(--glass-inset);
  position: relative;
  overflow: hidden;
}
.sheet__metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  pointer-events: none;
}
[data-theme="dark"] .sheet__metric::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.sheet__metric-num {
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs-title1);
  font-weight: 600;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.sheet__metric-label {
  font-size: var(--fs-caption1);
  color: var(--label-secondary);
  margin-top: 6px;
  letter-spacing: -0.01em;
}

/* Callout box — Apple HIG highlighted info */
.sheet__callout {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-secondary);
  border: 1px solid var(--separator);
  border-radius: var(--r-sm);
}
.sheet__callout-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.sheet__callout-text {
  font-size: var(--fs-body);
  color: var(--label-primary);
  line-height: 1.47;
  margin: 0;
  padding-top: 4px;
}

/* Stack tiles — Apple HIG topic tiles */
.sheet__stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.sheet__stack-tile {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 var(--sp-4);
  background: var(--bg-secondary);
  border: 1px solid var(--separator);
  border-radius: var(--r-xs);
  transition: border-color 0.24s, background 0.24s;
}
.sheet__stack-tile:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.sheet__stack-name {
  font-size: var(--fs-footnote);
  font-weight: 500;
  color: var(--label-primary);
  letter-spacing: -0.016em;
}

/* Aside note — Apple HIG note/important box */
.sheet__aside {
  display: flex;
  gap: var(--sp-4);
  margin: var(--sp-6) var(--sp-8) var(--sp-8);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-secondary);
  border: 1px solid var(--separator);
  border-radius: var(--r-sm);
  position: relative;
}
.sheet__aside-bar {
  width: 3px;
  min-height: 100%;
  border-radius: 2px;
  flex-shrink: 0;
}
.sheet__aside-content {
  flex: 1;
  min-width: 0;
}
.sheet__aside-label {
  display: block;
  font-size: var(--fs-footnote);
  font-weight: 600;
  color: var(--label-primary);
  margin-bottom: 4px;
  letter-spacing: -0.016em;
}
.sheet__aside-text {
  font-size: var(--fs-footnote);
  color: var(--label-secondary);
  line-height: 1.43;
  margin: 0;
  letter-spacing: -0.016em;
}

@media (max-width: 734px) {
  .sheet { width: 100%; border-left: none; }
  .sheet__title-block { padding: var(--sp-6) var(--sp-5) 0; }
  .sheet__content-section { padding: var(--sp-5); }
  .sheet__divider { margin: var(--sp-6) var(--sp-5) 0; }
  .sheet__aside { margin: var(--sp-5); }
  .sheet__metrics { grid-template-columns: 1fr; }
}

/* ============================================================
   Theme toggle diagonal wipe — Apple gradient
   ============================================================ */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(108deg, #007AFF, #5856D6 30%, #C959DD 55%, #FF9004 100%);
  transform: scale(0) translate(50%, -50%);
  transform-origin: 100% 0%;
  border-radius: 50%;
  transition: none;
}
.wipe[data-animating="true"] {
  animation: wipe 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  opacity: 1;
}
@keyframes wipe {
  0% { transform: scale(0) translate(50%, -50%); opacity: 0.9; }
  100% { transform: scale(4) translate(50%, -50%); opacity: 0; }
}

/* ============================================================
   Tweaks panel
   ============================================================ */
.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 300px;
  background: var(--material-thick);
  backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px);
  border: 1px solid var(--material-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  z-index: 3000;
  overflow: hidden;
  display: none;
}
.tweaks[data-visible="true"] { display: block; }
.tweaks__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--separator);
}
.tweaks__title { font-size: var(--fs-footnote); font-weight: 600; }
.tweaks__traffic { display: flex; gap: 6px; }
.tweaks__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--fill-primary);
}
.tweaks__body { padding: 14px 16px; }
.tweaks__group { margin-bottom: var(--sp-4); }
.tweaks__group:last-child { margin-bottom: 0; }
.tweaks__label {
  display: block;
  font-size: var(--fs-caption1);
  color: var(--label-secondary);
  margin-bottom: 6px;
}
.tweaks__segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--fill-secondary);
  padding: 2px;
  border-radius: var(--r-sm);
  gap: 2px;
}
.tweaks__seg-btn {
  padding: 6px 8px;
  font-size: var(--fs-caption1);
  font-weight: 500;
  border-radius: 7px;
  color: var(--label-secondary);
  transition: background 0.15s, color 0.15s;
}
.tweaks__seg-btn[data-active="true"] {
  background: var(--bg-primary);
  color: var(--label-primary);
  box-shadow: var(--shadow-sm);
}
.tweaks__color-row { display: flex; gap: 8px; }
.tweaks__swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--separator);
  transition: transform 0.2s, border-color 0.2s;
}
.tweaks__swatch:hover { transform: scale(1.1); }
.tweaks__swatch[data-active="true"] { border-color: var(--label-primary); }

/* ============================================================
   Variations
   ============================================================ */

/* Variation: xcode (monospace accents) */
body[data-variation="xcode"] .hero__title {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
  letter-spacing: -0.03em;
  font-weight: 500;
  font-size: clamp(38px, 6.5vw, 88px);
}
body[data-variation="xcode"] .hero__title .grad {
  background: none;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  font-family: "SF Mono", ui-monospace, monospace;
  font-style: normal;
}
body[data-variation="xcode"] .project-card__title,
body[data-variation="xcode"] .section__title,
body[data-variation="xcode"] .contact__title { font-family: "SF Mono", ui-monospace, monospace; font-weight: 500; }

/* Variation: bento (rounder, spacious) */
body[data-variation="bento"] .project-card { border-radius: var(--r-2xl); }
body[data-variation="bento"] .intelligence-card,
body[data-variation="bento"] .continuity-card { border-radius: var(--r-xl); }
body[data-variation="bento"] .hero__pre { background: var(--accent-soft); color: var(--accent); }
body[data-variation="bento"] .hero__stat { background: var(--accent-soft); border-radius: var(--r-md); }

/* ============================================================
   Mobile nav collapse
   ============================================================ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__inner { padding: 0 var(--sp-4); }
}
