:root {
    --ink: #11161c;
    --ink-soft: #56606b;
    --paper: #f4f6f8;
    --paper-strong: #ffffff;
    --line: #d4dae0;
    --accent: #ff7657;
    --accent-ink: #25120d;
    --blue: #1768e5;
    --hero: #080b0f;
    --hero-text: #f7f8fa;
    --header-height: 76px;
    --container: 1440px;
    --pad: clamp(1.25rem, 4vw, 4.5rem);
}

[data-theme="dark"] {
    --ink: #f3f5f7;
    --ink-soft: #a7b0ba;
    --paper: #0d1116;
    --paper-strong: #141a21;
    --line: #29313a;
    --accent-ink: #1b0e0a;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    transition: background-color .3s ease, color .3s ease;
}

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

button,
input,
textarea {
    font: inherit;
}

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

.site-container {
    width: min(100%, var(--container));
    margin-inline: auto;
    padding-inline: var(--pad);
}

.skip-link {
    position: fixed;
    z-index: 2000;
    top: .5rem;
    left: .5rem;
    padding: .65rem 1rem;
    background: #fff;
    color: #111;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    z-index: 1200;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent);
}

.site-header {
    position: fixed;
    z-index: 1000;
    inset: 0 0 auto;
    height: var(--header-height);
    color: #fff;
    transition: background-color .25s ease, border-color .25s ease;
}

.site-header.is-scrolled {
    background: rgba(8, 11, 15, .94);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(14px);
}

.navbar {
    min-height: var(--header-height);
    padding: 0;
}

.brand,
.footer-grid > div:first-child {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}

.brand-mark {
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 800;
}

.brand-name {
    font-size: .92rem;
    font-weight: 700;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 170px;
    height: 2.35rem;
    object-fit: contain;
}

.navbar-nav {
    gap: .2rem;
}

.navbar .nav-link {
    position: relative;
    padding: .65rem .85rem !important;
    color: rgba(255, 255, 255, .72);
    font-size: .88rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
    color: #fff;
}

.navbar .nav-link::after {
    position: absolute;
    right: .85rem;
    bottom: .42rem;
    left: .85rem;
    height: 1px;
    background: var(--accent);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .2s ease;
}

.navbar .nav-link.active::after,
.navbar .nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-tools {
    display: flex;
    gap: .25rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, .18);
}

.icon-button {
    display: inline-flex;
    min-width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: currentColor;
    font-size: 1.1rem;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: rgba(255, 255, 255, .12);
}

.lang-code {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dropdown-menu {
    margin-top: .75rem !important;
    padding: .4rem;
    border: 1px solid #303842;
    border-radius: 6px;
    background: #12171d;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .3);
}

.dropdown-item {
    border-radius: 4px;
    color: #c9d0d7;
    font-size: .86rem;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background: #202832;
    color: #fff;
}

.hero {
    position: relative;
    min-height: min(92svh, 940px);
    overflow: hidden;
    background: var(--hero);
    color: var(--hero-text);
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 10, .18);
    box-shadow: inset 42vw 0 160px rgba(2, 4, 7, .48), inset 0 -180px 170px rgba(2, 4, 7, .35);
}

.hero--solid .hero-shade {
    background: #0a1017;
    box-shadow: none;
}

.hero-inner {
    position: relative;
    display: flex;
    min-height: min(92svh, 940px);
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 2rem;
}

.hero-inner--hidden {
    justify-content: flex-end;
}

.hero-copy {
    width: min(820px, 68vw);
    margin-top: -1rem;
}

.eyebrow {
    margin: 0 0 1.15rem;
    color: var(--ink-soft);
    font-size: .75rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero .eyebrow,
.contact-section .eyebrow {
    color: var(--accent);
}

.hero-title {
    max-width: 12ch;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.2rem, 7.2vw, 7.6rem);
    font-weight: 400;
    line-height: .96;
    letter-spacing: 0;
    text-wrap: balance;
}

.hero-lead {
    max-width: 620px;
    margin: 1.8rem 0 0;
    color: rgba(255, 255, 255, .75);
    font-size: clamp(1.02rem, 1.45vw, 1.28rem);
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    margin-top: 2.25rem;
}

.btn {
    display: inline-flex;
    min-height: 3.15rem;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: .8rem 1.25rem;
    border-radius: 4px;
    font-size: .9rem;
    font-weight: 750;
}

.btn-accent {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-accent:hover,
.btn-accent:focus {
    border-color: #ff947b;
    background: #ff947b;
    color: #1b0e0a;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border-bottom: 1px solid currentColor;
    font-size: .92rem;
    font-weight: 700;
}

.text-link--light {
    color: #fff;
}

.hero-meta {
    position: absolute;
    right: var(--pad);
    bottom: 2rem;
    left: var(--pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.availability,
.scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: rgba(255, 255, 255, .74);
    font-size: .76rem;
    font-weight: 650;
}

.availability > span {
    width: .48rem;
    height: .48rem;
    border-radius: 50%;
    background: #63e6a4;
    box-shadow: 0 0 0 5px rgba(99, 230, 164, .12);
    animation: availabilityDot 1.45s ease-in-out infinite;
}

.availability {
    animation: availabilityText 1.45s ease-in-out infinite;
}

@keyframes availabilityDot {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 5px rgba(99, 230, 164, .12); }
    50% { opacity: .35; transform: scale(.72); box-shadow: 0 0 0 9px rgba(99, 230, 164, 0); }
}

@keyframes availabilityText {
    0%, 100% { opacity: 1; }
    50% { opacity: .58; }
}

.scroll-cue i {
    color: #fff;
    font-size: 1rem;
}

.section {
    padding-block: clamp(5.5rem, 10vw, 10rem);
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(140px, .45fr) 2fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: clamp(3rem, 7vw, 6rem);
}

.section-heading h2,
.contact-intro h2 {
    max-width: 16ch;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 5.5vw, 5.7rem);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: 0;
    text-wrap: balance;
}

.section-heading--split {
    grid-template-columns: minmax(140px, .45fr) 1.5fr .65fr;
}

.section-heading--split > p:last-child {
    max-width: 28ch;
    margin: .7rem 0 0;
    color: var(--ink-soft);
}

.about-section {
    background: var(--paper);
}

.about-grid {
    display: grid;
    grid-template-columns: .75fr 1.45fr;
    gap: clamp(2.5rem, 8vw, 9rem);
    align-items: start;
}

.about-profile {
    display: grid;
    gap: 1.15rem;
    align-content: start;
    padding-top: .5rem;
}

.profile-visual {
    position: relative;
    width: min(100%, 410px);
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 6px;
    background: var(--paper-strong);
}

.profile-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-visual .profile-monogram {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: var(--paper-strong);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 400;
}

.profile-monogram {
    display: grid;
    width: 4.25rem;
    height: 4.25rem;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--blue);
    font-weight: 800;
}

.about-profile strong,
.profile-caption span {
    display: block;
}

.profile-caption span {
    color: var(--ink-soft);
    font-size: .88rem;
}

.about-copy p {
    max-width: 38ch;
    margin: 0 0 1.4rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 2.7vw, 2.35rem);
    line-height: 1.35;
}

.timeline-wrap {
    margin-top: clamp(5rem, 10vw, 10rem);
}

.subheading {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline {
    --timeline-progress: 0%;
    position: relative;
    margin: 0;
    padding: 4rem 0 0;
    list-style: none;
}

.timeline::before,
.timeline::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    content: "";
    transform: translateX(-50%);
}

.timeline::before {
    background: var(--line);
}

.timeline::after {
    bottom: auto;
    height: var(--timeline-progress);
    background: var(--accent);
    transition: height .12s linear;
}

.timeline-item {
    position: relative;
    display: grid;
    width: 50%;
    min-height: 11rem;
    padding: 0 clamp(2.2rem, 5vw, 5rem) 3.5rem 0;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: clamp(2.2rem, 5vw, 5rem);
}

.timeline-dot {
    position: absolute;
    z-index: 2;
    top: .5rem;
    right: -.55rem;
    width: 1.1rem;
    height: 1.1rem;
    border: 3px solid var(--paper);
    border-radius: 50%;
    background: var(--line);
    box-shadow: 0 0 0 1px var(--line);
    transition: background-color .45s ease, box-shadow .45s ease, transform .45s ease;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: -.55rem;
}

.timeline-item.is-visible .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent);
    transform: scale(1.05);
}

.timeline-card {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-strong);
}

.timeline-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.timeline-meta span,
.timeline-meta time,
.skill-number {
    color: var(--ink-soft);
    font-size: .78rem;
    font-weight: 750;
}

.timeline-item h3 {
    margin: 0 0 .55rem;
    font-size: 1.3rem;
}

.timeline-item p {
    max-width: 58ch;
    margin: 0;
    color: var(--ink-soft);
}

.skills-section {
    background: var(--paper-strong);
}

.skills-carousel {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.skills-track {
    display: flex;
    width: max-content;
    gap: 1rem;
    padding-block: .5rem 1rem;
    animation: skillsMarquee 28s linear infinite;
}

.skills-carousel:hover .skills-track {
    animation-play-state: paused;
}

.skill-card {
    display: grid;
    width: clamp(240px, 24vw, 330px);
    min-height: 12rem;
    grid-template-columns: 4.2rem 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
}

.skill-icon {
    display: grid;
    width: 4.2rem;
    height: 4.2rem;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-strong);
    color: var(--blue);
    font-size: 1.7rem;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .55rem;
}

.skill-card h3,
.skill-card p {
    margin: 0;
}

.skill-card h3 {
    margin-top: .3rem;
    font-size: 1.05rem;
}

.skill-card p {
    margin-top: .35rem;
    color: var(--ink-soft);
    font-size: .82rem;
}

@keyframes skillsMarquee {
    to { transform: translateX(calc(-50% - .5rem)); }
}

.projects-section {
    background: var(--paper);
    overflow: hidden;
}

.projects-carousel {
    display: grid;
    gap: 1rem;
    margin-inline: calc(var(--pad) * -1);
    overflow: hidden;
}

.project-marquee {
    overflow: hidden;
}

.project-track {
    display: flex;
    width: max-content;
    gap: 1rem;
    animation: projectMarquee 38s linear infinite;
}

.project-marquee--right .project-track {
    animation-direction: reverse;
}

.projects-carousel:hover .project-track {
    animation-play-state: paused;
}

.project-card {
    position: relative;
    width: clamp(240px, calc((100vw - (var(--pad) * 2) - 3rem) / 4), 340px);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #10151b;
    color: #fff;
    text-align: left;
}

.project-card > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
}

.project-card:hover > img,
.project-card:focus-visible > img {
    opacity: .78;
    transform: scale(1.04);
}

.project-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 25%, rgba(3, 6, 9, .88));
}

.project-card-copy {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    display: grid;
    line-height: 1.25;
}

.project-card-copy small {
    margin-bottom: .35rem;
    color: var(--accent);
    font-size: .67rem;
    font-weight: 800;
    text-transform: uppercase;
}

.project-card-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 400;
}

.project-card-copy em {
    margin-top: .25rem;
    color: rgba(255, 255, 255, .7);
    font-size: .72rem;
    font-style: normal;
}

.project-card-open {
    position: absolute;
    top: .8rem;
    right: .8rem;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    background: rgba(5, 8, 11, .5);
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity .25s ease, transform .25s ease;
}

.project-card:hover .project-card-open,
.project-card:focus-visible .project-card-open {
    opacity: 1;
    transform: none;
}

@keyframes projectMarquee {
    to { transform: translateX(calc(-50% - .5rem)); }
}

.project-modal .modal-dialog {
    max-width: min(1180px, calc(100vw - 2rem));
}

.project-modal.is-open {
    display: block;
    overflow: auto;
    background: rgba(4, 7, 10, .78);
}

.project-modal.is-open .modal-dialog {
    transform: none;
}

.project-modal .modal-content {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-strong);
    color: var(--ink);
}

.modal-close {
    position: absolute;
    z-index: 3;
    top: 1rem;
    right: 1rem;
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    background: rgba(5, 8, 11, .62);
    color: #fff;
}

.project-modal-grid {
    display: grid;
    min-height: min(680px, 82vh);
    grid-template-columns: 1.15fr .85fr;
}

.project-modal-media {
    min-height: 520px;
    background: #0a0d11;
}

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

.project-modal-content {
    align-self: center;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.project-modal-content h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.35rem, 4vw, 4.5rem);
    font-weight: 400;
    line-height: 1;
}

.project-modal-role {
    margin: 1rem 0 0;
    color: var(--blue);
    font-weight: 700;
}

.project-modal-description,
.project-modal-specs {
    margin: 1.35rem 0;
    color: var(--ink-soft);
    white-space: pre-line;
}

.project-modal-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding-block: 1rem;
    border-block: 1px solid var(--line);
}

.project-modal-facts dt {
    color: var(--ink-soft);
    font-size: .68rem;
    text-transform: uppercase;
}

.project-modal-facts dd {
    margin: .25rem 0 0;
    font-weight: 700;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 1.2rem 0 1.7rem;
}

.project-tags span {
    padding: .28rem .55rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: .72rem;
}

.contact-section {
    background: #0a0d11;
    color: #f4f6f8;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 9vw, 9rem);
    align-items: start;
}

.contact-intro > p:not(.eyebrow) {
    max-width: 38ch;
    margin: 1.5rem 0;
    color: #aeb6bf;
}

.contact-email {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    border-bottom: 1px solid var(--accent);
    font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.contact-form {
    display: grid;
    gap: 1rem;
}

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

.contact-field--full {
    grid-column: 1 / -1;
}

.form-control,
.form-select,
.form-control:focus {
    min-height: 4.1rem;
    border: 1px solid #343c45;
    border-radius: 4px;
    background: #11161c;
    color: #fff;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    background-color: #11161c;
    color: #fff;
    box-shadow: none;
}

.form-select { background-color: #11161c; color: #fff; }

.contact-check {
    min-height: 4.1rem;
    padding: 1.25rem 1rem 1rem 2.6rem;
    border: 1px solid #343c45;
    border-radius: 4px;
    background: #11161c;
}

.contact-check .form-check-input { margin-top: .25rem; }

.form-floating > label {
    color: #929ca6;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #aeb6bf;
}

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

.form-submit {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-dark {
    border-color: var(--accent);
    background: var(--accent);
    color: #23100b;
}

.btn-dark:hover,
.btn-dark:focus {
    border-color: #ff947b;
    background: #ff947b;
    color: #23100b;
}

.form-status {
    color: #c5ccd3;
    font-size: .85rem;
}

.form-status.is-success {
    color: #63e6a4;
}

.form-status.is-error {
    color: #ff8d79;
}

.honeypot {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.site-footer {
    padding-block: 2rem;
    border-top: 1px solid #252c34;
    background: #0a0d11;
    color: #dce1e6;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 1rem;
}

.footer-grid p {
    margin: 0;
    color: #8e98a2;
    text-align: center;
    font-size: .78rem;
}

.social-links {
    display: flex;
    justify-content: flex-end;
    gap: .45rem;
}

.social-links a {
    display: grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border: 1px solid #303842;
    border-radius: 50%;
}

.social-links a:hover,
.social-links a:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

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

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 991.98px) {
    :root { --header-height: 68px; }
    .navbar-collapse {
        margin-top: .6rem;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, .13);
        border-radius: 6px;
        background: #0d1218;
    }
    .navbar .nav-link { padding: .75rem .35rem !important; }
    .navbar .nav-link::after { right: auto; bottom: .45rem; left: .35rem; width: 2rem; }
    .nav-tools { margin: .5rem 0 0; padding: .7rem 0 0; border-top: 1px solid rgba(255, 255, 255, .12); border-left: 0; }
    .hero-copy { width: min(800px, 82vw); }
    .section-heading,
    .section-heading--split { grid-template-columns: 1fr; gap: 1rem; }
    .section-heading .eyebrow { margin-bottom: .25rem; }
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-profile { grid-template-columns: minmax(220px, 330px) 1fr; align-items: end; }
    .project-modal-grid { grid-template-columns: 1fr; }
    .project-modal-media { min-height: 380px; max-height: 52vh; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .section { padding-block: 4rem; }
    .about-section { padding-top: 2.5rem; }
    .hero { min-height: 86svh; }
    .hero-inner { min-height: 86svh; padding-top: calc(var(--header-height) + 2.5rem); padding-bottom: 1.25rem; }
    .hero-media { object-position: 61% center; opacity: .78; }
    .hero-shade { background: rgba(4, 7, 10, .26); box-shadow: inset 70vw 0 120px rgba(2, 4, 7, .42), inset 0 -140px 120px rgba(2, 4, 7, .38); }
    .hero-copy { width: 100%; }
    .hero-title { max-width: 14ch; font-size: clamp(2.8rem, 10.5vw, 4.5rem); }
    .hero-lead { max-width: 34ch; }
    .hero-meta { right: var(--pad); bottom: 1.25rem; left: var(--pad); }
    .hero-meta { justify-content: space-between; }
    .scroll-cue span { display: none; }
    .section-heading h2,
    .contact-intro h2 { font-size: clamp(2.55rem, 12vw, 4.2rem); }
    .timeline { padding-top: 2.5rem; }
    .timeline::before, .timeline::after { left: .55rem; }
    .timeline-item, .timeline-item:nth-child(even) { width: 100%; min-height: 0; margin-left: 0; padding: 0 0 2.25rem 2.7rem; }
    .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { top: .45rem; right: auto; left: 0; }
    .skill-card { width: min(78vw, 290px); }
    .project-card { width: min(72vw, 310px); }
    .contact-fields { grid-template-columns: 1fr; }
    .contact-field--half, .contact-field--full { grid-column: 1; }
    .form-submit { align-items: flex-start; flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-grid > div:first-child,
    .social-links { justify-content: center; }
}

@media (max-width: 520px) {
    .brand-name { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hero-actions { flex-wrap: wrap; gap: 1rem; }
    .hero-lead { font-size: 1rem; }
    .availability { max-width: 72%; }
    .subheading span:last-child { display: none; }
    .about-profile { grid-template-columns: 1fr; }
    .profile-visual { width: 100%; }
    .project-modal .modal-dialog { max-width: calc(100vw - 1rem); margin: .5rem; }
    .project-modal-media { min-height: 300px; }
    .project-modal-content { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .skills-track, .project-track, .availability, .availability > span { animation: none !important; }
}
