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

:root {
    --bg: #fff8ef;
    --surface: #fffdf8;
    --surface-alt: #ffeede;
    --text: #16121c;
    --muted: #5c5066;
    --line: #e4d7c5;
    --brand: #ff5a36;
    --brand-deep: #cc3f22;
    --accent: #09c184;
    --accent-soft: #dff9ef;
    --focus: #073e2c;
    --shadow: 0 18px 45px rgba(141, 74, 19, 0.14);
}

[data-theme="dark"] {
    --bg: #12131a;
    --surface: #191c24;
    --surface-alt: #202531;
    --text: #f7f4f2;
    --muted: #c2bac7;
    --line: #31394a;
    --brand: #ff7f5f;
    --brand-deep: #ff5a36;
    --accent: #3ce5ae;
    --accent-soft: #12362b;
    --focus: #f9ede6;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

html {
    scroll-behavior: smooth;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 80;
    background: transparent;
}

.scroll-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    box-shadow: 0 0 18px color-mix(in srgb, var(--brand) 55%, transparent);
}

.chapter-label {
    position: fixed;
    right: clamp(0.8rem, 2.6vw, 1.6rem);
    top: 5.4rem;
    z-index: 65;
    display: grid;
    gap: 0.1rem;
    padding: 0.52rem 0.72rem;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.chapter-label.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chapter-label-kicker {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.chapter-label-value {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--text);
    font-weight: 700;
}

body {
    font-family: "Space Grotesk", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    line-height: 1.12;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 0.75rem 1rem;
    z-index: 1000;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.site-glow {
    position: fixed;
    width: 44rem;
    height: 44rem;
    border-radius: 999px;
    pointer-events: none;
    z-index: -1;
    filter: blur(70px);
    opacity: 0.38;
    will-change: transform;
}

.site-glow-a {
    background: #ff8f6e;
    top: -18rem;
    right: -10rem;
}

.site-glow-b {
    background: #7ae9bf;
    left: -12rem;
    bottom: -18rem;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.4rem;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.brand-mark {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.72rem;
    display: inline-grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.brand-text {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.site-nav a {
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    background: var(--surface-alt);
    color: var(--text);
}

.theme-toggle {
    border: 1px solid var(--line);
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 0.35rem 0;
}

.hero {
    padding: 7.2rem 0 3.8rem;
    position: relative;
}

.hero-grid {
    display: grid;
    gap: 1.35rem;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
    align-items: start;
}

.eyebrow,
.section-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.hero-title {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2.3rem, 8vw, 5.2rem);
    font-weight: 400;
    max-width: 15ch;
}

.hero-title span {
    color: var(--brand);
    font-style: italic;
}

.hero-copy {
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(1.02rem, 1.7vw, 1.24rem);
}

.audience-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.audience-strip span {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.3rem 0.62rem;
    background: var(--surface);
    color: var(--muted);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.hero-visual {
    margin-top: -2.25rem;
    grid-column: 2;
    grid-row: 1 / span 6;
    align-self: center;
    justify-self: end;
    max-width: clamp(18rem, 32vw, 24rem);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.hero-visual img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 1rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.btn {
    text-decoration: none;
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-solid {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.btn-solid:hover {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--line);
}

.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.hero-ribbon {
    margin-top: 2.4rem;
    position: relative;
    padding: 0.85rem clamp(0.8rem, 2.2vw, 1.4rem);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    white-space: nowrap;
}

.hero-ribbon-marquee {
    display: flex;
    width: max-content;
    animation: ribbonShift 22s linear infinite;
}

.hero-ribbon-track {
    flex: 0 0 auto;
    min-width: calc(100vw - 2 * clamp(0.8rem, 2.2vw, 1.4rem));
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: clamp(1.2rem, 4vw, 3rem);
    padding-inline: clamp(0.8rem, 2.4vw, 1.8rem);
}

.hero-ribbon span {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    color: var(--brand);
    white-space: nowrap;
}

.hero-ribbon.is-paused .hero-ribbon-marquee {
    animation-play-state: paused;
}

@keyframes ribbonShift {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.cred-strip {
    padding: 1.6rem 0 0.4rem;
}

.cred-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.cred-grid article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1rem;
}

.cred-label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cred-value {
    font-weight: 700;
    margin-top: 0.2rem;
}

.section {
    padding: 4.8rem 0;
}

.thesis-section {
    padding-top: 2.2rem;
}

.thesis-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 1rem;
}

.thesis-card {
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, var(--brand) 12%), var(--surface));
    border: 1px solid color-mix(in srgb, var(--line) 78%, var(--brand) 22%);
    border-radius: 1.35rem;
    padding: 1.4rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.spotlight-surface {
    --spot-x: 50%;
    --spot-y: 50%;
    --spot-active: 0;
}

.spotlight-surface::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(180px circle at var(--spot-x) var(--spot-y), color-mix(in srgb, #ffffff 30%, transparent), transparent 68%);
    opacity: var(--spot-active);
    transition: opacity 0.24s ease;
}

.thesis-card h2 {
    margin-top: 0.4rem;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    max-width: 15ch;
}

.thesis-card p {
    margin-top: 0.8rem;
    max-width: 64ch;
    color: var(--muted);
}

.thesis-card-alt {
    background: linear-gradient(160deg, color-mix(in srgb, var(--surface-alt) 80%, transparent), var(--surface));
}

.thesis-list {
    list-style: none;
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.thesis-list li {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.thesis-list strong {
    font-size: 0.95rem;
}

.thesis-list span {
    color: var(--muted);
}

.section-alt {
    background: color-mix(in srgb, var(--surface-alt) 55%, transparent);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    margin-bottom: 2.1rem;
}

.section-head h2 {
    margin-top: 0.4rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    max-width: 19ch;
}

.section-intro {
    margin-top: 0.7rem;
    max-width: 72ch;
    color: var(--muted);
}

.support-title {
    margin-top: 0.4rem;
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    font-size: clamp(2rem, 5.2vw, 3.8rem);
}

.support-copy {
    margin-top: 0.6rem;
    max-width: 64ch;
    color: var(--muted);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

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

.project-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 1.35rem;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
    will-change: transform;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: "Open details";
    position: absolute;
    right: 1.05rem;
    top: 1.05rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 999px;
    padding: 0.28rem 0.5rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.project-card:hover::after,
.project-card:focus-visible::after,
.project-card.is-magnetic::after {
    opacity: 1;
    transform: translateY(0);
}

.project-cover {
    display: none;
    width: 100%;
    height: 10.8rem;
    object-fit: cover;
    border-radius: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.archive-visual {
    margin-bottom: 1.2rem;
}

.archive-visual img {
    width: 100%;
    height: clamp(11rem, 24vw, 17rem);
    object-fit: cover;
    border-radius: 1.05rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

.project-card.is-magnetic {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent), var(--shadow);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.project-card h3 {
    margin-top: 0.6rem;
    font-size: 1.3rem;
}

.project-card p {
    margin-top: 0.5rem;
    color: var(--muted);
}

.project-card a {
    margin-top: 0.9rem;
    display: inline-block;
    color: var(--brand);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.project-card a:hover {
    text-decoration-thickness: 3px;
}

.project-card.is-hidden {
    display: none;
}

.project-card.spotlight {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent), var(--shadow);
    animation: spotlightPop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--bg) 68%, transparent);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

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

.project-modal-backdrop {
    position: absolute;
    inset: 0;
}

.project-modal-panel {
    position: relative;
    z-index: 1;
    width: min(58rem, 100%);
    max-height: min(88vh, 46rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.project-modal-media {
    min-height: 100%;
    background: var(--surface-alt);
}

.project-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-modal-body {
    position: relative;
    padding: 1.4rem;
    display: grid;
    align-content: start;
    gap: 0.9rem;
    overflow: auto;
}

.project-modal-body h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.project-modal-description {
    color: var(--muted);
}

.project-modal-impact {
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.project-modal-impact li {
    border: 1px dashed color-mix(in srgb, var(--line) 72%, var(--brand));
    background: color-mix(in srgb, var(--surface-alt) 55%, transparent);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.project-modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.project-modal-link {
    justify-self: start;
}

body.modal-open {
    overflow: hidden;
}

@keyframes spotlightPop {
    0% {
        transform: translateY(0) scale(0.98);
    }
    100% {
        transform: translateY(-4px) scale(1);
    }
}

.impact-list {
    list-style: none;
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.impact-list li {
    font-size: 0.74rem;
    color: var(--muted);
    border: 1px dashed color-mix(in srgb, var(--line) 70%, var(--brand));
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    background: color-mix(in srgb, var(--surface-alt) 65%, transparent);
}

.project-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.filter-pill {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-family: inherit;
    color: var(--muted);
    font-size: 0.8rem;
    cursor: pointer;
}

.filter-pill.active,
.filter-pill:hover {
    border-color: var(--brand);
    color: var(--text);
    background: var(--surface-alt);
}

.archive-note {
    margin-top: 1rem;
    color: var(--muted);
}

.archive-note a {
    color: var(--brand);
    font-weight: 700;
}

.timeline {
    display: grid;
    gap: 0.8rem;
}

.timeline-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.3rem;
}

.timeline-year {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    font-weight: 700;
}

.timeline-item h3 {
    margin-top: 0.4rem;
    font-size: 1.2rem;
}

.timeline-item p {
    margin-top: 0.4rem;
    color: var(--muted);
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.proof-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.3rem;
}

.proof-card h2 {
    margin-top: 0.4rem;
    font-size: 1.6rem;
}

.proof-card ul {
    list-style: none;
    margin-top: 1rem;
    display: grid;
    gap: 0.7rem;
}

.proof-card li {
    display: grid;
    gap: 0.2rem;
}

.proof-card li span {
    color: var(--muted);
}

.proof-card a {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    color: var(--brand);
}

.proof-card a:hover {
    text-decoration-thickness: 3px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.testimonial-card {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 1.1rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.testimonial-card p {
    color: var(--text);
}

.testimonial-card span {
    margin-top: 0.7rem;
    display: inline-block;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.resume-cta-card {
    margin-top: 1rem;
}

.resume-stack {
    margin-top: 1rem;
}

.resume-hero-visual {
    margin: 0 0 1rem;
    max-width: 18rem;
}

.resume-hero-visual img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-copy {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.3rem;
}

.contact-copy h2 {
    margin-top: 0.4rem;
    font-size: clamp(1.6rem, 3.8vw, 2.5rem);
}

.contact-copy p {
    margin-top: 0.7rem;
    color: var(--muted);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.1rem;
}

.contact-links a {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    background: var(--surface-alt);
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.3rem;
    display: grid;
    gap: 0.5rem;
}

.contact-form fieldset {
    border: 0;
    display: grid;
    gap: 0.5rem;
}

.contact-form legend {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.contact-form label {
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    padding: 0.65rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
}

.contact-form textarea {
    min-height: 8rem;
    resize: vertical;
}

.contact-form button {
    margin-top: 0.45rem;
}

.form-status {
    min-height: 1.1rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.form-status.success {
    color: var(--accent);
}

.form-status.error {
    color: #c2410c;
}

.site-footer {
    padding: 1.5rem 0 2rem;
    border-top: 1px solid var(--line);
}

.footer-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-shell p,
.footer-shell a {
    color: var(--muted);
    text-decoration: none;
}

.footer-shell a:hover {
    color: var(--brand);
}

.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    transition: opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1), transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

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

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

@media (max-width: 980px) {
    .cred-grid,
    .thesis-grid,
    .project-grid,
    .proof-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .thesis-card h2 {
        max-width: 100%;
    }

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

    .project-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-modal-panel {
        grid-template-columns: 1fr;
        max-height: 90vh;
    }

    .project-modal-media {
        min-height: 12rem;
    }

    .site-nav {
        position: absolute;
        right: 4vw;
        top: calc(100% + 0.4rem);
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 1rem;
        padding: 0.4rem;
        min-width: 12rem;
        box-shadow: var(--shadow);
    }

    .chapter-label {
        top: auto;
        bottom: 0.9rem;
        right: 0.9rem;
    }

    .site-nav.open {
        display: flex;
        animation: navDrop 0.25s ease;
    }

    .menu-toggle {
        display: block;
    }

    .brand-text {
        display: none;
    }
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 5.8rem;
    }

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

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

    .hero-ribbon {
        margin-top: 1.5rem;
    }

    .hero-visual img {
        aspect-ratio: 4 / 5;
    }

    .hero-visual {
        margin-top: 0.9rem;
        grid-column: auto;
        grid-row: auto;
        justify-self: start;
    }

    .project-cover {
        height: 9.5rem;
    }

    .thesis-section {
        padding-top: 1.4rem;
    }

    .footer-shell {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .filter-pills {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .project-modal {
        backdrop-filter: none;
    }

    .chapter-label {
        transition: none;
    }

    .spotlight-surface::before {
        display: none;
    }
}
