:root {
    --ink: #171511;
    --muted: #6f675b;
    --paper: #f4efe4;
    --paper-2: #e8dfce;
    --line: rgba(23, 21, 17, 0.16);
    --line-strong: rgba(23, 21, 17, 0.38);
    --signal: #b8ff2c;
    --signal-dark: #7ab800;
    --blueprint: #153fd6;
    --rust: #b4512a;
    --white: #fffaf0;
    --shadow: 0 24px 70px rgba(23, 21, 17, 0.13);
    --radius: 26px;
    --max: 1160px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "IBM Plex Mono", monospace;
    color: var(--ink);
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(184, 255, 44, 0.22),
            transparent 24rem
        ),
        radial-gradient(
            circle at 85% 5%,
            rgba(21, 63, 214, 0.13),
            transparent 26rem
        ),
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px), var(--paper);
    background-size:
        auto,
        auto,
        42px 42px,
        42px 42px,
        auto;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0.32;
    background-image: repeating-radial-gradient(
        circle at 20% 30%,
        rgba(23, 21, 17, 0.08) 0 1px,
        transparent 1px 6px
    );
    mix-blend-mode: multiply;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    background: var(--ink);
    transform: translateY(100%);
    transition: transform 0.34s cubic-bezier(0.76, 0, 0.24, 1);
}

body.page-exit::after,
html.from-blog body::after {
    transform: translateY(0);
}

html.from-blog.page-entered body::after {
    transform: translateY(100%);
}

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

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

.shell {
    width: min(var(--max), calc(100% - 36px));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    background: var(--ink);
    color: var(--paper);
    padding: 12px 16px;
    z-index: 100;
    border-radius: 999px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

.site-header {
    position: sticky;
    top: 14px;
    z-index: 30;
    padding-block: 14px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line-strong);
    background: rgba(244, 239, 228, 0.82);
    backdrop-filter: blur(16px);
    border-radius: 999px;
    padding: 10px 12px 10px 18px;
    box-shadow: 0 10px 30px rgba(23, 21, 17, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border: 2px solid var(--white);
    outline: 1px solid var(--ink);
    border-radius: 50%;
    background-image: url("assets/sanjayram-a.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 3px rgba(184, 255, 44, 0.35);
    flex: 0 0 auto;
}

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

.nav-links a {
    display: inline-flex;
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--ink);
    background: rgba(23, 21, 17, 0.07);
    outline: none;
}

.resume-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.82rem;
    border: 1px solid var(--ink);
    transition: 0.2s ease;
    white-space: nowrap;
}

.resume-mini:hover {
    transform: translateY(-1px);
    background: var(--blueprint);
    border-color: var(--blueprint);
}

.menu-button {
    display: none;
    border: 1px solid var(--line-strong);
    background: transparent;
    padding: 10px 12px;
    border-radius: 999px;
    font-family: inherit;
    cursor: pointer;
}

.hero {
    position: relative;
    padding: 84px 0 70px;
    min-height: calc(100vh - 90px);
    display: grid;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    gap: 42px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 250, 240, 0.52);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 24px;
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--signal-dark);
    box-shadow: 0 0 0 6px rgba(184, 255, 44, 0.28);
    animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.58;
    }
}

.hero h1 {
    font-family: "Fraunces", serif;
    font-size: clamp(4.1rem, 12vw, 10.2rem);
    line-height: 0.82;
    letter-spacing: -0.085em;
    max-width: 900px;
    font-weight: 800;
}

.hero h1 .cut {
    display: inline-block;
    position: relative;
    color: transparent;
    -webkit-text-stroke: 1.6px var(--ink);
}

.hero-copy {
    max-width: 680px;
    margin-top: 30px;
    font-size: clamp(1rem, 1.65vw, 1.24rem);
    line-height: 1.75;
    color: var(--muted);
}

.hero-copy strong {
    color: var(--ink);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.22s ease;
    cursor: pointer;
}

.button-primary {
    background: var(--signal);
    box-shadow: 4px 4px 0 var(--ink);
}

.button-primary:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--ink);
}

.button-ghost {
    background: rgba(255, 250, 240, 0.45);
}

.button-ghost:hover {
    background: var(--ink);
    color: var(--paper);
}

.lab-card {
    position: relative;
    border: 1px solid var(--line-strong);
    background: rgba(255, 250, 240, 0.56);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    transform: rotate(1.2deg);
    isolation: isolate;
}

.lab-card::before {
    content: "";
    position: absolute;
    inset: 13px;
    border: 1px dashed rgba(23, 21, 17, 0.22);
    border-radius: calc(var(--radius) - 10px);
    pointer-events: none;
    z-index: -1;
}

.lab-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.status-pill {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 9px;
    background: var(--signal);
    color: var(--ink);
    letter-spacing: 0;
    text-transform: none;
}

.signal-window {
    min-height: 310px;
    border-radius: 20px;
    border: 1px solid var(--line-strong);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(21, 63, 214, 0.08), transparent 46%),
        var(--ink);
    position: relative;
}

.signal-window svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.node {
    position: absolute;
    width: 66px;
    height: 66px;
    border-radius: 22px;
    border: 1px solid rgba(255, 250, 240, 0.36);
    background: rgba(255, 250, 240, 0.08);
    color: var(--paper);
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    backdrop-filter: blur(6px);
}

.node:nth-of-type(1) {
    left: 9%;
    top: 18%;
}

.node:nth-of-type(2) {
    right: 13%;
    top: 24%;
}

.node:nth-of-type(3) {
    left: 28%;
    bottom: 16%;
}

.node:nth-of-type(4) {
    right: 12%;
    bottom: 14%;
    background: var(--signal);
    color: var(--ink);
    border-color: var(--signal);
}

.lab-caption {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
    margin-top: 16px;
}

.lab-caption p {
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--muted);
}

.metric {
    font-family: "Fraunces", serif;
    font-size: 2.4rem;
    line-height: 0.95;
    letter-spacing: -0.06em;
    color: var(--blueprint);
}

section {
    padding: 78px 0;
    position: relative;
}

.section-heading {
    display: grid;
    grid-template-columns: 0.38fr 1fr;
    gap: 26px;
    align-items: end;
    margin-bottom: 28px;
}

.kicker {
    color: var(--rust);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}

.section-heading h2 {
    font-family: "Fraunces", serif;
    font-size: clamp(2.6rem, 5.5vw, 5.6rem);
    line-height: 0.92;
    letter-spacing: -0.075em;
    font-weight: 800;
    max-width: 850px;
}

.section-note {
    max-width: 670px;
    color: var(--muted);
    line-height: 1.7;
    margin-left: auto;
    margin-bottom: 34px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}

.project-card {
    grid-column: span 6;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 250, 240, 0.6);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: 0.25s ease;
}

.project-card:nth-child(1) {
    grid-column: span 7;
    background:
        radial-gradient(
            circle at 78% 15%,
            rgba(184, 255, 44, 0.36),
            transparent 14rem
        ),
        rgba(255, 250, 240, 0.68);
}

.project-card:nth-child(2) {
    grid-column: span 5;
    background:
        radial-gradient(
            circle at 18% 22%,
            rgba(21, 63, 214, 0.16),
            transparent 13rem
        ),
        rgba(255, 250, 240, 0.62);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.project-card::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -70px;
    width: 190px;
    height: 190px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.7;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 34px;
    position: relative;
    z-index: 1;
}

.project-index {
    color: var(--muted);
    font-size: 0.8rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.tag {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 8px;
    font-size: 0.68rem;
    color: var(--muted);
    background: rgba(244, 239, 228, 0.54);
}

.project-card h3 {
    font-family: "Fraunces", serif;
    font-size: clamp(2rem, 3.8vw, 3.8rem);
    line-height: 0.93;
    letter-spacing: -0.07em;
    max-width: 560px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.project-card p {
    color: var(--muted);
    line-height: 1.65;
    max-width: 610px;
    position: relative;
    z-index: 1;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.tiny-link {
    font-size: 0.82rem;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
    transition: 0.2s ease;
}

.tiny-link:hover {
    color: var(--blueprint);
    border-color: var(--blueprint);
}

.skills-wrap {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 18px;
}

.panel {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 250, 240, 0.58);
    padding: 24px;
}

.panel h3 {
    font-family: "Fraunces", serif;
    font-size: 2rem;
    letter-spacing: -0.055em;
    margin-bottom: 18px;
}

.skill-list {
    display: grid;
    gap: 12px;
    list-style: none;
}

.skill-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    align-items: center;
    padding-block: 11px;
    border-bottom: 1px solid var(--line);
}

.skill-item:last-child {
    border-bottom: 0;
}

.skill-name {
    font-weight: 600;
    font-size: 0.88rem;
}

.skill-bar {
    height: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(23, 21, 17, 0.06);
}

.skill-bar span {
    display: block;
    height: 100%;
    width: var(--level);
    background: linear-gradient(90deg, var(--ink), var(--blueprint));
    border-radius: inherit;
}

.tool-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tool-cloud span {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(244, 239, 228, 0.52);
    font-size: 0.82rem;
    transition: 0.2s ease;
}

.tool-cloud span:hover {
    background: var(--signal);
    transform: translateY(-2px);
}

.interest-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 250, 240, 0.55);
}

.interest {
    min-height: 230px;
    padding: 22px;
    border-right: 1px solid var(--line-strong);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.interest:last-child {
    border-right: 0;
}

.interest .symbol {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
}

.interest:nth-child(even) .symbol {
    background: var(--signal);
    color: var(--ink);
    border: 1px solid var(--ink);
}

.interest h3 {
    font-family: "Fraunces", serif;
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.055em;
    margin-bottom: 10px;
}

.interest p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.86rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.post {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 250, 240, 0.58);
    padding: 22px;
    min-height: 285px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.2s ease;
}

.post:hover {
    transform: translateY(-4px);
    background: var(--white);
    box-shadow: var(--shadow);
}

.post time {
    color: var(--rust);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.post h3 {
    font-family: "Fraunces", serif;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.06em;
    margin: 22px 0 14px;
}

.post p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.88rem;
}

.post a {
    align-self: flex-start;
    margin-top: 24px;
}

.blog-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.blog-actions .button {
    gap: 8px;
    background: rgba(255, 250, 240, 0.58);
}

.blog-actions .button:hover {
    background: var(--signal);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--ink);
}

.contact-card {
    border: 1px solid var(--ink);
    border-radius: 34px;
    background:
        radial-gradient(
            circle at 76% 16%,
            rgba(184, 255, 44, 0.42),
            transparent 19rem
        ),
        var(--ink);
    color: var(--paper);
    padding: clamp(28px, 5vw, 60px);
    padding-right: clamp(28px, 34vw, 460px);
    position: relative;
    overflow: hidden;
    min-height: 520px;
    isolation: isolate;
}

.contact-card::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px dashed rgba(244, 239, 228, 0.22);
    border-radius: 24px;
    pointer-events: none;
    z-index: 3;
}

.contact-photo-wrap {
    position: absolute;
    right: clamp(34px, 5vw, 82px);
    bottom: 25px;
    width: clamp(210px, 27vw, 385px);
    max-height: calc(100% - 70px);
    z-index: 1;
    pointer-events: none;
    margin: 0;
}

.contact-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom right;
    opacity: 0.9;
    filter: grayscale(100%) contrast(1.12);
}

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

.contact-card h2 {
    font-family: "Fraunces", serif;
    font-size: clamp(3rem, 7.4vw, 7.25rem);
    line-height: 0.88;
    letter-spacing: -0.08em;
    max-width: 760px;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    position: relative;
    z-index: 2;
}

.socials a {
    border: 1px solid rgba(244, 239, 228, 0.34);
    border-radius: 999px;
    padding: 12px 15px;
    color: var(--paper);
    transition: 0.2s ease;
    font-size: 0.86rem;
}

.socials a:hover {
    background: var(--signal);
    border-color: var(--signal);
    color: var(--ink);
    transform: translateY(-2px);
}

.footer {
    padding: 30px 0 46px;
    color: var(--muted);
    font-size: 0.82rem;
}

.footer .shell {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--line-strong);
    padding-top: 22px;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.08s;
}

.delay-2 {
    transition-delay: 0.16s;
}

.delay-3 {
    transition-delay: 0.24s;
}

.about-wrap {
    display: grid;
    grid-template-columns: 1fr 0.88fr;
    gap: 18px;
    align-items: start;
}

.about-bio h3 {
    font-family: "Fraunces", serif;
    font-size: 2rem;
    letter-spacing: -0.055em;
    margin-bottom: 18px;
}

.about-bio p {
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 14px;
}

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

.about-bio strong {
    color: var(--ink);
    font-weight: 600;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.stat-card {
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: rgba(255, 250, 240, 0.58);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: 0.22s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-card:nth-child(1) {
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(184, 255, 44, 0.32),
            transparent 9rem
        ),
        rgba(255, 250, 240, 0.68);
}

.stat-card:nth-child(4) {
    background:
        radial-gradient(
            circle at 20% 80%,
            rgba(21, 63, 214, 0.14),
            transparent 9rem
        ),
        rgba(255, 250, 240, 0.62);
}

.stat-number {
    font-family: "Fraunces", serif;
    font-size: 3.4rem;
    line-height: 0.9;
    letter-spacing: -0.07em;
    color: var(--ink);
}

.stat-available .stat-number {
    font-size: 2rem;
    color: var(--signal-dark);
}

.hf-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 1020px) {
    .contact-card {
        padding-right: clamp(28px, 5vw, 60px);
        min-height: 570px;
    }
    .contact-photo-wrap {
        right: clamp(30px, 5vw, 58px);
        bottom: 23px;
        width: clamp(240px, 36vw, 340px);
        max-height: calc(100% - 76px);
    }
    .contact-photo {
        opacity: 0.72;
    }
    .contact-card h2,
    .contact-card p,
    .socials {
        max-width: 72%;
    }
}

@media (max-width: 920px) {
    .hero {
        padding-top: 54px;
    }
    .hero-grid,
    .skills-wrap,
    .section-heading {
        grid-template-columns: 1fr;
    }
    .lab-card {
        transform: none;
    }
    .project-card,
    .project-card:nth-child(1),
    .project-card:nth-child(2) {
        grid-column: span 12;
    }
    .interest-strip,
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }
    .interest:nth-child(2) {
        border-right: 0;
    }
    .interest:nth-child(1),
    .interest:nth-child(2) {
        border-bottom: 1px solid var(--line-strong);
    }
    .section-note {
        margin-left: 0;
    }
    .about-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100% - 28px, var(--max));
    }
    .site-header {
        top: 8px;
    }
    .nav {
        border-radius: 24px;
        position: relative;
        align-items: center;
        padding: 10px 12px;
    }
    .menu-button {
        display: inline-flex;
    }
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }
    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 18px;
        right: 18px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--line-strong);
        border-radius: 20px;
        background: rgba(244, 239, 228, 0.96);
        box-shadow: var(--shadow);
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        width: 100%;
        justify-content: center;
    }
    .resume-mini {
        display: none;
    }
    .hero {
        padding-top: 48px;
        padding-bottom: 52px;
    }
    .hero h1 {
        font-size: clamp(3.6rem, 17vw, 7rem);
    }
    .signal-window {
        min-height: 260px;
    }
    section {
        padding: 58px 0;
    }
    .skill-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .interest-strip,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .interest {
        border-right: 0;
        border-bottom: 1px solid var(--line-strong);
    }
    .interest:last-child {
        border-bottom: 0;
    }
    .contact-card {
        min-height: 760px;
        padding: 30px;
        padding-bottom: 330px;
        text-align: left;
        display: block;
    }
    .contact-card::before {
        inset: 14px;
        border-radius: 22px;
    }
    .contact-photo-wrap {
        position: absolute;
        left: 50%;
        right: auto;
        bottom: 16px;
        transform: translateX(-50%);
        width: min(300px, 85%);
        max-height: 330px;
        margin: 0;
    }
    .contact-photo {
        opacity: 0.94;
        object-fit: contain;
        object-position: center bottom;
        z-index: 1;
    }
    .contact-card h2 {
        font-size: clamp(3rem, 17vw, 5.6rem);
        max-width: 100%;
        margin-bottom: 20px;
    }
    .contact-card p,
    .socials {
        max-width: 100%;
    }
    .footer .shell {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .shell {
        width: min(100% - 24px, var(--max));
    }
    .nav {
        padding-left: 12px;
    }
    .brand span:last-child {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .hero {
        padding-bottom: 44px;
    }
    .hero-copy {
        font-size: 0.96rem;
    }
    .hero-actions,
    .project-links,
    .socials {
        flex-direction: column;
    }
    .button,
    .socials a {
        width: 100%;
    }
    .project-card,
    .panel,
    .post {
        padding: 20px;
    }
    .lab-caption {
        grid-template-columns: 1fr;
    }
    .contact-card {
        min-height: 740px;
        padding: 24px;
        padding-bottom: 300px;
        border-radius: 26px;
    }
    .contact-card::before {
        inset: 12px;
        border-radius: 18px;
    }
    .contact-photo-wrap {
        bottom: 17px;
        width: min(250px, 92%);
        max-height: 300px;
    }
    .contact-card h2 {
        font-size: clamp(2.75rem, 16vw, 4.75rem);
    }
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
    .stat-card {
        padding: 18px 16px;
    }
    .stat-number {
        font-size: 2.6rem;
    }
    .stat-available .stat-number {
        font-size: 1.6rem;
    }
}

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