  :root, [data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a1628;
    --bg-2: #0f1e36;
    --surface: #142845;
    --surface-2: #1a3358;
    --border: rgba(176, 193, 212, 0.20);
    --border-strong: rgba(176, 193, 212, 0.36);
    --teal: #2dd4bf;
    --teal-bright: #5eead4;
    --teal-soft: rgba(45, 212, 191, 0.14);
    --teal-glow: rgba(45, 212, 191, 0.35);
    --text: #f1f5f9;
    --text-strong: #ffffff;
    --text-muted: #cbd5e1;
    --text-dim: #b0c1d4;
    --on-teal: #0a1628;
    --gradient-end: #38bdf8;
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 40px rgba(45, 212, 191, 0.15);
    --ambient-1: radial-gradient(circle, rgba(45, 212, 191, 0.10) 0%, transparent 70%);
    --ambient-2: radial-gradient(circle, rgba(56, 189, 248, 0.07) 0%, transparent 70%);
    --nav-bg: rgba(10, 22, 40, 0.72);
    --nav-bg-scrolled: rgba(10, 22, 40, 0.88);
    --modal-backdrop: rgba(5, 12, 24, 0.78);
    --floating-bg: rgba(20, 40, 69, 0.95);
    --portrait-overlay: linear-gradient(135deg, transparent 50%, rgba(45, 212, 191, 0.10) 100%);
    --radius: 16px;
    --radius-lg: 24px;
    --maxw: 1180px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  [data-theme="dark-hc"] {
    color-scheme: dark;
    --bg: #000000;
    --bg-2: #050810;
    --surface: #0d1117;
    --surface-2: #161b22;
    --border: rgba(255, 255, 255, 0.42);
    --border-strong: rgba(255, 255, 255, 0.70);
    --teal: #7fffd4;
    --teal-bright: #ccfff5;
    --teal-soft: rgba(127, 255, 212, 0.18);
    --teal-glow: rgba(127, 255, 212, 0.45);
    --text: #ffffff;
    --text-strong: #ffffff;
    --text-muted: #f1f5f9;
    --text-dim: #e5e7eb;
    --on-teal: #000000;
    --gradient-end: #87ceeb;
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.95);
    --shadow-glow: 0 0 0 1px rgba(127, 255, 212, 0.5);
    --ambient-1: none;
    --ambient-2: none;
    --nav-bg: rgba(0, 0, 0, 0.92);
    --nav-bg-scrolled: rgba(0, 0, 0, 0.98);
    --modal-backdrop: rgba(0, 0, 0, 0.92);
    --floating-bg: rgba(13, 17, 23, 0.98);
    --portrait-overlay: none;
  }

  [data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-2: #f8fafc;
    --surface: #f1f5f9;
    --surface-2: #e2e8f0;
    --border: rgba(15, 23, 42, 0.14);
    --border-strong: rgba(15, 23, 42, 0.32);
    --teal: #115e59;
    --teal-bright: #0f766e;
    --teal-soft: rgba(17, 94, 89, 0.08);
    --teal-glow: rgba(17, 94, 89, 0.30);
    --text: #0f172a;
    --text-strong: #000000;
    --text-muted: #1e293b;
    --text-dim: #334155;
    --on-teal: #ffffff;
    --gradient-end: #0369a1;
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    --shadow-glow: 0 0 40px rgba(17, 94, 89, 0.10);
    --ambient-1: radial-gradient(circle, rgba(17, 94, 89, 0.06) 0%, transparent 70%);
    --ambient-2: radial-gradient(circle, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
    --nav-bg: rgba(255, 255, 255, 0.78);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.92);
    --modal-backdrop: rgba(15, 23, 42, 0.50);
    --floating-bg: rgba(255, 255, 255, 0.97);
    --portrait-overlay: linear-gradient(135deg, transparent 50%, rgba(17, 94, 89, 0.08) 100%);
    --radius: 16px;
    --radius-lg: 24px;
    --maxw: 1180px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  [data-theme="light-hc"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f5f5f5;
    --border: rgba(0, 0, 0, 0.55);
    --border-strong: rgba(0, 0, 0, 0.85);
    --teal: #004a4a;
    --teal-bright: #003333;
    --teal-soft: rgba(0, 74, 74, 0.10);
    --teal-glow: rgba(0, 74, 74, 0.40);
    --text: #000000;
    --text-strong: #000000;
    --text-muted: #000000;
    --text-dim: #1a1a1a;
    --on-teal: #ffffff;
    --gradient-end: #0c4a6e;
    --shadow-lg: 0 0 0 2px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 0 2px rgba(0, 74, 74, 0.50);
    --ambient-1: none;
    --ambient-2: none;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.99);
    --modal-backdrop: rgba(0, 0, 0, 0.75);
    --floating-bg: rgba(255, 255, 255, 1);
    --portrait-overlay: none;
    --radius: 16px;
    --radius-lg: 24px;
    --maxw: 1180px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.2s ease, color 0.2s ease;
  }

  /* ambient background glow */
  body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: var(--ambient-1);
    pointer-events: none;
    z-index: 0;
  }
  body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: var(--ambient-2);
    pointer-events: none;
    z-index: 0;
  }

  .container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
  }

  /* ============ NAV ============ */
  .nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--nav-bg);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), background var(--transition);
  }
  .nav.scrolled {
    background: var(--nav-bg-scrolled);
    border-bottom-color: var(--border);
  }
  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  @media (max-width: 768px) {
    .nav-inner { gap: 6px; }
    .logo { font-size: 17px; }
    .theme-switcher { margin-right: 0; }
  }
  .logo {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 22px;
    color: var(--text-strong);
    text-decoration: none;
    letter-spacing: -0.02em;
  }
  .logo span { color: var(--teal); }
  .nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
  }
  .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
  }
  .nav-links a:hover { color: var(--teal-bright); background: var(--teal-soft); }
  .nav-cta {
    background: var(--teal);
    color: var(--on-teal) !important;
    font-weight: 600 !important;
  }
  .nav-cta:hover { background: var(--teal-bright) !important; color: var(--on-teal) !important; }

  .nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--text);
    width: 44px; height: 44px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }

  /* ============ HERO ============ */
  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 80px;
    align-items: center;
  }
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--teal-soft);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 13px;
    color: var(--teal-bright);
    font-weight: 500;
    margin-bottom: 24px;
  }
  .hero-badge .dot {
    width: 6px; height: 6px;
    background: var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--teal);
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  .hero h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-strong);
    font-weight: 600;
    margin-bottom: 24px;
  }
  .hero h1 .accent {
    background: linear-gradient(135deg, var(--teal) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: 0.05em;
  }
  .hero p.lead {
    font-size: 19px;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 540px;
  }
  .hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    line-height: 2.4em;
  }
  .btn-primary {
    background: var(--teal);
    color: var(--on-teal);
    box-shadow: 0 10px 30px -10px var(--teal-glow);
  }
  .btn-primary:hover {
    background: var(--teal-bright);
    color: var(--on-teal);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px var(--teal-glow);
  }
  .btn-secondary {
    background: transparent;
    color: var(--text-strong);
    border-color: var(--border-strong);
  }
  .btn-secondary:hover {
    background: var(--teal-soft);
    border-color: var(--teal);
    color: var(--teal-bright);
  }
  .btn svg { width: 16px; height: 16px; }

  .hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
  }
  .stat .num {
    font-family: 'Fraunces', serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--teal-bright);
    line-height: 1;
  }
  .stat .label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Hero portrait */
  .hero-portrait {
    position: relative;
    aspect-ratio: 1;
    max-width: 380px;
    margin-left: auto;
  }
  .portrait-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
  }
  .portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .portrait-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--portrait-overlay);
  }
  .floating-card {
    position: absolute;
    background: var(--floating-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    animation: float 6s ease-in-out infinite;
  }
  .floating-card.fc-1 {
    top: 30px;
    left: -40px;
  }
  .floating-card.fc-2 {
    bottom: 40px;
    right: -30px;
    animation-delay: 2s;
  }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
  .fc-icon {
    width: 32px; height: 32px;
    background: var(--teal-soft);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-bright);
    flex-shrink: 0;
  }
  .fc-text strong { color: var(--text-strong); display: block; font-weight: 600; }
  .fc-text span { color: var(--text-muted); font-size: 12px; }

  /* ============ SECTION COMMON ============ */
  section { padding: 100px 0; position: relative; }
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
  }
  .eyebrow::before {
    content: '';
    width: 24px; height: 1px;
    background: var(--teal);
  }
  h2.section-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.1;
    color: var(--text-strong);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    max-width: 720px;
  }
  .section-lead {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 64px;
  }
  .section-header { margin-bottom: 64px; }

  /* ============ ABOUT ============ */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
  }
  .about-text p {
    color: var(--text);
    font-size: 17px;
    margin-bottom: 20px;
  }
  .about-text p strong { color: var(--text-strong); font-weight: 600; }
  .about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: sticky;
    top: 100px;
  }
  .about-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    color: var(--text-strong);
    margin-bottom: 20px;
    font-weight: 600;
  }
  .about-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  .meta-item:last-child { border-bottom: none; }
  .meta-label {
    color: var(--text-muted);
    font-size: 14px;
  }
  .meta-value {
    color: var(--text-strong);
    font-weight: 500;
    font-size: 14px;
  }

  /* ============ SKILLS ============ */
  .skills {
    background: linear-gradient(180deg, transparent 0%, var(--bg-2) 50%, transparent 100%);
  }
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 64px;
  }
  .skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
  }
  .skill-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  .skill-icon {
    width: 48px; height: 48px;
    background: var(--teal-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-bright);
    margin-bottom: 20px;
  }
  .skill-icon svg { width: 24px; height: 24px; }
  .skill-card h3 {
    color: var(--text-strong);
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
  }
  .skill-card p {
    color: var(--text-muted);
    font-size: 14px;
  }

  .toolbox {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
  }
  .toolbox h3 {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    color: var(--text-strong);
    margin-bottom: 24px;
    font-weight: 600;
  }
  .toolbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .tag {
    padding: 8px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--text);
    transition: all var(--transition);
  }
  .tag:hover {
    border-color: var(--teal);
    color: var(--teal-bright);
    background: var(--teal-soft);
  }

  /* ============ PORTFOLIO ============ */
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
  }
  .project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
  }
  .project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
  }

  /* ── Notebook-style cards (Selected work grid) ─────────────────────── */
  #work .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 28px;
  }
  @media (max-width: 899px) {
    #work .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  }
  #work .project-card {
    --spine: var(--teal);
    display: block;
    background: none;
    border: none;
    border-radius: 6px 40px 24px 6px;
    box-shadow:
      6px 6px 0 -1px var(--surface-2),
      12px 12px 0 -2px var(--bg-2);
  }
  #work .project-card:hover {
    transform: translate(-3px, -6px);
    box-shadow:
      6px 6px 0 -1px var(--surface-2),
      12px 12px 0 -2px var(--bg-2),
      var(--shadow-lg), var(--shadow-glow);
  }
  .project-frame {
    display: flex;
    align-items: stretch;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: inherit;
    overflow: hidden;
    transition: border-color var(--transition);
  }
  #work .project-card:hover .project-frame {
    border-color: var(--border-strong);
  }
  .project-spine {
    width: 12px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--spine), color-mix(in srgb, var(--spine) 70%, black));
  }
  .project-cover {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: color-mix(in srgb, var(--spine) 10%, var(--surface));
  }
  .project-image {
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
  }
  .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .project-card:hover .project-image img {
    transform: scale(1.05);
  }

  /* ── Locked card state ─────────────────────── */
  .project-card--locked .project-image img {
    filter: blur(7px);
    transform: scale(1.08); /* prevents blur edges showing */
  }
  /* Project tag stays sharp above the blur */
  .project-tag {
    position: relative;
    z-index: 12;
  }
  .project-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(5, 12, 24, 0.38);
    cursor: pointer;
  }
  .project-lock-overlay__icon {
    width: 44px;
    height: 44px;
    background: rgba(45,212,191,0.15);
    border: 1px solid rgba(45,212,191,0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2dd4bf;
  }
  .project-lock-overlay__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
  }
  .project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 22, 40, 0.7) 100%);
    pointer-events: none;
  }
  .project-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    color: var(--teal-bright);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
  }
  .project-body {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  .project-body h3 {
    font-family: 'Fraunces', serif;
    font-size: 24px;
    color: var(--text-strong);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .project-body p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 20px;
    flex-grow: 1;
  }
  .project-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
  }
  .project-meta div { color: var(--text-muted); }
  .project-meta strong {
    color: var(--text-strong);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
  }
  .project-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    background: var(--teal-soft);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--teal-bright);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
  }
  .project-cta:hover {
    background: var(--teal);
    color: var(--bg);
    border-color: var(--teal);
  }
  .project-cta svg {
    width: 16px; height: 16px;
    transition: transform var(--transition);
  }
  .project-cta:hover svg { transform: translateX(4px); }

  /* ============ CONTACT ============ */
  .contact {
    text-align: center;
  }
  .contact-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 72px 48px;
    position: relative;
    overflow: hidden;
  }
  .contact-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, var(--teal-soft) 0%, transparent 50%);
    pointer-events: none;
  }
  .contact-card > * { position: relative; z-index: 1; }
  .contact-card .eyebrow { justify-content: center; }
  .contact-card .eyebrow::before { display: none; }
  .contact-card h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(32px, 5vw, 56px);
    color: var(--text-strong);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }
  .contact-card p {
    color: var(--text-muted);
    font-size: 19px;
    max-width: 540px;
    margin: 0 auto 40px;
  }
  .contact-ctas {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .contact-ctas .btn { width: auto; }

  /* ============ FOOTER ============ */
  footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
  }
  .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  footer p {
    color: var(--text-dim);
    font-size: 14px;
  }
  .footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
  }
  .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition);
  }
  .footer-links a:hover { color: var(--teal-bright); }

  /* ============ MODAL FORM ============ */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .modal-backdrop.open {
    opacity: 1;
    visibility: visible;
  }
  .modal {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .modal-backdrop.open .modal {
    transform: translateY(0) scale(1);
  }
  .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
  }
  .modal-close:hover {
    background: var(--teal-soft);
    color: var(--teal-bright);
    border-color: var(--border-strong);
  }
  .modal h3 {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    color: var(--text-strong);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .modal-sub {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 28px;
  }
  .form-group { margin-bottom: 16px; }
  .form-group label {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
  }
  .req { color: var(--teal); }
  .opt { color: var(--text-dim); font-weight: 400; font-size: 12px; margin-left: 4px; }
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-strong);
    font-family: inherit;
    font-size: 14px;
    transition: border-color var(--transition), background var(--transition);
  }
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    background: var(--bg);
  }
  .form-group textarea {
    resize: vertical;
    min-height: 80px;
  }
  .form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
  }
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
  }
  .form-error {
    color: #fca5a5;
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
  }
  .modal-success {
    text-align: center;
    padding: 20px 0;
  }
  .success-icon {
    width: 64px;
    height: 64px;
    background: var(--teal-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    margin: 0 auto 20px;
  }
  .success-icon svg { width: 32px; height: 32px; }
  .modal-success h3 { margin-bottom: 8px; }
  .modal-success p {
    color: var(--text-muted);
    margin-bottom: 24px;
  }
  .submit-loading {
    opacity: 0.6;
    pointer-events: none;
  }
  body.modal-open { overflow: hidden; }

  /* ============ REVEAL ANIMATION ============ */
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  /* Hero is above the fold — show immediately, no animation */
  .hero-content, .hero-portrait {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* ============ RESPONSIVE ============ */
  @media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero-portrait { max-width: 320px; margin: 0 auto; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-card { position: static; }
    section { padding: 72px 0; }
    .hero { padding: 110px 0 60px; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-links.open {
      display: flex;
      position: absolute;
      top: 70px; left: 16px; right: 16px;
      flex-direction: column;
      background: var(--surface);
      border: 1px solid var(--border-strong);
      border-radius: 16px;
      padding: 12px;
      gap: 6px;
    }
    .nav-links.open a {
      padding: 14px 18px;
      min-height: 44px;
      display: flex;
      align-items: center;
      font-size: 16px;
      border-radius: 10px;
    }

    /* Left-hand mode: move hamburger before the logo */
    [data-hand="left"] .nav-inner { flex-direction: row-reverse; }
    [data-hand="left"] .nav-links.open {
      left: 16px;
      right: 16px;
      border-radius: 16px;
    }
    .contact-card { padding: 48px 24px; }
    .container { padding: 0 20px; }
    .floating-card.fc-1 { left: -10px; }
    .floating-card.fc-2 { right: -10px; }
  }

  @media (max-width: 540px) {
    .hero-stats { flex-wrap: wrap; gap: 24px; }
    .stat .num { font-size: 30px; }
    .toolbox { padding: 28px 24px; }
    .project-body { padding: 22px; }
    .modal { padding: 28px 24px; }
    .modal h3 { font-size: 24px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; justify-content: center; }
  }

  /* Focus states for a11y */
  a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
  }

  /* Screen-reader-only utility */
  .sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Skip-to-content link */
  .skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    background: var(--teal);
    color: var(--on-teal);
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.2s ease;
  }
  .skip-link:focus { top: 12px; }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
  }

  /* ============ THEME SWITCHER ============ */
  .theme-switcher { position: relative; margin-right: 8px; }
  .theme-toggle {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text);
    height: 40px;
    padding: 0 14px;
    gap: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
  }
  .theme-toggle:hover { background: var(--teal-soft); color: var(--teal-bright); }
  .theme-label { white-space: nowrap; }
  @media (max-width: 640px) {
    .theme-toggle { padding: 0; width: 44px; height: 44px; }
    .theme-label { display: none; }
    .theme-menu { left: auto; right: 0; transform: none; max-width: calc(100vw - 32px); }
  }
  .theme-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 8px;
  }
  @media (min-width: 769px) {
    .hand-pref-item { display: none; }
  }
  .theme-menu-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 10px 14px 4px;
  }
  .hand-seg {
    display: flex;
    gap: 4px;
    padding: 6px 10px 8px;
  }
  .hand-seg-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
  }
  .hand-seg-btn[aria-pressed="true"] {
    background: var(--teal-soft);
    color: var(--teal-bright);
    border-color: var(--teal);
    font-weight: 600;
  }
  .hand-seg-btn:hover {
    background: var(--teal-soft);
    color: var(--teal-bright);
  }
  .theme-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    list-style: none;
    margin: 0;
    box-shadow: var(--shadow-lg);
    z-index: 200;
  }
  .theme-menu[hidden] { display: none; }
  .theme-menu li { margin: 0; padding: 0; list-style: none; }
  .theme-menu button {
    background: transparent;
    border: none;
    color: var(--text);
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .theme-menu button:hover, .theme-menu button:focus-visible {
    background: var(--teal-soft);
    color: var(--teal-bright);
  }
  .theme-menu button[aria-current="true"] {
    color: var(--teal-bright);
    font-weight: 600;
  }
  .theme-menu button[aria-current="true"]::after {
    content: '';
    width: 10px; height: 10px;
    background: var(--teal);
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
  }
