@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #e2ecdd;
    --ink: #253c31;
    --muted: #5e7062;
    --line: #bfcfba
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 35px
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif
}

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

button {
    font: inherit;
    color: inherit;
    cursor: pointer
}

header,
main,
footer {
    max-width: 1440px;
    margin: auto
}

header {
    height: 116px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.wordmark {
    font: 800 32px 'Manrope', sans-serif;
    letter-spacing: -2px
}

.wordmark span {
    font-size: 11px;
    vertical-align: top;
    margin-left: 4px;
    line-height: 2.6
}

nav {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 13px
}

nav a:hover {
    opacity: .65
}

.navpill {
    border: 1px solid #91a58b;
    border-radius: 30px;
    padding: 13px 20px
}

.navpill span {
    margin-left: 22px
}

.hero {
    min-height: 680px;
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    align-items: center;
    padding: 25px 6% 60px;
    gap: 20px
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #547b45;
    border-radius: 50%;
    margin-right: 9px
}

h1 {
    font: 500 clamp(64px, 7.5vw, 112px)/1.01 'Manrope', sans-serif;
    letter-spacing: -7px;
    margin: 30px 0 24px
}

h1 em {
    font-style: normal;
    font-weight: 800
}

.period {
    color: #809777
}

.lead {
    font-size: 23px;
    line-height: 1.4;
    letter-spacing: -.5px;
    margin: 0 0 18px
}

.description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted);
    max-width: 340px
}

.primary {
    display: inline-flex;
    border: 0;
    align-items: center;
    gap: 35px;
    border-radius: 40px;
    background: var(--ink);
    color: #f1f5ed;
    padding: 16px 23px;
    font-size: 12px;
    margin-top: 16px
}

.primary:hover {
    background: #406148
}

.smallnote {
    margin-top: 45px;
    font-size: 10px;
    color: var(--muted)
}

.smallnote span {
    margin-right: 12px;
    font-size: 20px
}

.studio {
    position: relative;
    min-width: 0;
    align-self: center
}

.scene-top,
.scene-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    letter-spacing: 1.3px
}

.scene-top {
    margin: 0 18px;
    color: var(--muted)
}

#scene {
    height: 500px;
    touch-action: pan-y;
    cursor: grab;
    outline-offset: -5px
}

#scene:active {
    cursor: grabbing
}

#scene canvas {
    display: block;
    width: 100%;
    height: 100%
}

.scene-bottom {
    margin: 0 18px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    letter-spacing: .4px
}

.scene-bottom i {
    display: inline-block;
    background: #739468;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px
}

.scene-bottom button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    margin-left: 6px
}

.hint {
    font-size: 9px;
    color: var(--muted);
    text-align: center;
    margin: 15px 0 0
}

.marquee {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 24px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    letter-spacing: 3px
}

.asterisk {
    font-size: 28px
}

.projects {
    padding: 100px 6%
}

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

h2 {
    font: 500 36px/1.2 'Manrope', sans-serif;
    letter-spacing: -1.5px;
    margin: 16px 0 0
}

.section-heading>p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7
}

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

.project {
    text-align: left;
    border: 0;
    background: none;
    padding: 0
}

.project-art {
    height: 270px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: transform .3s
}

.project:hover .project-art {
    transform: translateY(-6px)
}

.label {
    position: absolute;
    top: 19px;
    left: 20px;
    font-size: 8px;
    letter-spacing: 1.5px;
    z-index: 2
}

.art-arrow {
    position: absolute;
    bottom: 16px;
    right: 17px;
    border: 1px solid currentColor;
    border-radius: 50%;
    height: 29px;
    width: 29px;
    display: grid;
    place-items: center
}

.racing {
    background: #31483c;
    color: #e6eedf
}

.race-type {
    font: bold italic 105px/1 sans-serif;
    position: absolute;
    top: 70px;
    left: 35px;
    letter-spacing: -10px
}

.race-type span {
    font: 500 11px sans-serif;
    letter-spacing: 8px;
    display: block;
    margin: 13px 0 0 7px
}

.race-lines {
    position: absolute;
    width: 220px;
    height: 400px;
    border: 1px solid #92a883;
    border-radius: 50%;
    transform: rotate(40deg);
    right: -100px;
    top: -40px;
    box-shadow: 0 0 0 15px #31483c, 0 0 0 16px #92a883, 0 0 0 31px #31483c, 0 0 0 32px #92a883
}

.room {
    background: #d5ddcb
}

.room img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 22px 12px 0
}

.type {
    background: #c5d5b8
}

.big-f {
    font: 700 230px/.9 Georgia, serif;
    position: absolute;
    left: 70px;
    top: 45px;
    letter-spacing: -20px
}

.big-f span {
    font: 80px sans-serif;
    position: absolute;
    top: 10px;
    left: 65px;
    color: #f0f3e9
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px
}

.project-meta h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    letter-spacing: -.3px
}

.project-meta>span {
    font-size: 10px;
    color: var(--muted)
}

.project>p {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.6
}

.about {
    padding: 70px 6% 90px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px
}

.about h2 {
    font-size: 40px
}

.about em,
.closing em {
    font-family: Georgia, serif;
    font-weight: 400
}

.about>div>p:not(.eyebrow) {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.9
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 25px
}

.tags span {
    font-size: 10px;
    border: 1px solid #b6c7af;
    padding: 9px 13px;
    border-radius: 30px
}

.closing {
    text-align: center;
    padding: 80px 6%;
    background: #d8e4d1
}

.closing h2 {
    font-size: 48px
}

.closing a {
    font-size: 12px;
    display: inline-block;
    margin-top: 28px;
    border-bottom: 1px solid;
    padding-bottom: 7px
}

footer {
    padding: 32px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between
}

footer p,
footer>span {
    font-size: 10px;
    color: var(--muted)
}

dialog {
    background: #eef3e9;
    color: var(--ink);
    padding: 50px;
    border: 1px solid var(--line);
    border-radius: 12px;
    max-width: 550px;
    width: 90%
}

dialog::backdrop {
    background: #152b2266;
    backdrop-filter: blur(5px)
}

dialog>p:not(.eyebrow) {
    line-height: 1.8;
    font-size: 14px;
    color: var(--muted)
}

.close {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 28px;
    background: none;
    border: 0
}

:focus-visible {
    outline: 2px solid #46663b;
    outline-offset: 5px
}

@media(min-width:1500px) {
    .hero {
        min-height: 740px
    }

    #scene {
        height: 570px
    }
}

@media(max-width:800px) {
    header {
        height: 90px
    }

    nav {
        gap: 18px
    }

    nav a {
        font-size: 11px
    }

    .navpill {
        padding: 10px 14px
    }

    .navpill span {
        margin-left: 8px
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 30px;
        gap: 50px
    }

    h1 {
        font-size: 85px;
        letter-spacing: -5px
    }

    .intro {
        max-width: 500px
    }

    .description {
        max-width: 400px
    }

    .smallnote {
        display: none
    }

    #scene {
        height: 460px
    }

    .studio {
        width: 100%
    }

    .section-heading {
        align-items: start;
        flex-direction: column
    }

    .projects {
        padding: 65px 6%
    }

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

    .project-art {
        height: 330px
    }

    .race-type {
        left: 20%;
        top: 90px
    }

    .big-f {
        left: 37%;
        top: 70px
    }

    .about {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 50px 6%
    }

    .closing h2 {
        font-size: 37px
    }

    footer {
        gap: 20px;
        flex-wrap: wrap
    }

    .marquee {
        font-size: 9px;
        letter-spacing: 1px
    }
}

@media(max-width:420px) {
    nav>a:first-child {
        display: none
    }

    #scene {
        height: 340px
    }

    h1 {
        font-size: 76px
    }

    .about h2 {
        font-size: 34px
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    .project-art {
        transition: none
    }
}

/* Centered navigation and faithful image-led cover. */
[hidden] {
    display: none !important
}

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    height: 106px
}

header>.wordmark {
    justify-self: start
}

header nav {
    grid-column: 2;
    justify-content: center;
    gap: 34px
}

header nav a {
    font-size: 12px;
    padding: 10px 0
}

.hero {
    grid-template-columns: .82fr 1.18fr;
    gap: 22px;
    padding-top: 20px
}

.hero-visual {
    min-width: 0;
    position: relative;
    align-self: center;
    text-align: center
}

.photo-view {
    perspective: 1100px
}

.hero-photo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 22px 20px #52634819)
}

.view-toggle {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #a8bba1;
    padding: 9px 1px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .4px;
    margin-top: 3px
}

.view-toggle span {
    margin-left: 10px
}

.view-toggle:hover {
    color: var(--ink);
    border-color: var(--ink)
}

@media(max-width:800px) {
    header {
        height: 96px;
        grid-template-columns: auto 1fr;
        gap: 24px
    }

    header nav {
        justify-self: center;
        gap: 20px
    }

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

    .hero-visual {
        width: 100%;
        max-width: 600px;
        justify-self: center
    }
}

@media(max-width:520px) {
    header {
        height: auto;
        grid-template-columns: 1fr;
        padding-top: 23px;
        padding-bottom: 14px;
        gap: 14px
    }

    header>.wordmark {
        justify-self: center
    }

    header nav {
        grid-column: 1;
        gap: 23px;
        width: 100%
    }

    header nav a {
        font-size: 11px
    }

    header nav>a:first-child {
        display: block
    }

    .hero {
        padding-top: 25px
    }
}

/* Cool mint lets the original amber lighting stand out. */
:root {
    --bg: #deeee3;
    --ink: #203c32;
    --muted: #526e60;
    --line: #b8d1c0
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 8% -2% 9%;
    background: radial-gradient(ellipse at 50% 56%, #b9d4c4 0%, #cbe2d2 42%, transparent 70%);
    pointer-events: none;
    z-index: -1
}

.hero-visual {
    isolation: isolate
}

.photo-view {
    position: relative;
    perspective: 1200px;
    padding: 8px 0 0
}

.photo-float {
    animation: office-float 8s ease-in-out infinite;
    transform-style: preserve-3d
}

.hero-photo {
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform .5s ease-out;
    filter: drop-shadow(0 25px 20px #264e3933);
    backface-visibility: hidden
}

@keyframes office-float {

    0%,
    100% {
        transform: translateY(0) rotate(-.6deg)
    }

    50% {
        transform: translateY(-12px) rotate(.6deg)
    }
}

.motion-toggle {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 7px 10px;
    background: transparent;
    color: var(--muted);
    border: 0;
    font-size: 10px;
    cursor: pointer;
    margin-top: 7px
}

.motion-toggle:hover {
    color: var(--ink)
}

.photo-view.is-paused .photo-float {
    animation-play-state: paused
}

.photo-view.is-paused .hero-photo {
    transform: none
}

.closing {
    background: #cfe3d6
}

.type {
    background: #b9d1bf
}

.room {
    background: #c9ddcf
}

.period {
    color: #a66c3b
}

@media(prefers-reduced-motion:reduce) {
    .photo-float {
        animation: none
    }

    .hero-photo {
        transition: none;
        transform: none !important
    }
}

/* Slightly smaller hero artwork, centered in its existing column. */
.hero-photo {
    width: 94%;
    margin-inline: auto
}

/* A quieter cover, circular identity and centred bilingual navigation. */
header {
    grid-template-columns: 110px minmax(0, 1fr) 110px;
    gap: 24px;
    height: 126px
}

header>.circle-logo {
    width: 86px;
    height: 86px;
    border: 2px solid #477d59;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 25px;
    letter-spacing: -1.6px;
    background: #d2e6d83b
}

header nav {
    justify-self: center;
    gap: 26px
}

.languages {
    display: flex;
    justify-self: end;
    gap: 3px;
    border: 1px solid var(--line);
    padding: 4px;
    border-radius: 30px
}

.languages button {
    border: 0;
    background: transparent;
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 7px 8px
}

.languages button[aria-pressed=true] {
    background: #234d37;
    color: white
}

.hero {
    min-height: 600px;
    padding-top: 0;
    padding-bottom: 60px
}

.intro h1 {
    margin-top: 0
}

.intro .lead {
    font-size: 27px;
    margin: 28px 0
}

.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px
}

.social-links a {
    border: 1px solid #a7c3af;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background .2s, transform .2s
}

.social-links a:hover {
    background: #c8dfcf;
    transform: translateY(-2px)
}

.social-links svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0
}

.social-links .email-button {
    width: auto;
    padding: 0 20px;
    gap: 10px;
    border-radius: 30px;
    font-size: 12px;
    background: var(--ink);
    color: #f1f5ed;
    border-color: var(--ink)
}

.social-links .email-button:hover {
    background: #365d45
}

.social-links .email-button svg {
    width: 19px
}

.new-about {
    gap: 35px 65px;
    padding-top: 80px
}

.new-about h2 {
    font-size: 40px
}

.section-subtitle {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 22px !important
}

.tech-section {
    grid-column: 1/-1;
    margin-top: 24px
}

.tech-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px
}

.tech-heading h3 {
    font-weight: 500;
    font-size: 21px;
    margin: 0 0 9px
}

.pending-note {
    font-size: 11px !important;
    color: var(--muted);
    line-height: 1.7
}

.slider-controls {
    display: flex;
    gap: 8px
}

.slider-controls button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #a7c3af;
    background: transparent
}

.slider-controls button:disabled {
    opacity: .3;
    cursor: default
}

.tech-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 18px;
    padding: 5px 0 18px;
    scrollbar-width: thin;
    scrollbar-color: #91b49d transparent
}

.tech-card {
    flex: 0 0 calc((100% - 18px)/2);
    scroll-snap-align: start;
    min-height: 142px;
    padding: 24px;
    border: 1px solid #b8d1c0;
    border-radius: 12px;
    background: #eaf4ed99;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 4px 18px;
    align-content: center
}

.tech-icon {
    grid-row: span 2;
    width: 52px;
    height: 58px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font: 700 22px monospace
}

.tech-icon.html {
    background: #eddbca;
    color: #a44f24
}

.tech-icon.css {
    background: #d5e4ee;
    color: #2d608b
}

.tech-icon.js {
    background: #ece7bb;
    color: #5b5125
}

.tech-card h3 {
    font-size: 18px;
    margin: 5px 0
}

.tech-card p {
    font-size: 11px;
    color: var(--muted);
    margin: 0
}

.resume-section {
    padding: 75px 6%;
    border-top: 1px solid var(--line)
}

.timeline-entry {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 25px;
    border-left: 1px solid #adc8b6;
    margin: 35px 0 22px 6px;
    padding: 0 0 12px 0
}

.timeline-marker {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #477d59;
    transform: translateX(-6px);
    margin-top: 15px
}

.timeline-entry h3 {
    font-size: 22px;
    font-weight: 500;
    margin: 10px 0
}

.timeline-entry p:not(.eyebrow) {
    max-width: 680px;
    line-height: 1.8;
    font-size: 14px;
    color: var(--muted)
}

.projects {
    border-top: 1px solid var(--line);
    padding-top: 75px;
    padding-bottom: 75px
}

.education {
    background: #d6e8dc
}

footer {
    border-top: 1px solid var(--line)
}

@media(max-width:1050px) {
    header {
        gap: 12px;
        grid-template-columns: 90px 1fr 104px
    }

    header nav {
        gap: 17px
    }

    header nav a {
        font-size: 11px
    }
}

@media(max-width:800px) {
    header {
        height: auto;
        padding-top: 20px;
        padding-bottom: 20px;
        grid-template-columns: 1fr 1fr;
        gap: 20px
    }

    header>.circle-logo {
        width: 70px;
        height: 70px;
        font-size: 22px;
        justify-self: start
    }

    header nav {
        grid-column: 1/-1;
        grid-row: 2;
        width: 100%;
        gap: 26px;
        justify-self: center
    }

    .languages {
        grid-column: 2;
        grid-row: 1
    }

    .hero {
        min-height: 0;
        padding-top: 35px;
        gap: 25px
    }

    .intro {
        padding-top: 12px
    }

    .hero-visual {
        max-width: 540px
    }

    .new-about {
        padding-top: 55px
    }

    .tech-card {
        flex-basis: 75%
    }

    .resume-section {
        padding-top: 55px;
        padding-bottom: 55px
    }
}

@media(max-width:520px) {
    header nav {
        gap: 20px
    }

    header nav a {
        font-size: 10px
    }

    .intro .lead {
        font-size: 24px
    }

    .tech-card {
        flex-basis: 90%;
        padding: 20px
    }

    .tech-heading {
        gap: 15px
    }

    .slider-controls {
        flex-shrink: 0
    }

    .hero {
        padding-bottom: 40px
    }

    .new-about {
        gap: 15px
    }

    .social-links {
        gap: 10px
    }
}

@media(prefers-reduced-motion:reduce) {
    .social-links a {
        transition: none
    }
}

/* Oval wordmark and device-independent country flags. */
header>.circle-logo {
    width: 108px;
    height: 64px;
    border-radius: 50%
}

.languages {
    min-width: 124px
}

.languages button {
    gap: 6px;
    padding: 7px 8px
}

.country-flag {
    display: block;
    width: 23px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #203c3220;
    flex-shrink: 0
}

header {
    grid-template-columns: 124px minmax(0, 1fr) 124px
}

@media(max-width:1050px) {
    header {
        grid-template-columns: 108px minmax(0, 1fr) 124px
    }
}

@media(max-width:800px) {
    header {
        grid-template-columns: 1fr 1fr
    }

    header>.circle-logo {
        width: 96px;
        height: 56px
    }
}

/* Full-screen opening, with a snug oval signature shared by header and footer. */
:root {
    --header-height: 126px
}

header>.circle-logo,
footer>.circle-logo {
    width: 94px;
    height: 46px;
    border: 2px solid #477d59;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 25px;
    letter-spacing: -1.6px;
    background: #d2e6d83b;
    line-height: 1
}

.hero {
    min-height: calc(100svh - var(--header-height));
    padding-block: 35px 60px;
    align-content: center
}

.hero-photo {
    max-height: 630px;
    object-fit: contain
}

.logo-carousel {
    overflow: hidden;
    position: relative;
    margin-top: 26px;
    padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent)
}

.logo-belt {
    display: flex;
    width: max-content;
    animation: tech-travel 34s linear infinite
}

.logo-list {
    list-style: none;
    margin: 0;
    padding: 0 48px 0 0;
    display: flex;
    align-items: center;
    gap: 48px;
    flex-shrink: 0
}

.logo-list li {
    width: 84px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center
}

.logo-list img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    transition: transform .2s
}

.logo-list li:hover img {
    transform: scale(1.12)
}

.logo-carousel:hover .logo-belt,
.logo-carousel:focus-within .logo-belt {
    animation-play-state: paused
}

@keyframes tech-travel {
    to {
        transform: translateX(-50%)
    }
}

.entry-date {
    font-size: 12px !important;
    font-weight: 500;
    letter-spacing: .3px
}

.education .timeline-entry+.timeline-entry {
    margin-top: 44px
}

footer>p {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 14px;
    line-height: 1.6
}

@media(max-width:800px) {

    header>.circle-logo,
    footer>.circle-logo {
        width: 86px;
        height: 42px;
        font-size: 22px
    }

    .hero {
        min-height: calc(100svh - var(--header-height));
        padding-block: 30px 45px
    }

    .hero-photo {
        max-height: 480px
    }

    .logo-list {
        gap: 30px;
        padding-right: 30px
    }

    .logo-list li {
        width: 72px
    }

    .logo-list img {
        width: 48px;
        height: 48px
    }
}

@media(prefers-reduced-motion:reduce) {
    .logo-carousel {
        overflow-x: auto
    }

    .logo-belt {
        animation: none
    }

    .logo-list[aria-hidden=true] {
        display: none
    }

    .logo-list img {
        transition: none
    }
}

/* Tighter logo and a clearer experience/education hierarchy. */
header>.circle-logo,
footer>.circle-logo {
    width: 88px;
    height: 40px
}

#experiencia .company-name {
    font-size: 15px;
    letter-spacing: 1.4px;
    font-weight: 700;
    margin-bottom: 12px
}

#experiencia .timeline-entry h3 {
    font-size: 19px
}

#formacion .timeline-entry .education-date {
    font-size: 12px;
    letter-spacing: .4px;
    font-weight: 500;
    margin: 10px 0 12px
}

@media(max-width:800px) {

    header>.circle-logo,
    footer>.circle-logo {
        width: 81px;
        height: 37px
    }
}

.social-links a:focus-visible {
    outline: 3px solid #477d59;
    outline-offset: 3px
}

.menu-toggle {
  display: none;
}

@media (max-width: 800px) {
  header {
    position: relative;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
  }

  header > .circle-logo {
    grid-column: 1;
    grid-row: 1;
  }

  header > .languages {
    grid-column: 2;
    grid-row: 1;
  }

  .menu-toggle {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 21px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s, opacity 0.2s;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  header #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 6%;
    right: 6%;
    width: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    box-shadow: 0 14px 30px #203c321a;
    z-index: 20;
  }

  header #main-nav.menu-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  header #main-nav a {
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
  }

  header #main-nav a:hover {
    background: #c8dfcf;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle span {
    transition: none;
  }
}


/* Viewport bounds */
html, body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
body { touch-action: pan-y pinch-zoom; }
header, main, footer {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  margin-inline: auto;
}
main { overflow-x: clip; }
.hero > *, .about > *, .project-grid > *, .timeline-entry > * {
  min-width: 0;
}
.logo-carousel { width: 100%; max-width: 100%; overflow: hidden; }
.hero-photo { max-width: 100%; }
.timeline-entry { grid-template-columns: 18px minmax(0, 1fr); }
section p, section h2, section h3 { overflow-wrap: break-word; }

@media (max-width: 800px) {
  header {
    --header-gutter: clamp(16px, 4vw, 28px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    height: auto;
    gap: 10px;
    padding: 16px var(--header-gutter);
    z-index: 50;
    isolation: isolate;
  }
  header > .circle-logo { flex: 0 0 auto; margin-right: auto; }
  header > .languages { flex: 0 0 auto; min-width: 0; }
  header > .menu-toggle {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    background: #e9f3ec;
  }
  header #main-nav {
    display: none;
    position: absolute;
    inset: auto;
    top: calc(100% + 4px);
    right: var(--header-gutter);
    left: auto;
    bottom: auto;
    width: min(260px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    max-height: calc(100dvh - var(--header-height, 80px) - 24px);
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    align-self: auto;
    margin: 0;
    transform: none;
    translate: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid #9fbea9;
    border-radius: 14px;
    background: var(--bg);
    box-shadow: 0 12px 28px #203c3226;
    text-align: left;
    z-index: 51;
  }
  header #main-nav.menu-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }
  header #main-nav a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 500;
    opacity: 1;
    text-align: left;
  }
  header #main-nav a + a { border-top: 1px solid var(--line); }
  header #main-nav a:hover,
  header #main-nav a:focus-visible { background: #c8dfcf; }
  header #main-nav a:focus-visible { outline-offset: -3px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: clamp(20px, 5vw, 36px);
  }
  .hero h1 {
    font-size: clamp(48px, 12vw, 82px);
    letter-spacing: -0.055em;
  }
  .hero-visual { max-width: 100%; }
  .social-links { flex-wrap: wrap; }
  .about { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  header { --header-gutter: 12px; gap: 6px; }
  .languages button { padding: 6px; gap: 4px; }
  .languages { gap: 0; padding: 3px; }
  .country-flag { width: 20px; height: 14px; }
}

