/* ===== Foundation ===== */
:root {
    --page: #ebe8df;
    --paper: #f8f7f2;
    --paper-soft: #fff1eb;
    --ink: #060606;
    --ink-soft: #1a1816;
    --muted: #66635d;
    --muted-2: #8a8680;
    --line: #111111;
    --line-soft: rgba(0, 0, 0, 0.14);
    --accent: #ff4726;
    --accent-dark: #d93013;
    --accent-soft: #fff1eb;
    --white: #ffffff;

    --mono: 'JetBrains Mono', monospace;
    --condensed: 'Roboto Condensed', sans-serif;
    --serif: 'Fraunces', Georgia, serif;
    --ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

    --shadow: 28px 32px 0 rgba(0, 0, 0, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    font-family: var(--ui);
    font-size: 16px;
    line-height: 1.55;
    background: var(--page);
    /* softened from 70px line-grid → subtle 24px dot-grid */
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.07) 1px, transparent 1px);
    background-size: 24px 24px;
}

body::selection,
::selection {
    color: var(--white);
    background: var(--accent);
}

a { color: inherit; }
button, input, textarea { font: inherit; }

.site-frame {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 34px 28px 64px;
}

.sheet {
    overflow: hidden;
    background: var(--paper);
    border: 1.5px solid var(--line);
    box-shadow: var(--shadow);
}

/* ===== Navigation ===== */
.nav {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto minmax(270px, 1fr);
    gap: 24px;
    align-items: center;
    min-height: 76px;
    padding: 0 38px;
    border-bottom: 1.5px solid var(--line);
}

.nav-logo {
    font-family: var(--condensed);
    font-size: 26px;
    font-weight: 900;
    text-decoration: none;
    line-height: 1;
    letter-spacing: -0.005em;
}

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

/* Accent-colored tittle on the lowercase i in "Yuri" — matches the trailing dot */
.nav-logo .dotted-i {
    color: inherit;
    position: relative;
    display: inline-block;
}
.nav-logo .dotted-i::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0.05em;
    width: 0.18em;
    height: 0.18em;
    background: var(--accent);
    border-radius: 50%;
    transform: translateX(-50%);
}

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

.nav-center {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color .15s;
}

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

/* ===== Shared Layout ===== */
.section-grid {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 36px;
    padding: 84px 38px;
    border-bottom: 1.5px solid var(--line);
}

/* ── Section index — fixed: blocks no longer overlap, summary copy ── */
.section-index {
    padding-top: 6px;
}

.section-index-num {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ink);
    text-transform: uppercase;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.section-index-summary {
    margin: 0 0 18px;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
}

.section-index-toc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}

.section-index-toc a {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-decoration: none;
    text-transform: uppercase;
    line-height: 1.6;
    padding: 4px 0 4px 16px;
    position: relative;
    transition: color .15s;
    width: max-content;
}

.section-index-toc a::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 8px;
    height: 1.5px;
    background: var(--line-soft);
    transition: background .15s, width .15s;
}

.section-index-toc a:hover { color: var(--ink); }
.section-index-toc a:hover::before { background: var(--accent); }

.section-index-toc a.active {
    color: var(--ink);
    font-weight: 500;
}

.section-index-toc a.active::before {
    background: var(--accent);
    width: 12px;
}

.section-main { min-width: 0; }

/* ── Section title — Fraunces serif, lower-case ── */
.section-title {
    max-width: 920px;
    margin: 0 0 48px;
    font-family: var(--serif);
    font-size: clamp(40px, 5.4vw, 68px);
    font-weight: 500;
    line-height: 1.0;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 144;
}

.section-title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 500;
}

/* ===== Hero ===== */
.hero {
    padding-top: 88px;
    padding-bottom: 88px;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-eyebrow::before {
    content: '';
    width: 32px;
    height: 1.5px;
    background: var(--accent);
}

.hero-main h1 {
    margin: 0;
    font-family: var(--condensed);
    font-size: clamp(60px, 9vw, 116px);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.hero-main h1 span {
    color: var(--accent);
}

.hero-copy {
    display: grid;
    grid-template-columns: minmax(360px, 0.62fr) minmax(210px, 0.38fr);
    gap: 56px;
    align-items: end;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--line-soft);
}

.hero-copy p {
    margin: 0;
    max-width: 580px;
    font-family: var(--ui);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.5;
}

.hero-copy .hero-note {
    color: var(--muted);
    font-size: 13px;
    font-family: var(--mono);
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0.01em;
}

/* ===== Proof Strip ===== */
.proof-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border-bottom: 1.5px solid var(--line);
    background: var(--paper);
}

.proof-cell {
    position: relative;
    min-height: 184px;
    padding: 26px 22px 22px;
    border-right: 1px solid var(--line-soft);
    background: var(--paper);
    min-width: 0;
    overflow: hidden;
}

.proof-cell:last-child { border-right: 0; }

.proof-cell::before {
    content: attr(data-num);
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--muted-2);
}

.proof-cell strong {
    display: block;
    margin: 28px 0 16px;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 56px;
    line-height: 0.95;
    letter-spacing: -0.025em;
    color: var(--ink);
    font-variation-settings: "opsz" 144;
    font-feature-settings: "tnum";
    white-space: nowrap;
}

.proof-cell strong em {
    font-style: normal;
    color: var(--accent);
    font-family: var(--condensed);
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 0;
    vertical-align: super;
    margin-left: 2px;
}

.proof-cell span {
    display: block;
    font-family: var(--ui);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--muted);
    overflow-wrap: break-word;
}

.proof-cell-hot {
    background: var(--ink);
}

.proof-cell-hot::before { color: rgba(255, 255, 255, 0.45); }
.proof-cell-hot strong { color: var(--accent); }
.proof-cell-hot strong em { color: var(--white); }
.proof-cell-hot span { color: rgba(255, 255, 255, 0.7); }

/* ===== Role Fit ===== */
.fit-box {
    border: 1.5px solid var(--line);
    padding: 28px;
    background: var(--paper);
}

.role-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 24px;
}

.role-tab {
    min-height: 34px;
    padding: 0 16px;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.role-tab:hover,
.role-tab:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    outline: none;
}

.role-tab.active {
    color: var(--white);
    background: var(--accent);
    border-color: var(--accent);
}

/* ── Role panel — three columns now: requirement · ladder · evidence ── */
.role-panel {
    display: none;
    grid-template-columns: 1fr 64px 1fr;
    border: 1px solid var(--line);
    background: var(--white);
}

.role-panel.active { display: grid; }

.fit-column {
    padding: 28px 30px 32px;
    background: var(--white);
    min-width: 0;
}

.fit-column-accent {
    background: var(--paper-soft);
}

.fit-column h3 {
    margin: 0 0 24px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fit-column-accent h3 {
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fit-column-accent h3::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: var(--accent);
    opacity: 0.4;
}

.fit-column ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.fit-column li {
    font-family: var(--ui);
    font-size: 15px;
    line-height: 1.55;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* ── Ladder column connecting requirement ↔ evidence ── */
.fit-ladder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 56px 0 32px;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper);
}

.fit-ladder::before {
    content: '';
    position: absolute;
    top: 64px;
    bottom: 40px;
    left: 50%;
    width: 1px;
    background: var(--accent);
    opacity: 0.35;
}

.fit-ladder .rung {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    background: var(--paper);
    font-family: var(--mono);
    font-size: 9px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    letter-spacing: 0.04em;
}

/* ===== Career ===== */
.career-list {
    border-top: 1.5px solid var(--line);
}

.career-item {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
    padding: 36px 0;
    border-bottom: 1px solid var(--line-soft);
}

.career-meta { padding-top: 4px; }

.career-when {
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.career-meta h3 {
    margin: 0 0 6px;
    font-family: var(--condensed);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.005em;
}

.career-org {
    color: var(--muted);
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ── Shoulder note: the lead bullet, promoted to a statement ── */
.career-shoulder {
    margin: 0 0 22px;
    max-width: 760px;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.012em;
    color: var(--ink);
    font-variation-settings: "opsz" 144;
}

.career-shoulder em {
    font-style: italic;
    color: var(--accent);
    font-weight: 500;
}

.career-body ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.career-body li {
    position: relative;
    max-width: 780px;
    padding-left: 22px;
    font-family: var(--ui);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--ink-soft);
}

.career-body li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 6px;
    height: 1.5px;
    background: var(--accent);
}

.resume-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 40px;
    border-top: 1.5px solid var(--line);
    border-left: 1.5px solid var(--line);
}

.resume-detail {
    min-height: 200px;
    padding: 26px 28px;
    border-right: 1.5px solid var(--line);
    border-bottom: 1.5px solid var(--line);
    background: var(--white);
}

.resume-detail h3 {
    margin: 0 0 16px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.resume-detail p {
    margin: 0;
    color: var(--muted);
    font-family: var(--ui);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

/* ===== Project · full-bleed ink section ===== */
.project-dark {
    background: var(--ink);
    color: var(--white);
}

.project-dark .section-index-num {
    color: var(--white);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.project-dark .section-index-summary {
    color: rgba(255, 255, 255, 0.6);
}

.project-dark .section-title {
    color: var(--white);
}

.project-dark .section-title em {
    color: var(--accent);
}

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

.project-copy {
    max-width: 720px;
    margin: -8px 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--ui);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.55;
}

.project-copy + .project-copy {
    margin-top: 18px;
}

.project-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.project-copy strong {
    color: var(--white);
    font-weight: 500;
}

.project-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    padding: 24px;
    color: var(--white);
    background: var(--accent);
    border: 1.5px solid var(--accent);
    font-family: var(--condensed);
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.005em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background .15s;
}

.project-link:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.project-link span {
    align-self: flex-end;
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 400;
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1.5px solid var(--line);
    border-left: 1.5px solid var(--line);
}

.contact-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 138px;
    padding: 20px 22px;
    color: var(--ink);
    background: var(--white);
    border-right: 1.5px solid var(--line);
    border-bottom: 1.5px solid var(--line);
    font-family: var(--ui);
    text-decoration: none;
    text-align: left;
    min-width: 0;
    transition: background .15s, color .15s;
}

.contact-link > span:first-child {
    display: block;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.contact-value {
    display: block;
    font-family: var(--condensed);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.005em;
    text-transform: none;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* Protected contact reveal — fits within the box */
.protected-contact .revealed { display: none; }
.protected-contact.show-real .masked { display: none; }
.protected-contact.show-real .revealed { display: inline; }
.protected-contact .masked { color: var(--muted); font-weight: 500; }
.protected-contact.loading .masked::after {
    content: '...';
    color: var(--accent);
    margin-left: 4px;
}
.protected-contact .contact-status {
    display: block;
    margin-top: 4px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    min-height: 12px;
}
.protected-contact.show-real .contact-value {
    font-size: 15px;
    line-height: 1.2;
}

.contact-link:hover {
    color: var(--white);
    background: var(--ink);
}

.contact-link:hover > span:first-child { color: var(--accent); }

.contact-location {
    color: var(--muted);
    cursor: default;
}

.contact-location:hover {
    color: var(--muted);
    background: var(--white);
}

/* ===== Footer ===== */
.footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 38px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer span:first-child {
    color: var(--ink);
    font-family: var(--condensed);
    font-size: 22px;
    font-weight: 900;
    text-transform: none;
    letter-spacing: -0.005em;
}

/* ===== Motion ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 650ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scroll-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .site-frame { padding: 24px 18px 44px; }
    .nav { grid-template-columns: 1fr auto; }
    .nav-center { display: none; }
    .section-grid {
        grid-template-columns: 160px minmax(0, 1fr);
        padding: 64px 30px;
        gap: 28px;
    }
    .hero { padding-top: 70px; padding-bottom: 70px; }
    .hero-copy { grid-template-columns: 1fr; gap: 22px; }
    .proof-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .proof-cell:nth-child(3) { border-right: 0; }
    .proof-cell:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
    .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .role-panel { grid-template-columns: 1fr 56px 1fr; }
    .career-item { grid-template-columns: 220px 1fr; gap: 32px; }
}

@media (max-width: 820px) {
    body { font-size: 15px; }

    .site-frame { padding: 14px 10px 32px; }
    .sheet { box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.08); }

    .nav { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
    .nav-links {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 52px 22px;
    }

    .section-index-num { display: inline-block; padding-bottom: 8px; }
    .section-index-summary { max-width: 580px; }
    .section-index-toc {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px 14px;
        padding-top: 14px;
    }
    .section-index-toc a { padding-left: 14px; }

    .hero-eyebrow { margin-bottom: 16px; }
    .hero-main h1 { font-size: 56px; line-height: 0.95; }
    .hero-copy { margin-top: 36px; padding-top: 22px; }
    .hero-copy p { font-size: 17px; }

    .section-title { margin-bottom: 32px; font-size: 38px; font-weight: 600; }
    .section-title em { font-weight: 600; }

    .fit-box { padding: 14px; }
    .role-panel { grid-template-columns: 1fr; }
    /* The ladder pairs requirement→evidence side-by-side; once stacked, it's just noise. */
    .fit-ladder { display: none; }
    .fit-column { border-bottom: 1px solid var(--line-soft); }
    .fit-column-accent { border-bottom: 0; }

    .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .proof-cell { border-bottom: 1px solid var(--line-soft); }
    .proof-cell:nth-child(2n) { border-right: 0; }
    .proof-cell:nth-child(2n+1) { border-right: 1px solid var(--line-soft); }
    .proof-cell:nth-last-child(-n+2) { border-bottom: 0; }

    .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .career-item { grid-template-columns: 1fr; gap: 16px; }
    .project-grid { grid-template-columns: 1fr; gap: 28px; }
    .resume-detail-grid { grid-template-columns: 1fr; }
    .resume-detail { min-height: 0; }
}

@media (max-width: 540px) {
    .nav-logo { font-size: 24px; }
    .nav-links a { font-size: 10px; }

    .hero-main h1 { font-size: 42px; }
    .hero-copy p { font-size: 16px; }

    .proof-strip { grid-template-columns: 1fr; }
    .proof-cell { min-height: 130px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .proof-cell:last-child { border-bottom: 0; }
    .proof-cell strong { font-size: 44px; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-link { min-height: 110px; }

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

    .fit-column { padding: 22px 18px; }
    .fit-column li { font-size: 14px; }

    .career-meta h3 { font-size: 22px; }
    .career-shoulder { font-size: 19px; font-weight: 500; }
    .career-shoulder em { font-weight: 600; }

    .footer { flex-direction: column; padding: 22px; }
}
