  :root {
    --ink: #dde1ec;
    --ink-soft: #9ba0b0;
    --ink-muted: #606472;
    --accent: #5b8ef5;
    --accent-light: #1a2540;
    --rule: #2a2d3a;
    --bg: #111318;
    --white: #1a1d26;
    --tag-neutral-bg: #252830;
    --tag-neutral-color: #9ba0b0;
    --page: 21cm;
  }

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

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  .page {
    max-width: 860px;
    margin: 40px auto;
    background: var(--white);
    box-shadow: 0 4px 40px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  }

  /* DARK MODE TOGGLE */
  .toolbar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    gap: 6px;
  }

  .theme-toggle {
    background: var(--white);
    border: 1px solid var(--rule);
    color: var(--ink-soft);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
  }

  /* HEADER */
  .header {
    padding: 52px 60px 44px;
    border-bottom: 1px solid var(--rule);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    position: relative;
    overflow: hidden;
  }

  .header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 60%, transparent 100%);
  }

  .header-left {}

  .name {
    font-family: 'DM Serif Display', serif;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin-bottom: 10px;
  }

  .title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .subtitle {
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 300;
  }

  .profile-photo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 50%;
    border: 2px solid var(--rule);
    display: block;
    margin-left: auto;
    margin-bottom: 12px;
  }

  .header-right {
    text-align: right;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 2;
  }

  .header-right a {
    color: var(--accent);
    text-decoration: none;
  }

  .contact-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    display: block;
    margin-bottom: 4px;
    margin-top: 12px;
  }

  .contact-label:first-child { margin-top: 0; }

  /* BODY LAYOUT */
  .body {
    display: grid;
    grid-template-columns: 1fr 260px;
  }

  .main {
    padding: 44px 48px 48px 60px;
    border-right: 1px solid var(--rule);
  }

  .sidebar {
    padding: 44px 36px 48px 36px;
  }

  /* SECTIONS */
  .section {
    margin-bottom: 40px;
  }

  .section:last-child { margin-bottom: 0; }

  .section-narrow { max-width: 680px; }

  .section-title {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--accent-light);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--accent-light);
    display: none;
  }

  /* ABOUT */
  .about-text {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--ink-soft);
    margin-bottom: 14px;
  }

  .about-text:last-child { margin-bottom: 0; }

  .about-quote {
    margin-top: 18px;
    padding: 16px 20px;
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.7;
    font-style: italic;
  }

  /* EXPERIENCE */
  .job {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--rule);
    position: relative;
  }

  .job:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    gap: 12px;
  }

  .job-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
  }

  .job-period {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--ink-muted);
    white-space: nowrap;
    padding-top: 2px;
  }

  .job-company {
    font-size: 12.5px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 10px;
  }

  .job-desc {
    font-size: 12.5px;
    color: var(--ink-muted);
    margin-bottom: 10px;
    font-style: italic;
  }

  .job-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .job-bullets li {
    font-size: 12.5px;
    color: var(--ink-soft);
    padding-left: 16px;
    position: relative;
    line-height: 1.55;
  }

  .job-bullets li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 11px;
    top: 1px;
  }

  /* SIDEBAR SKILLS */
  .skill-group {
    margin-bottom: 24px;
  }

  .skill-group:last-child { margin-bottom: 0; }

  .skill-group-title {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 10px;
  }

  .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 3px;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
  }

  .tag-primary {
    background: var(--accent);
    color: white;
  }

  .tag-secondary {
    background: var(--accent-light);
    color: var(--accent);
  }

  .tag-neutral {
    background: var(--tag-neutral-bg);
    color: var(--tag-neutral-color);
  }

  /* PROJECTS */
  .project {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule);
  }

  .project:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .project-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 3px;
  }

  .project-name a {
    color: var(--accent);
    text-decoration: none;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    margin-left: 6px;
  }

  .project-desc {
    font-size: 11.5px;
    color: var(--ink-muted);
    line-height: 1.55;
  }

  /* EDUCATION */
  .edu-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
  }

  .edu-sub {
    font-size: 12px;
    color: var(--ink-muted);
  }

  /* PERSONAL */
  .personal-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-soft);
  }

  .personal-row:last-child { border-bottom: none; }

  .personal-label {
    font-family: 'DM Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
  }

  /* FOOTER */
  .footer {
    padding: 16px 60px;
    border-top: 1px solid var(--rule);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--ink-muted);
    display: flex;
    justify-content: space-between;
    background: var(--bg);
  }

  @media (max-width: 640px) {
    .page { margin: 0; box-shadow: none; }

    .header {
      padding: 32px 24px 28px;
      grid-template-columns: 1fr;
    }

    .header-right {
      text-align: left;
      line-height: 1.8;
    }

    .contact-label { margin-top: 10px; }

    .name { font-size: 30px; }

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

    .main {
      padding: 32px 24px;
      border-right: none;
      border-bottom: 1px solid var(--rule);
    }

    .sidebar { padding: 32px 24px; }

    .footer { padding: 16px 24px; flex-direction: column; gap: 4px; }

    .toolbar { top: 8px; right: 8px; }
  }

  @page { margin-top: 16mm; }
  @page :first { margin-top: 0; }

  @media print {
    :root {
      --ink: #0f1117;
      --ink-soft: #3a3d47;
      --ink-muted: #7a7e8a;
      --accent: #1a56db;
      --accent-light: #e8effe;
      --rule: #e0e2e8;
      --bg: #f8f8f6;
      --white: #ffffff;
      --tag-neutral-bg: #f0f0ee;
      --tag-neutral-color: #3a3d47;
    }
    body { background: white; }
    .page { margin: 0; box-shadow: none; max-width: 100%; }
    .footer { display: none; }
    .toolbar { display: none; }
    .job, .project { page-break-inside: avoid; }
    .section { page-break-inside: avoid; }
    .body { display: grid; grid-template-columns: 1fr 260px; }
    .main { border-right: 1px solid #e0e2e8; }
  }

  /* ==================== SITE (multi-page) ==================== */

  /* NAV */
  .nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
  }

  .nav-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 19px;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
  }

  .nav-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-family: 'DM Mono', monospace;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .nav-actions { display: flex; gap: 6px; }

  .nav-external { color: var(--accent); }

  .link-accent { color: var(--accent); }

  /* HERO */
  .hero {
    max-width: 860px;
    margin: 0 auto;
    padding: 72px 24px 56px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
  }

  .hero-name {
    font-family: 'DM Serif Display', serif;
    font-size: 46px;
    line-height: 1.08;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
  }

  .hero-pitch {
    font-size: 14.5px;
    color: var(--ink-soft);
    line-height: 1.75;
    max-width: 520px;
    margin-bottom: 26px;
  }

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

  .btn {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    padding: 11px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
  }

  .btn-primary { background: var(--accent); color: #fff; }
  .btn-secondary { border: 1px solid var(--rule); color: var(--ink-soft); }
  .btn-secondary:hover { color: var(--accent); border-color: var(--accent); }

  .hero-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 3px solid var(--rule);
    display: block;
  }

  /* STATS STRIP */
  .stats-strip {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 56px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .stat {
    background: var(--accent-light);
    padding: 20px 18px;
    border-radius: 6px;
  }

  .stat-value {
    font-family: 'DM Mono', monospace;
    font-size: 21px;
    color: var(--accent);
    font-weight: 500;
    line-height: 1.2;
  }

  .stat-label {
    font-size: 11px;
    color: var(--ink-soft);
    margin-top: 6px;
    line-height: 1.4;
  }

  /* CONTAINER / PAGE HEADER */
  .container { max-width: 860px; margin: 0 auto; padding: 48px 24px; }
  .container.no-top { padding-top: 0; }
  .container.no-bottom { padding-bottom: 0; }

  .page-header { margin-bottom: 36px; }

  .page-title {
    font-family: 'DM Serif Display', serif;
    font-size: 32px;
    color: var(--ink);
    margin-bottom: 8px;
  }

  .page-subtitle { color: var(--ink-muted); font-size: 13.5px; line-height: 1.6; max-width: 560px; }

  .page-title-sm { font-size: 22px; }
  .page-title-md { font-size: 24px; }

  /* CONTENT CARD (wraps reused .body/.main/.sidebar from CV) */
  .content-card {
    max-width: 860px;
    margin: 0 auto 48px;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
  }

  /* CARDS GRID (projects) */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .card {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 22px;
  }

  a.card { text-decoration: none; }

  .card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
  }

  .card-title a {
    color: var(--accent);
    text-decoration: none;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    margin-left: 6px;
  }

  .card-desc { font-size: 12.5px; color: var(--ink-muted); line-height: 1.6; }

  /* CASE STUDY */
  .case-study {
    max-width: 860px;
    margin: 0 auto 48px;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 40px;
  }

  .case-study-tag {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 12px;
  }

  .case-study-title {
    font-family: 'DM Serif Display', serif;
    font-size: 25px;
    color: var(--ink);
    margin-bottom: 8px;
  }

  .case-study-intro {
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 28px;
    max-width: 640px;
    line-height: 1.6;
  }

  .case-study-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 30px;
  }

  .case-study-col-title {
    font-family: 'DM Mono', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    margin-bottom: 10px;
  }

  .case-study-col p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.65; margin-bottom: 8px; }

  .case-study-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }

  .case-study-col li {
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
  }

  .case-study-col li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 11px;
  }

  .case-study-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px solid var(--rule);
    padding-top: 26px;
  }

  .metric-value {
    font-family: 'DM Mono', monospace;
    font-size: 19px;
    color: var(--accent);
    font-weight: 500;
  }

  .metric-label { font-size: 11px; color: var(--ink-muted); margin-top: 4px; line-height: 1.4; }

  /* CONTACT */
  .contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 40px;
  }

  .contact-card {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 26px 20px;
    text-align: center;
  }

  .contact-card a { color: var(--accent); text-decoration: none; font-family: 'DM Mono', monospace; font-size: 13px; }

  .contact-location { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--ink-soft); }

  .contact-label2 {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    display: block;
    margin-bottom: 10px;
  }

  .contact-note {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.7;
    max-width: 560px;
  }

  /* SITE FOOTER */
  .site-footer {
    border-top: 1px solid var(--rule);
    background: var(--bg);
    padding: 24px;
  }

  .footer-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-family: 'DM Mono', monospace;
    font-size: 10.5px;
    color: var(--ink-muted);
  }

  .footer-inner a { color: var(--ink-muted); text-decoration: none; }
  .footer-inner a:hover { color: var(--accent); }

  @media (max-width: 640px) {
    .nav-inner { padding: 12px 16px; }
    .nav-links { gap: 12px; }
    .hero { grid-template-columns: 1fr; padding: 48px 20px 36px; }
    .hero-photo { width: 96px; height: 96px; }
    .hero-name { font-size: 34px; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); padding: 0 20px 40px; }
    .container { padding: 32px 20px; }
    .cards-grid { grid-template-columns: 1fr; }
    .case-study { padding: 24px; }
    .case-study-cols { grid-template-columns: 1fr; gap: 20px; }
    .case-study-metrics { grid-template-columns: 1fr; gap: 18px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; }
  }
