:root {
    --ink: #0a0a0a;
    --paper: #f2efe9;
    --paper-2: #e8e4dc;
    --rule: #0a0a0a;
    --muted: #6a675f;
    --accent: #ff3b1f; /* signal red-orange */
    --accent-ink: #0a0a0a;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { background: var(--paper); color: var(--ink); }
  body {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }

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

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

  .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-feature-settings: "ss01"; }
  .serif { font-family: "Instrument Serif", "Times New Roman", serif; font-weight: 400; letter-spacing: -0.01em; }
  .upper { text-transform: uppercase; letter-spacing: 0.04em; }

  /* ============ TICKER NAV ============ */
  .topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--ink); color: var(--paper);
    border-bottom: 2px solid var(--ink);
    overflow: hidden;
    height: 38px;
    display: flex; align-items: center;
  }
  .ticker {
    display: flex; gap: 48px; white-space: nowrap;
    animation: ticker 60s linear infinite;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  }
  .ticker span { display: inline-flex; align-items: center; gap: 12px; }
  .ticker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
  @keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  /* ============ FRAME ============ */
  .frame {
    border-left: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    max-width: 1440px;
    margin: 0 auto;
    background: var(--paper);
    position: relative;
  }

  /* ============ HEADER META ============ */
  .meta-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
    border-bottom: 2px solid var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .meta-row > div {
    padding: 14px 20px;
    border-right: 1px solid var(--ink);
  }
  .meta-row > div:last-child { border-right: none; }
  .meta-row .k { color: var(--muted); display: block; margin-bottom: 4px; font-size: 10px; }
  .meta-row .v { color: var(--ink); font-size: 12px; }
  .blink { animation: blink 1.2s steps(2, end) infinite; }
  @keyframes blink { 50% { opacity: 0; } }

  /* ============ HERO ============ */
  .hero {
    padding: 56px 40px 24px;
    border-bottom: 2px solid var(--ink);
    position: relative;
  }
  .hero-tag {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 28px;
  }
  .hero-tag .l { color: var(--ink); }
  .hero h1 {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: clamp(72px, 13vw, 220px);
    line-height: 0.85;
    letter-spacing: -0.05em;
    text-transform: uppercase;
  }
  .hero h1 .it {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
  }
  .hero h1 .accent { color: var(--accent); }

  .hero-sub {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: end;
  }
  .hero-sub .lede {
    font-family: "Instrument Serif", serif;
    font-size: clamp(22px, 2.4vw, 34px);
    line-height: 1.18;
    max-width: 28ch;
    text-wrap: pretty;
  }
  .hero-sub .lede em { font-style: italic; }
  .hero-sub .lede u {
    text-decoration: none;
    background: var(--accent);
    color: var(--paper);
    padding: 0 6px;
  }
  .hero-stats {
    display: grid;
    gap: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .hero-stats .row {
    display: flex; justify-content: space-between;
    border-bottom: 1px dashed var(--ink);
    padding-bottom: 8px;
  }
  .hero-stats .row span:last-child { color: var(--muted); }

  /* portrait card */
  .portrait-strip {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr 1fr;
    border-bottom: 2px solid var(--ink);
  }
  .portrait-strip > div {
    padding: 24px 20px;
    border-right: 1px solid var(--ink);
    min-height: 220px;
  }
  .portrait-strip > div:last-child { border-right: none; }

  .portrait {
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    background: var(--paper-2);
  }
  .portrait img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
    display: block;
    filter: grayscale(0.15) contrast(1.02);
    transition: filter 0.4s ease, transform 0.6s ease;
  }
  .portrait:hover img {
    filter: grayscale(0) contrast(1.05);
    transform: scale(1.03);
  }
  .portrait .tag {
    position: absolute;
    bottom: 12px; left: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: var(--ink);
    color: var(--paper);
    padding: 4px 8px;
    z-index: 2;
  }
  .portrait .tag .dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); margin-right: 6px;
    vertical-align: middle;
  }

  .id-card .label {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px; letter-spacing: 0.08em;
  }
  .id-card .big {
    font-family: "Instrument Serif", serif;
    font-size: 38px; line-height: 1; margin-bottom: 6px;
  }
  .id-card .small {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; color: var(--ink);
  }
  .id-card.numeric .big { font-family: "Space Grotesk", sans-serif; font-weight: 500; letter-spacing: -0.03em; }

  /* ============ SECTION HEAD ============ */
  .section-head {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: baseline;
    border-bottom: 2px solid var(--ink);
    padding: 28px 40px 20px;
    gap: 24px;
  }
  .section-head .num {
    font-family: "JetBrains Mono", monospace;
    font-size: 12px; color: var(--muted);
    letter-spacing: 0.06em;
  }
  .section-head .title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: clamp(40px, 5.5vw, 84px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-transform: uppercase;
  }
  .section-head .title .it {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
  }
  .section-head .meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted);
    text-align: right;
    line-height: 1.6;
  }

  /* ============ EXPERIENCE ============ */
  .exp-list { border-bottom: 2px solid var(--ink); }
  .exp {
    border-bottom: 1px solid var(--ink);
    padding: 28px 40px;
    display: grid;
    grid-template-columns: 110px 1fr 1fr 60px;
    gap: 24px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    position: relative;
  }
  .exp:last-child { border-bottom: none; }
  .exp:hover { background: var(--ink); color: var(--paper); }
  .exp:hover .role .arrow { transform: translateX(8px) rotate(-45deg); }
  .exp:hover .when { color: var(--accent); }
  .exp:hover .where { color: var(--paper); }
  .exp:hover .body { color: var(--paper); }

  .exp .when {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--muted);
    padding-top: 8px;
    transition: color 0.25s ease;
  }
  .exp .role {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px;
  }
  .exp .role h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(22px, 2.6vw, 36px);
    line-height: 1; letter-spacing: -0.02em;
    font-weight: 500;
  }
  .exp .role h3 .at {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
    color: var(--muted);
  }
  .exp:hover .role h3 .at { color: var(--accent); }
  .exp .where {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; text-transform: uppercase;
    color: var(--muted);
    margin-top: 8px;
    transition: color 0.25s ease;
  }
  .exp .body {
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    max-width: 50ch;
    transition: color 0.25s ease;
    text-wrap: pretty;
  }
  .exp .arrow {
    align-self: start;
    width: 38px; height: 38px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 16px;
    transition: transform 0.3s ease;
  }

  /* ============ SKILLS ============ */
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 2px solid var(--ink);
  }
  .skill-col {
    padding: 32px 32px 40px;
    border-right: 1px solid var(--ink);
  }
  .skill-col:last-child { border-right: none; }
  .skill-col .head {
    display: flex; align-items: baseline; gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ink);
  }
  .skill-col .num {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; color: var(--muted);
  }
  .skill-col .head h4 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 22px;
    letter-spacing: -0.02em;
    font-weight: 500;
    text-transform: uppercase;
  }
  .skill-col ul { list-style: none; display: grid; gap: 10px; }
  .skill-col li {
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex; align-items: baseline; gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dotted var(--ink);
    cursor: default;
    transition: padding 0.25s ease, color 0.25s ease;
  }
  .skill-col li:hover {
    padding-left: 12px;
    color: var(--accent);
  }
  .skill-col li::before {
    content: "+"; color: var(--muted); font-weight: 400;
  }
  .skill-col li:hover::before { color: var(--accent); }

  /* skills sidebar (toolkit big text) */
  .toolkit {
    border-bottom: 2px solid var(--ink);
    padding: 36px 40px 48px;
    overflow: hidden;
  }
  .toolkit-marquee {
    display: flex; gap: 48px;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 8vw, 132px);
    line-height: 0.9;
    font-weight: 500;
    letter-spacing: -0.04em;
    text-transform: uppercase;
  }
  .toolkit-marquee .it {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
  }
  .toolkit-marquee .out {
    -webkit-text-stroke: 1.5px var(--ink);
    color: transparent;
  }
  .toolkit-marquee .ac { color: var(--accent); }
  @keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  /* ============ EDUCATION ============ */
  .edu-list { border-bottom: 2px solid var(--ink); }
  .edu {
    display: grid;
    grid-template-columns: 110px 1fr 1fr;
    gap: 24px;
    padding: 22px 40px;
    border-bottom: 1px dashed var(--ink);
    align-items: baseline;
  }
  .edu:last-child { border-bottom: none; }
  .edu .yr {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; color: var(--muted);
  }
  .edu .what {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }
  .edu .where {
    font-family: "JetBrains Mono", monospace;
    font-size: 12px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.04em;
  }

  /* ============ NOW PLAYING / SIDE BLOCK ============ */
  .now-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid var(--ink);
  }
  .now {
    padding: 32px 40px;
    border-right: 1px solid var(--ink);
  }
  .now:last-child { border-right: none; }
  .now .head {
    display: flex; align-items: center; gap: 10px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 18px;
  }
  .now .head .live {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
  }
  .now h3 {
    font-family: "Instrument Serif", serif;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.1;
    margin-bottom: 14px;
    text-wrap: pretty;
  }
  .now h3 em { font-style: italic; }
  .now p {
    font-size: 14px; line-height: 1.55;
    max-width: 42ch; color: var(--ink);
    text-wrap: pretty;
  }

  .langs ul { list-style: none; display: grid; gap: 12px; margin-top: 8px; }
  .langs li {
    display: grid;
    grid-template-columns: 110px 1fr 130px;
    align-items: center;
    gap: 16px;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 10px 0;
    border-bottom: 1px dotted var(--ink);
  }
  .langs li > span:last-child { text-align: right; }
  .langs li:last-child { border-bottom: none; }
  .langs .name { font-size: 18px; font-family: "Space Grotesk"; letter-spacing: -0.01em; text-transform: none; }
  .langs .bar {
    width: 100%; height: 8px;
    border: 1px solid var(--ink);
    position: relative; overflow: hidden;
  }
  .langs .bar i {
    display: block; height: 100%;
    background: var(--ink);
  }

  /* ============ CONTACT / CTA ============ */
  .cta {
    padding: 64px 40px 80px;
    border-bottom: 2px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    position: relative;
    overflow: hidden;
  }
  .cta .lead {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(56px, 9vw, 152px);
    line-height: 0.85;
    letter-spacing: -0.05em;
    font-weight: 500;
    text-transform: uppercase;
  }
  .cta .lead .it {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
  }
  .cta .lead .ac { color: var(--accent); }
  .cta-row {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--paper);
  }
  .cta-row a, .cta-row div {
    padding: 22px 16px;
    border-right: 1px solid var(--paper);
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .cta-row a:last-child, .cta-row div:last-child { border-right: none; }
  .cta-row a:hover { background: var(--accent); color: var(--ink); }
  .cta-row .k { color: rgba(242,239,233,0.5); display: block; margin-bottom: 6px; font-size: 10px; }
  .cta-row .v { color: var(--paper); font-size: 14px; }

  /* ============ FOOTER ============ */
  .footer {
    padding: 18px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted);
  }
  .footer .c { text-align: center; }
  .footer .r { text-align: right; }

  /* ============ INTERESTS BAND ============ */
  .interests {
    padding: 28px 40px;
    border-bottom: 2px solid var(--ink);
    display: flex; flex-wrap: wrap; gap: 10px;
    align-items: center;
  }
  .interests .label {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted);
    margin-right: 8px;
  }
  .chip {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    padding: 7px 14px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    cursor: default;
    transition: background 0.2s, color 0.2s, transform 0.2s;
  }
  .chip:hover { background: var(--ink); color: var(--paper); transform: rotate(-2deg); }
  .chip.ac:hover { background: var(--accent); border-color: var(--accent); }

  /* fade-up on scroll */
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.in { opacity: 1; transform: translateY(0); }

  @media (max-width: 880px) {
    .hero { padding: 36px 20px 16px; }
    .hero-sub { grid-template-columns: 1fr; gap: 24px; }
    .meta-row { grid-template-columns: 1fr 1fr; }
    .meta-row > div { border-bottom: 1px solid var(--ink); }
    .portrait-strip { grid-template-columns: 1fr 1fr; }
    .portrait-strip > div { border-bottom: 1px solid var(--ink); min-height: 160px; }
    .section-head { grid-template-columns: 40px 1fr; padding: 22px 20px 16px; }
    .section-head .meta { display: none; }
    .exp { grid-template-columns: 1fr; padding: 22px 20px; }
    .exp .arrow { display: none; }
    .skills-grid { grid-template-columns: 1fr; }
    .skill-col { border-right: none; border-bottom: 1px solid var(--ink); }
    .edu { grid-template-columns: 80px 1fr; padding: 18px 20px; }
    .edu .where { grid-column: 1 / -1; }
    .now-row { grid-template-columns: 1fr; }
    .now { border-right: none; border-bottom: 1px solid var(--ink); }
    .cta { padding: 40px 20px 60px; }
    .cta-row { grid-template-columns: 1fr 1fr; }
    .cta-row a, .cta-row div { border-bottom: 1px solid var(--paper); }
    .interests { padding: 22px 20px; }
    .footer { grid-template-columns: 1fr; gap: 8px; padding: 16px 20px; }
    .footer .c, .footer .r { text-align: left; }
  }