/* ----------------------------------------------------------
   anujsh.com — minimal, linear-style
   ---------------------------------------------------------- */

:root {
    color-scheme: light dark;

    /* shared */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;

    --ease: cubic-bezier(0.2, 0, 0, 1);
    --dur-fast: 120ms;
    --dur: 180ms;
    --dur-slow: 320ms;

    --container: 1040px;
    --gutter: 24px;
    --gutter-lg: 32px;

    /* dark (default) */
    --bg: #08090a;
    --bg-elevated: #0f1011;
    --bg-hover: #16181b;
    --ink: #f7f8f8;
    --ink-2: #b4b8bf;
    --ink-3: #8a8f98;
    --ink-4: #5e6269;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --accent: #8b8fff;
    --accent-soft: rgba(139, 143, 255, 0.14);
    --accent-ink: #c7caff;

    --brand-surface: rgba(255, 255, 255, 0.96);
    --brand-outline: rgba(255, 255, 255, 0.1);
    --logo-filter: grayscale(1) brightness(2.2);
    --logo-filter-hover: grayscale(1) brightness(2.6);
    --btn-primary-bg: #f7f8f8;
    --btn-primary-fg: #08090a;
    --btn-primary-hover: #e4e6e8;
    --dot-green: #4ade80;
    --dot-green-glow: rgba(74, 222, 128, 0.45);
    --ambient-1: rgba(139, 143, 255, 0.08);
    --ambient-2: rgba(94, 106, 210, 0.06);
    --scrollbar-thumb: rgba(255, 255, 255, 0.14);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.22);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #fbfbfa;
        --bg-elevated: #ffffff;
        --bg-hover: #f2f2f0;
        --ink: #0a0a0b;
        --ink-2: #3a3d42;
        --ink-3: #6a6e75;
        --ink-4: #9a9ea4;
        --line: rgba(0, 0, 0, 0.08);
        --line-strong: rgba(0, 0, 0, 0.14);
        --accent: #5e6ad2;
        --accent-soft: rgba(94, 106, 210, 0.12);
        --accent-ink: #4852b8;

        --brand-surface: #ffffff;
        --brand-outline: rgba(0, 0, 0, 0.08);
        --logo-filter: none;
        --logo-filter-hover: none;
        --btn-primary-bg: #0a0a0b;
        --btn-primary-fg: #ffffff;
        --btn-primary-hover: #1f2024;
        --dot-green: #16a34a;
        --dot-green-glow: rgba(22, 163, 74, 0.35);
        --ambient-1: rgba(94, 106, 210, 0.07);
        --ambient-2: rgba(139, 143, 255, 0.05);
        --scrollbar-thumb: rgba(0, 0, 0, 0.14);
        --scrollbar-thumb-hover: rgba(0, 0, 0, 0.22);
    }
}

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

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    touch-action: pan-x pan-y;
}

body {
    font-family: var(--font-sans);
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 15px;
    letter-spacing: -0.005em;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

/* ---- Static ambient tint (subtle, below the shader) ------- */
body::before {
    content: '';
    position: fixed;
    inset: -10% -10% auto -10%;
    height: 60vh;
    background:
        radial-gradient(50% 50% at 30% 10%, var(--ambient-1) 0%, transparent 70%),
        radial-gradient(40% 40% at 80% 20%, var(--ambient-2) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* ---- Nav -------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px max(24px, calc((100vw - var(--container)) / 2 + 24px));
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav.scrolled {
    border-bottom-color: var(--line);
}

body.menu-open .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
    color: var(--ink);
    letter-spacing: -0.01em;
    padding: 6px 10px;
    margin: -6px -10px;
    border-radius: var(--radius-sm);
    transition: background var(--dur) var(--ease);
}

.nav-logo:hover {
    background: var(--bg-hover);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    position: relative;
    font-size: 13.5px;
    color: var(--ink-3);
    padding: 8px 12px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-links a:hover {
    color: var(--ink);
    background: var(--bg-hover);
}

.nav-links a.nav-link-active {
    color: var(--ink);
}

.nav-resume {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--ink);
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
    padding: 7px 12px;
    min-height: 32px;
    margin-left: 8px;
    border-radius: var(--radius-md);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), scale var(--dur-fast) var(--ease);
}

.nav-resume:hover {
    background: var(--bg-hover);
    border-color: var(--ink-4);
}

.nav-resume:active {
    scale: 0.96;
}

.nav-toggle {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
}

.nav-toggle span {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 1.5px;
    background: var(--ink);
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), top var(--dur) var(--ease);
    top: 16px;
}

.nav-toggle span:nth-child(2) {
    top: 22px;
}

.nav-toggle.active span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    top: 19px;
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-items {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    padding: 120px 32px 32px;
}

.mobile-menu-items a,
.mobile-menu-items button {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink-2);
    padding: 10px 0;
    transition: color var(--dur) var(--ease);
}

.mobile-menu-items a:hover,
.mobile-menu-items button:hover {
    color: var(--ink);
}

.mobile-resume {
    margin-top: 16px;
    color: var(--accent);
}

/* ---- Layout ---------------------------------------------- */
main {
    position: relative;
    z-index: 1;
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 96px 24px;
    max-width: var(--container);
    margin: 0 auto;
    position: relative;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 48px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.section-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.section-lead {
    font-size: clamp(22px, 4.6vw, 42px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 14px;
    text-wrap: balance;
}

.section-copy {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-size: clamp(16px, 1.8vw, 19px);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.005em;
    color: var(--ink-3);
    max-width: 52ch;
    margin-bottom: 48px;
    text-wrap: pretty;
}

/* ---- Hero ------------------------------------------------- */
.hero {
    position: relative;
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 64px;
    padding-bottom: 96px;
}

.hero > *:not(.hero-bg) {
    position: relative;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 800ms var(--ease);
    mix-blend-mode: screen;
}

@media (prefers-color-scheme: light) {
    .hero-bg {
        mix-blend-mode: normal;
        -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
    }
}

.hero-bg.ready {
    opacity: 1;
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-3);
    margin-bottom: 32px;
    padding: 6px 12px 6px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 999px;
    width: fit-content;
}

.hero-meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dot-green);
    box-shadow: 0 0 8px var(--dot-green-glow);
}

.hero-meta-sep {
    color: var(--ink-4);
}

.hero-title {
    font-size: clamp(40px, 6.2vw, 76px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--ink);
    margin-bottom: 28px;
    text-wrap: balance;
    max-width: 14ch;
}

.hero-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--ink-3);
}

.hero-subtitle {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 58ch;
    margin-bottom: 40px;
    text-wrap: pretty;
}

.hero-subtitle-primary {
    font-size: 18px;
    line-height: 1.45;
    color: var(--ink);
    letter-spacing: -0.005em;
    font-weight: 500;
}

.hero-subtitle-secondary {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink-3);
    letter-spacing: -0.005em;
    font-weight: 400;
}

.hero-subtitle a {
    font-family: inherit;
    font-weight: inherit;
    color: var(--ink);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.hero-subtitle a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.hero-subtitle-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    vertical-align: -3px;
}

.link-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    transition: transform var(--dur) var(--ease);
}

.hero-subtitle a:hover .link-favicon {
    transform: scale(1.06);
}


.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
    will-change: transform;
}

.hero-btn svg {
    width: 13px;
    height: 13px;
    transition: transform var(--dur) var(--ease);
}

.hero-btn:active {
    transform: scale(0.96);
}

.hero-btn-primary {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 32%, transparent);
    color: var(--accent-ink);
}

.hero-btn-primary:hover {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.hero-btn-primary:hover svg {
    transform: translateX(2px);
}

.hero-btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}

.hero-btn-ghost:hover {
    background: var(--bg-hover);
    border-color: var(--ink-4);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    height: 40px;
    min-width: 40px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.005em;
    border-radius: var(--radius-md);
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), scale var(--dur-fast) var(--ease);
    border: 1px solid transparent;
}

.btn:active {
    scale: 0.96;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-fg);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
}

.btn-secondary {
    background: var(--bg-elevated);
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--ink-4);
}

.btn-ghost {
    color: var(--ink-2);
}

.btn-ghost:hover {
    color: var(--ink);
    background: var(--bg-hover);
}

/* ---- Proof (worked across) ------------------------------- */
.proof {
    padding-top: 64px;
    padding-bottom: 64px;
}

.logo-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 104px;
    padding: 20px 24px;
    background: var(--brand-surface);
    border-radius: var(--radius-md);
    outline: 1px solid var(--brand-outline);
    outline-offset: -1px;
    transition: transform var(--dur) var(--ease);
    position: relative;
}

.logo-card:hover {
    transform: translateY(-1px);
}

.logo-card img {
    max-height: 28px;
    max-width: 130px;
    width: auto;
    opacity: 0.88;
    transition: opacity var(--dur) var(--ease);
}

.logo-card:hover img {
    opacity: 1;
}

/* ---- Projects -------------------------------------------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 36px;
}

.project-card {
    position: relative;
    background: var(--bg);
    padding: 36px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: inherit;
    transition: background var(--dur) var(--ease);
    min-height: 220px;
    min-width: 0;
}

.project-card:hover {
    background: var(--bg-elevated);
}

.project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.project-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-4);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.project-title {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.15;
    margin-top: -2px;
}

.project-desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-2);
    text-wrap: pretty;
    max-width: 52ch;
    flex: 1;
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 7px 12px 7px 10px;
    width: fit-content;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-2);
    letter-spacing: -0.005em;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.project-cta-mark {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.project-cta-label {
    white-space: nowrap;
}

.project-cta-arrow {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.project-card:hover .project-cta {
    background: var(--bg-hover);
    border-color: var(--line-strong);
    color: var(--ink);
}

.project-card:hover .project-cta-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* ---- Experience ------------------------------------------ */
.experience-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}

.experience-card {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 32px;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.experience-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    min-height: 72px;
    background: var(--brand-surface);
    border-radius: var(--radius-md);
    outline: 1px solid var(--brand-outline);
    outline-offset: -1px;
}

.experience-brand.text-brand {
    background: var(--bg-elevated);
    outline-color: var(--line);
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
    padding: 14px 16px;
}

.experience-brand img {
    max-height: 32px;
    max-width: 120px;
    width: auto;
    height: auto;
}

.experience-brand.dual-brand {
    gap: 16px;
}

.experience-brand.dual-brand img {
    max-height: 22px;
}

.experience-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.experience-copy-fullwidth {
    grid-column: 1 / 3;
}

.experience-role {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.experience-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-3);
    max-width: 58ch;
    text-wrap: pretty;
}

.experience-period {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* ---- Craft + Principles (simple grid) -------------------- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.note-card {
    background: var(--bg);
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background var(--dur) var(--ease);
}

.note-card:hover {
    background: var(--bg-elevated);
}

.note-index {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.note-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.note-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-3);
    text-wrap: pretty;
}

/* ---- Contact --------------------------------------------- */
.contact {
    padding-top: 96px;
    padding-bottom: 120px;
}

.contact-text {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.55;
    color: var(--ink-2);
    letter-spacing: 0.005em;
    max-width: 56ch;
    margin-bottom: 32px;
    text-wrap: pretty;
}

.contact-links {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 620px;
    border-top: 1px solid var(--line);
}

.contact-links li {
    position: relative;
}

.contact-row {
    display: grid;
    grid-template-columns: 34px 28px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 20px;
    padding: 18px 2px 18px 18px;
    min-height: 64px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    position: relative;
    isolation: isolate;
    transition: border-color var(--dur) var(--ease);
}

.contact-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform var(--dur-slow) var(--ease);
}

.contact-row::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    transition: opacity var(--dur) var(--ease);
}

.contact-row:hover::before,
.contact-row:focus-visible::before {
    transform: scaleY(1);
}

.contact-row:hover::after,
.contact-row:focus-visible::after {
    opacity: 1;
}

.contact-row:hover,
.contact-row:focus-visible {
    border-bottom-color: var(--line-strong);
}

.contact-row:focus-visible {
    outline: none;
}

.contact-row-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    transition: color var(--dur) var(--ease);
}

.contact-row:hover .contact-row-num {
    color: var(--accent);
}

.contact-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--ink-3);
    transition: color var(--dur) var(--ease);
}

.contact-row-icon svg {
    width: 18px;
    height: 18px;
}

.contact-row:hover .contact-row-icon {
    color: var(--ink);
}

.contact-row-value {
    display: inline-flex;
    min-width: 0;
    font-size: 15.5px;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.contact-row-value-text {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--dur) var(--ease);
}

.contact-row-value-text::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 420ms var(--ease);
}

.contact-row:hover .contact-row-value-text {
    color: var(--accent-ink);
}

.contact-row:hover .contact-row-value-text::after,
.contact-row:focus-visible .contact-row-value-text::after {
    transform: scaleX(1);
}

.contact-row-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--ink-4);
    transition: color var(--dur) var(--ease);
}

.contact-row-arrow svg {
    width: 12px;
    height: 12px;
    transition: transform var(--dur) var(--ease);
}

.contact-row:hover .contact-row-arrow {
    color: var(--accent);
}

.contact-row:hover .contact-row-arrow svg {
    transform: translate(2px, -2px);
}

/* ---- Footer ---------------------------------------------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 32px 24px;
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    color: var(--ink-4);
    flex-wrap: wrap;
}

/* ---- Resume Modal (full-screen preview) ----------------- */
.resume-modal {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
}

.resume-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.resume-modal-overlay {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--bg) 86%, #000);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.resume-modal-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    transform: scale(0.985) translateY(6px);
    opacity: 0.9;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.resume-modal.open .resume-modal-shell {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.resume-modal-bar {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
}

.resume-modal-title {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.resume-modal-file {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.resume-modal-download {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    background: transparent;
    color: var(--ink-2);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.resume-modal-download:hover {
    background: var(--bg-hover);
    color: var(--ink);
}

.resume-modal-download:active {
    background: var(--bg-hover);
}

.resume-modal-download svg {
    width: 14px;
    height: 14px;
    transition: transform var(--dur) var(--ease);
}

.resume-modal-download:hover svg {
    transform: translateY(1px);
}

.resume-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    color: var(--ink-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.resume-modal-close:hover {
    background: var(--bg-hover);
    color: var(--ink);
}

.resume-modal-close svg {
    width: 14px;
    height: 14px;
}

.resume-modal-body {
    flex: 1;
    min-height: 0;
    background: var(--bg);
    position: relative;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Centered column with a max width on desktop; full-bleed on mobile. */
    display: flex;
    justify-content: center;
    padding: 0;
}

.resume-preview {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 16px 12px 32px;
    box-sizing: border-box;
}

.resume-preview-status {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-3);
    text-align: center;
    padding: 32px 0;
}

.resume-canvas-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.resume-page-canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
}

body.resume-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .resume-modal,
    .resume-modal-shell {
        transition: none;
    }
}

@media (max-width: 640px) {
    .resume-modal-bar {
        padding: 10px 14px;
    }

    .resume-modal-file {
        display: none;
    }

    .resume-modal-download {
        height: 32px;
        padding: 0 10px;
        font-size: 12.5px;
    }

    .resume-modal-close {
        width: 32px;
        height: 32px;
    }
}

/* ---- Scroll reveal (JS-only; default visible for no-JS) --- */
.reveal {
    opacity: 1;
    transform: none;
}

body.js-ready .reveal {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}

body.js-ready .reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ---- Scrollbar ------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: 2px solid var(--bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* ---- 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;
    }

    body.js-ready .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---- Responsive ------------------------------------------ */
@media (max-width: 900px) {
    :root {
        --container: 720px;
    }

    .logo-row {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .experience-card {
        grid-template-columns: 140px 1fr;
        gap: 24px;
    }

    .experience-period {
        grid-column: 2 / 3;
        margin-top: -4px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14.5px;
    }

    .nav {
        padding: 12px 20px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    section {
        padding: 64px 20px;
    }

    .hero {
        padding-top: 40px;
        padding-bottom: 64px;
    }

    .hero-title {
        max-width: 100%;
    }

    .hero-cta {
        gap: 20px;
    }

    .section-head {
        margin-bottom: 32px;
    }

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

    .project-card {
        padding: 24px 22px;
    }

    .experience-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 24px 0;
    }

    .experience-brand {
        width: fit-content;
        max-width: 180px;
    }

    .experience-period {
        grid-column: 1 / 2;
        order: -1;
        margin-top: 0;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .contact-row {
        grid-template-columns: 28px 24px 1fr 24px;
        gap: 14px;
        padding: 16px 2px 16px 14px;
        min-height: 60px;
    }

    .contact-row-icon {
        width: 24px;
        height: 24px;
    }

    .contact-row-icon svg {
        width: 16px;
        height: 16px;
    }

    .contact-row-value {
        font-size: 15px;
    }
}

/* =================================================================
 * INVITE SECTION
 * A small editorial bridge between the contact list and the footer.
 * Asks the reader, in editorial italic, whether they'd like to read
 * Anuj's daily newspaper (HN digest, /news) or just the happy parts
 * (wholesome digest, /happy).
 *
 * Each link channels the aesthetic of its destination:
 *   - "my newspaper"   → Bodoni Moda italic, ink-and-letterpress
 *                       with a double masthead rule, hover
 *                       transitions toward the HN orange.
 *   - "the happy parts" → Caveat handwritten in marigold, sits
 *                       slightly askew, a felt-tip highlight
 *                       sweeps under it on hover.
 * ================================================================= */
.invite {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(72px, 9vw, 120px) var(--gutter) clamp(56px, 7vw, 96px);
    text-align: center;
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.invite-line {
    margin: 0 auto;
    max-width: 720px;
    font-family: 'Bodoni Moda', 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.6;
    color: var(--ink-2);
    letter-spacing: 0.005em;
    position: relative;
    z-index: 1;
}
.invite-clause {
    /* keep each question on its own line, never orphaning the '?' */
    display: block;
    white-space: normal;
    text-wrap: balance;
}
.invite-clause + .invite-clause {
    margin-top: 10px;
}
.invite-q {
    /* nudge the trailing question mark back toward its link so it
       hugs the word instead of floating away in italic sidebearing */
    display: inline-block;
    margin-left: -0.12em;
    color: var(--ink-3);
    font-weight: 400;
}

/* ===== "my newspaper" link ===================================== */
.invite-link--paper {
    color: var(--ink);
    text-decoration: none;
    display: inline-block;
    padding: 0 4px;
    position: relative;
    font-style: italic;
    font-weight: 700;
    transition: color 280ms var(--ease), transform 320ms cubic-bezier(.2,.7,.2,1);
    isolation: isolate;
}
.invite-link--paper .invite-link-label {
    position: relative;
    display: inline-block;
}
/* Double masthead rule. The bottom hairline is thicker, the upper
   one is gossamer, like an old-school newspaper section divider. */
.invite-link--paper .invite-link-label::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -8px;
    height: 5px;
    border-top:    2px solid currentColor;
    border-bottom: 0.6px solid currentColor;
    transform-origin: left center;
    transition: transform 360ms cubic-bezier(.2,.7,.2,1),
                bottom 280ms var(--ease),
                border-color 280ms var(--ease);
}
.invite-link--paper:hover,
.invite-link--paper:focus-visible {
    color: #ff6a36;
    transform: translateY(-2px);
    outline: 0;
}
.invite-link--paper:hover .invite-link-label::after,
.invite-link--paper:focus-visible .invite-link-label::after {
    transform: scaleX(1.04);
    bottom: -10px;
}

/* ===== "the happy parts" link ================================== */
.invite-link--bright {
    color: #d97706;
    text-decoration: none;
    display: inline-block;
    position: relative;
    padding: 0 6px;
    font-family: 'Caveat', 'Italiana', cursive;
    font-style: normal;
    font-weight: 700;
    font-size: 1.45em;
    line-height: 1;
    transform: rotate(-2.5deg);
    transition: transform 320ms cubic-bezier(.2,.7,.2,1),
                color 220ms var(--ease);
    isolation: isolate;
}
.invite-link--bright .invite-link-label {
    position: relative;
    display: inline-block;
}
/* Felt-tip highlight that sweeps left-to-right on hover. */
.invite-link--bright .invite-link-label::before {
    content: "";
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: 6%;
    height: 60%;
    background: linear-gradient(100deg,
        rgba(253, 224, 71, 0.55) 0%,
        rgba(253, 224, 71, 0.90) 50%,
        rgba(253, 224, 71, 0.55) 100%);
    border-radius: 2px;
    transform-origin: left center;
    transform: scaleX(0) skewX(-6deg);
    transition: transform 420ms cubic-bezier(.2,.7,.2,1);
    z-index: -1;
}
.invite-link--bright:hover,
.invite-link--bright:focus-visible {
    transform: rotate(0deg) translateY(-2px);
    color: #92400e;
    outline: 0;
}
.invite-link--bright:hover .invite-link-label::before,
.invite-link--bright:focus-visible .invite-link-label::before {
    transform: scaleX(1) skewX(-6deg);
}

@media (prefers-reduced-motion: reduce) {
    .invite-link--paper,
    .invite-link--bright {
        transition: color 220ms var(--ease);
    }
    .invite-link--paper:hover,
    .invite-link--bright:hover {
        transform: none;
    }
    .invite-link--paper:hover .invite-link-label::after,
    .invite-link--bright:hover .invite-link-label::before {
        transition: none;
    }
}

@media (max-width: 640px) {
    .invite {
        padding-top: 56px;
        padding-bottom: 48px;
    }
    .invite-line { font-size: clamp(19px, 5vw, 24px); }
    .invite-link--bright { font-size: 1.35em; }
}
