/* ==========================================================================
   Tokens & base
   ========================================================================== */
:root {
    --bg: #101713;
    --surface: #1B2620;
    --accent: #91AE83;
    --text: #F0F2EA;
    --muted: #A6B2A6;
    --border: #344139;
    --raised: #28362D;
    --sans: 'Inter', sans-serif;
    --display: 'Plus Jakarta Sans', sans-serif;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --gutter: clamp(22px, 5.5vw, 82px);
    --max: 1190px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: dark;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    scrollbar-width: thin;
    scrollbar-color: rgba(145, 174, 131, .22) transparent;
}

html::-webkit-scrollbar {
    width: 6px;
}

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

html::-webkit-scrollbar-thumb {
    background: rgba(145, 174, 131, .22);
    border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(145, 174, 131, .42);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}

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

button {
    font: inherit;
    color: inherit;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 100;
    background: var(--accent);
    color: var(--bg);
    padding: 10px 16px;
}

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

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

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

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 40;
    background: linear-gradient(90deg, var(--accent), #c9dbbf);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* ==========================================================================
   Header: centered pill navigation + language switch (no brand name)
   ========================================================================== */
.site-header {
    position: fixed;
    z-index: 30;
    inset: 0 0 auto;
    padding-top: 10px;
    border-bottom: 1px solid transparent;
    transition: background .25s, border-color .25s;
}

.site-header.scrolled {
    background: rgba(16, 23, 19, .88);
    border-bottom-color: rgba(145, 174, 131, .18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-shell {
    position: relative;
    height: 68px;
    max-width: 1440px;
    margin: auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav {
    position: relative;
    display: flex;
    gap: 4px;
    padding: 7px 9px;
    border: 1px solid rgba(166, 178, 166, .23);
    border-radius: 13px;
    background: rgba(12, 17, 14, .42);
}

.main-nav::before {
    content: "";
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 0;
    width: var(--ind-w, 0);
    border-radius: 8px;
    background: rgba(145, 174, 131, .15);
    transform: translateX(var(--ind-x, 0));
    opacity: 0;
    transition: transform .4s var(--ease), width .4s var(--ease), opacity .3s;
}

.main-nav.has-active::before {
    opacity: 1;
}

.main-nav a {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--muted);
    transition: color .2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
}

.language-switch {
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid rgba(166, 178, 166, .16);
    border-radius: 999px;
    background: rgba(12, 17, 14, .3);
    font-size: 10px;
    color: #748077;
}

.lang {
    padding: 4px 0;
    border: 0;
    background: none;
    color: #829087;
    font-size: 10px;
    cursor: pointer;
    transition: color .2s;
}

.lang:hover {
    color: var(--text);
}

.lang.active {
    color: var(--accent);
}

/* ==========================================================================
   About (hero)
   ========================================================================== */
.about-section {
    position: relative;
    overflow: hidden;
    min-height: 100svh;
    display: grid;
    align-items: center;
    background:
        radial-gradient(ellipse 58% 32% at 50% 100%, rgba(39, 62, 45, .35), transparent 100%),
        linear-gradient(180deg, #101713 0%, #101713 62%, #121a15 100%);
    border-bottom: 1px solid #1d2820;
}

.atmosphere {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    pointer-events: none;
    mask-image: linear-gradient(0deg, #000, transparent 98%);
    -webkit-mask-image: linear-gradient(0deg, #000, transparent 98%);
    opacity: .62;
}

.atmosphere::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 48% 70% at 50% 100%, rgba(57, 84, 58, .43), transparent 100%);
    animation: glow 11s ease-in-out infinite alternate;
}

.atmosphere i {
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(145, 174, 131, .08) 45%, rgba(145, 174, 131, .18));
    box-shadow: 0 0 30px 7px rgba(67, 99, 69, .035);
    animation: column 9s ease-in-out infinite alternate;
}

.atmosphere i:nth-child(2),
.atmosphere i:nth-child(4) {
    animation-delay: -4s;
    opacity: .55;
}

.atmosphere i:nth-child(3) {
    opacity: .34;
}

.about-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--max);
    margin: auto;
    padding: 130px var(--gutter) 100px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr);
    gap: clamp(36px, 6vw, 84px);
    align-items: center;
}

.eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 11px;
    margin: 0;
    font: 600 10px/1.5 var(--sans);
    letter-spacing: .18em;
    color: #b8c4b9;
}

.eyebrow-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px #91ae8370;
    animation: pulseGlow 2.6s ease-in-out infinite;
}

.eyebrow-sep {
    width: 22px;
    height: 1px;
    background: #4b5a4f;
}

.about-title {
    margin: 26px 0 22px;
    font: 600 clamp(42px, 5.4vw, 70px)/1.12 var(--display);
    letter-spacing: -.065em;
}

.about-title em,
.section h2 em {
    font: italic 500 1.03em/1 var(--serif);
    color: var(--accent);
    letter-spacing: -.045em;
}

.title-line {
    display: inline-block;
}

.title-line-first {
    animation: enter .7s var(--ease) both;
}

.title-line-second {
    min-height: 1.12em;
}

.type-cursor {
    display: inline-block;
    width: 3px;
    height: .78em;
    margin-left: .08em;
    vertical-align: -.02em;
    background: var(--accent);
    animation: blink .8s steps(2, start) infinite;
}

.type-cursor.is-finished {
    display: none;
}

.about-copy {
    max-width: 545px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.about-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 24px;
    font-size: 12px;
    color: #bac4b9;
}

.about-meta li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.location-pin {
    font-size: 17px;
    line-height: 1;
    color: var(--accent);
}

.availability-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.availability-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--accent);
    animation: ping 2.2s ease-out infinite;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-top: 30px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.icon-link {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid #48554b;
    border-radius: 50%;
    color: var(--text);
    transition: transform .25s var(--ease), border-color .2s, background .2s, color .2s;
}

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

.icon-link:hover,
.icon-link:focus-visible {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(145, 174, 131, .1);
    color: var(--accent);
}

.icon-link::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .2s, transform .2s;
}

.icon-link:hover::after,
.icon-link:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .25s var(--ease);
}

.button-primary {
    background: var(--accent);
    color: #152017;
    border: 1px solid var(--accent);
}

.button-primary:hover {
    background: #a6be99;
    border-color: #a6be99;
    transform: translateY(-2px);
}

.button .arrow {
    font-size: 16px;
    font-weight: 400;
}

.button:hover .arrow {
    animation: bob .7s ease-in-out infinite;
}

/* Two-row timeline */
.mini-timeline {
    position: relative;
    display: grid;
    gap: 20px;
    max-width: 560px;
    margin-top: 42px;
    padding-left: 24px;
}

.mini-timeline::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    bottom: 9px;
    width: 1px;
    background: linear-gradient(var(--accent), rgba(145, 174, 131, .15));
    transform-origin: top;
    animation: drawY 1.2s 1s var(--ease) both;
}

.mini-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
}

.mini-timeline li::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: var(--bg);
}

.mini-timeline li:first-child::before {
    background: var(--accent);
    animation: pulseGlow 2.6s ease-in-out infinite;
}

.tl-date {
    padding-top: 3px;
    font-size: 9px;
    letter-spacing: .11em;
    color: var(--accent);
}

.mini-timeline p {
    margin: 0;
}

.mini-timeline strong {
    display: block;
    font: 600 13px/1.5 var(--display);
}

.tl-place {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
}

.tl-place i {
    font-style: normal;
    color: var(--accent);
    padding: 0 3px;
}

.tl-place b {
    color: var(--accent);
    font-weight: 600;
}

/* Portrait */
.about-visual {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 380px;
}

.portrait {
    position: relative;
    margin: 0;
    animation: floatY 7s ease-in-out infinite;
}

/* offset outline frame that draws in behind the photo */
.portrait::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(145, 174, 131, .42);
    border-radius: 18px;
    transform: translate(16px, 16px);
    animation: frameIn .9s .75s var(--ease) both;
}

.portrait-card {
    position: relative;
    isolation: isolate;
    aspect-ratio: 472 / 616;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(165deg, #223027, #141d17);
    box-shadow: 0 30px 70px rgba(5, 9, 6, .45);
}

/* breathing glow behind the head */
.portrait-card::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 14%;
    width: 82%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(145, 174, 131, .38), transparent 68%);
    filter: blur(8px);
    transform: translateX(-50%);
    animation: breathe 6s ease-in-out infinite alternate;
}

/* soft fade so the cropped shoulders settle into the card */
.portrait-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(0deg, rgba(16, 23, 19, .55), transparent 28%);
    pointer-events: none;
}

.portrait-img {
    position: absolute;
    left: -9%;
    bottom: 0;
    z-index: 1;
    display: block;
    width: 118%;
    height: 118%;
    object-fit: cover;
    object-position: center bottom;
    animation: portraitIn 1.1s .35s var(--ease) both;
}

.float-chip {
    position: absolute;
    z-index: 3;
    padding: 7px 13px;
    border: 1px solid rgba(145, 174, 131, .35);
    border-radius: 999px;
    background: rgba(16, 23, 19, .9);
    box-shadow: 0 10px 30px rgba(5, 9, 6, .4);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    animation: floatY 5s ease-in-out infinite;
}

.chip-a {
    top: 22px;
    right: -14px;
}

.chip-b {
    bottom: 70px;
    left: -22px;
    animation-delay: -2.4s;
}

.about-aside {
    margin-top: 38px;
    padding-left: 4px;
    color: #c5cec2;
    font: italic 16px/1.9 var(--serif);
}

.about-aside p {
    margin: 12px 0 0;
}

.aside-rule {
    display: block;
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.aside-signature {
    display: block;
    margin-top: 16px;
    font: italic 22px var(--serif);
    color: var(--accent);
}

.scroll-cue {
    position: absolute;
    z-index: 2;
    bottom: 34px;
    left: var(--gutter);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 8px;
    letter-spacing: .16em;
    color: #849087;
}

.scroll-line {
    width: 1px;
    height: 28px;
    background: linear-gradient(var(--accent), transparent);
    animation: scrollCue 2.2s ease-in-out infinite;
}

.hero-in {
    animation: enter .75s var(--ease) both;
    animation-delay: calc(var(--i, 0) * .11s);
}

/* ==========================================================================
   Shared section pieces
   ========================================================================== */
.section {
    max-width: var(--max);
    margin: auto;
    padding: 110px var(--gutter);
}

.section-kicker {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 0 0 24px;
    color: #98a497;
}

.section-kicker>span:first-child {
    color: var(--accent);
    letter-spacing: .1em;
}

.section h2 {
    margin: 0;
    font: 600 clamp(38px, 4.4vw, 56px)/1.16 var(--display);
    letter-spacing: -.055em;
}

.section h2 em {
    font-size: 1.12em;
}

.js .reveal {
    opacity: 0;
}

.reveal.visible {
    animation: reveal .7s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 100ms);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects-section {
    padding-top: 102px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 56px;
}

.section-intro {
    width: 270px;
    margin: 0 5.2% 5px 24px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}





.project-visual {
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    aspect-ratio: 2.2;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #17211a;
    text-align: left;
    cursor: pointer;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .25s ease-out, border-color .25s, box-shadow .3s;
}

.project-visual:hover {
    border-color: #748c70;
    box-shadow: 0 26px 55px rgba(5, 9, 6, .45);
}

.project-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(10, 15, 12, .04), transparent 35%, rgba(10, 15, 12, .08));
    pointer-events: none;
}

.project-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(110deg, transparent 35%, rgba(240, 242, 234, .1) 50%, transparent 65%);
    transform: translateX(-120%);
    pointer-events: none;
}

.project-visual:hover::before {
    transform: translateX(120%);
    transition: transform .9s var(--ease);
}

.project-screenshot {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #17211a;
    transition: transform .55s var(--ease);
}

.project-visual:hover .project-screenshot {
    transform: scale(1.025);
}



.project-type {
    margin: 0 0 9px;
    color: var(--accent);
    font-size: 8px;
    letter-spacing: .16em;
}

.project h3 {
    margin: 0;
    font: 600 23px/1.3 var(--display);
    letter-spacing: -.04em;
}

.project-desc {
    max-width: 400px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.8;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid #536153;
    background: none;
    color: var(--text);
    font-size: 9px;
    white-space: nowrap;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.text-link span:last-child {
    display: inline-block;
    color: var(--accent);
    font-size: 14px;
    transition: transform .25s var(--ease);
}

.text-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.text-link:hover span:last-child {
    transform: translate(3px, -3px);
}

.project-tags,
.dialog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags {
    margin-top: 14px;
}

.project-tags span,
.dialog-tags span {
    display: inline-block;
    padding: 5px 9px;
    border: 1px solid #354238;
    color: #b6c0b5;
    font-size: 8px;
}

.js .project.reveal .project-tags span {
    opacity: 0;
}

.project.visible .project-tags span {
    animation: pop .5s var(--ease) both;
    animation-delay: calc(.45s + var(--i, 0) * 70ms);
}

/* Horizontal scroll cards */
.project-scroller {
    position: relative;
}

.project-list {
    display: flex;
    gap: 28px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 26px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    -webkit-overflow-scrolling: touch;
}

.project-list:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 4px;
}

.project-list::-webkit-scrollbar {
    height: 6px;
}

.project-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.project {
    flex: 0 0 min(440px, 82vw);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.project-visual {
    aspect-ratio: 1.7;
}

.project-meta {
    flex: 1;
    margin-top: 19px;
}

.project-tags {
    margin-top: 16px;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 26px;
    margin-top: auto;
    padding-top: 22px;
}

.repo-link {
    text-decoration: none;
}

.repo-icon {
    flex: none;
    color: var(--accent);
}

.repo-link[hidden] {
    display: none;
}

.project-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.project-arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: none;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    transition: border-color .2s, color .2s, opacity .2s;
}

.project-arrow:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.project-arrow:disabled {
    opacity: .3;
    cursor: default;
}

@media (hover: none) {
    .project-nav {
        display: none;
    }
}

@media (max-width: 760px) {
    .project-list {
        gap: 18px;
    }
}

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-section {
    display: grid;
    grid-template-columns: .8fr 1.3fr;
    gap: 10%;
    padding-top: 115px;
    padding-bottom: 125px;
}

.skills-heading>p:last-child {
    max-width: 230px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.skill-groups {
    padding-top: 5px;
}

.skill-group {
    position: relative;
    display: grid;
    grid-template-columns: 35px 112px 1fr;
    gap: 15px;
    align-items: start;
    padding: 20px 0;
}

.skill-group::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: var(--border);
}

.js .skill-group::before {
    transform: scaleX(0);
    transform-origin: left;
}

.skill-group.visible::before {
    animation: drawX .9s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 100ms);
}

.skill-group:last-child {
    border-bottom: 1px solid var(--border);
}

.skill-num {
    padding-top: 7px;
    font-size: 8px;
    letter-spacing: .1em;
    color: var(--accent);
}

.skill-group h3 {
    margin: 4px 0;
    font: 600 12px var(--display);
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-chips li {
    padding: 6px 13px;
    border: 1px solid #354238;
    border-radius: 999px;
    color: #c4cec2;
    font-size: 11px;
    transition: transform .25s var(--ease), border-color .2s, color .2s, background .2s;
}

.skill-chips li:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(145, 174, 131, .08);
}

.js .skill-group .skill-chips li {
    opacity: 0;
}

.skill-group.visible .skill-chips li {
    animation: pop .5s var(--ease) both;
    animation-delay: calc(.3s + var(--i, 0) * 65ms);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 26px max(var(--gutter), calc((100vw - 1240px) / 2));
    border-top: 1px solid rgba(145, 174, 131, .2);
    background: linear-gradient(180deg, rgba(27, 38, 32, .38), rgba(16, 23, 19, .72));
}

.footer-text {
    margin: 0;
    font-size: 11px;
    color: #849185;
}

.footer-text i {
    padding: 0 6px;
    font-style: normal;
    color: var(--accent);
}

.back-top {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text);
}

.back-top .arrow {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(145, 174, 131, .35);
    border-radius: 50%;
    color: var(--accent);
    transition: background .2s;
}

.back-top:hover .arrow {
    background: rgba(145, 174, 131, .1);
    animation: bobUp .8s ease-in-out infinite;
}

/* ==========================================================================
   Case-study dialog
   ========================================================================== */
.case-dialog {
    width: min(560px, calc(100% - 36px));
    max-height: 85svh;
    padding: 44px;
    background: #1b2620;
    border: 1px solid #536153;
    color: var(--text);
    box-shadow: 0 20px 80px #0008;
}

.case-dialog[open] {
    animation: dialogIn .35s var(--ease);
}

.case-dialog::backdrop {
    background: #070b08d9;
    backdrop-filter: blur(3px);
}

.dialog-close {
    position: absolute;
    right: 20px;
    top: 14px;
    border: 0;
    background: none;
    font-size: 27px;
    color: #aeb9ad;
    cursor: pointer;
    transition: color .2s, transform .25s var(--ease);
}

.dialog-close:hover {
    color: var(--text);
    transform: rotate(90deg);
}

.dialog-kicker {
    color: var(--accent);
}

.dialog-index {
    margin-left: 8px;
    color: #aab5a9;
}

.case-dialog h2 {
    margin: 16px 0 7px;
    font: 600 34px/1.2 var(--display);
    letter-spacing: -.05em;
}

.dialog-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.dialog-rule {
    height: 1px;
    margin: 23px 0;
    background: var(--border);
}

.dialog-body,
.dialog-contribution {
    font-size: 12px;
    line-height: 1.9;
    color: #c4cec2;
}

.dialog-contribution {
    color: #9ba89b;
}

.dialog-tags {
    margin: 20px 0;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.92);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes portraitIn {
    from {
        opacity: 0;
        transform: translateY(26px) scale(1.05);
        clip-path: inset(100% 0 0 0);
    }

    to {
        opacity: 1;
        transform: none;
        clip-path: inset(0);
    }
}

@keyframes frameIn {
    from {
        opacity: 0;
        transform: translate(0, 0);
    }

    to {
        opacity: 1;
        transform: translate(16px, 16px);
    }
}

@keyframes breathe {
    from {
        opacity: .55;
        transform: translateX(-50%) scale(.94);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1.06);
    }
}

@keyframes drawX {
    to {
        transform: scaleX(1);
    }
}

@keyframes drawY {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

@keyframes floatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-9px);
    }
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

@keyframes ping {
    from {
        opacity: .8;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(3);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(145, 174, 131, .45);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(145, 174, 131, 0);
    }
}

@keyframes bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

@keyframes bobUp {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes glow {
    to {
        opacity: .55;
        transform: translateY(-7px);
    }
}

@keyframes column {
    to {
        opacity: .55;
        transform: scaleY(.88);
    }
}

@keyframes scrollCue {
    50% {
        transform: scaleY(.7);
        transform-origin: top;
        opacity: .45;
    }
}

@keyframes dialogIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 920px) {
    .about-inner {
        grid-template-columns: 1fr;
        padding-top: 120px;
    }

    .about-visual {
        order: -1;
        justify-self: start;
        max-width: 280px;
    }

    .about-aside {
        display: none;
    }



    .skills-section {
        gap: 6%;
    }
}

@media (max-width: 700px) {
    :root {
        --gutter: 23px;
    }

    .site-header {
        padding-top: 0;
    }

    .nav-shell {
        height: 66px;
        justify-content: space-between;
    }

    .language-switch {
        position: static;
        transform: none;
        padding: 4px 8px;
    }

    .main-nav {
        padding: 5px 6px;
        gap: 2px;
    }

    .main-nav::before {
        top: 5px;
        bottom: 5px;
    }

    .main-nav a {
        padding: 0 11px;
    }

    .about-section {
        min-height: auto;
    }

    .about-inner {
        padding-top: 100px;
        padding-bottom: 76px;
        gap: 30px;
    }

    .about-visual {
        max-width: min(220px, 60vw);
    }

    .eyebrow-sep {
        display: none;
    }

    .chip-a {
        top: 14px;
        right: -10px;
    }

    .chip-b {
        bottom: 46px;
        left: -8px;
    }

    .about-title {
        font-size: clamp(36px, 10.2vw, 50px);
        margin: 22px 0 18px;
    }

    .about-copy {
        font-size: 13px;
        line-height: 1.85;
    }

    .about-actions {
        margin-top: 26px;
    }

    .mini-timeline {
        margin-top: 36px;
    }

    .mini-timeline li {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .scroll-cue {
        display: none;
    }

    .section {
        padding: 72px var(--gutter);
    }

    .projects-section {
        padding-top: 76px;
    }

    .section-head {
        display: block;
        margin-bottom: 35px;
    }

    .section-kicker {
        font-size: 8px;
        margin-bottom: 18px;
    }

    .section h2 {
        font-size: 39px;
    }

    .section-intro {
        width: auto;
        max-width: 340px;
        margin: 17px 0 0;
        font-size: 11px;
    }





    .project h3 {
        font-size: 21px;
    }

    .project-desc {
        max-width: 360px;
        font-size: 10px;
    }


    .project-tags {
        margin-top: 12px;
    }

    .skills-section {
        display: block;
        padding-top: 78px;
        padding-bottom: 84px;
    }

    .skills-heading>p:last-child {
        margin-top: 17px;
    }

    .skill-groups {
        margin-top: 35px;
    }

    .skill-group {
        grid-template-columns: 24px 83px 1fr;
        gap: 9px;
        padding: 16px 0;
    }

    .skill-group h3 {
        font-size: 11px;
    }

    .skill-chips li {
        padding: 5px 11px;
        font-size: 10px;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px var(--gutter);
    }

    .case-dialog {
        padding: 35px 24px;
    }

    .case-dialog h2 {
        font-size: 27px;
    }
}

@media (max-width: 390px) {
    .main-nav a {
        padding: 0 8px;
        font-size: 11px;
    }

    .skill-group {
        grid-template-columns: 20px 1fr;
    }

    .skill-chips {
        grid-column: 2;
    }

    .section h2 {
        font-size: 36px;
    }
}

/* ==========================================================================
   Reduced motion: keep everything visible, drop the movement
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .js .reveal,
    .js .project.reveal .project-tags span,
    .js .skill-group .skill-chips li {
        opacity: 1;
    }

    .js .skill-group::before {
        transform: none;
    }
}