
:root {
    --ink: #18211f;
    --muted: #68716d;
    --paper: #f4f3ee;
    --accent: #b6e36b;
    --dark: #17211e;
    --line: rgba(24,33,31,.16);
    --page-pad: clamp(1.25rem,6.5vw,7rem);
}

* {
    box-sizing: border-box;
}

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

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

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

h1,h2,h3,p {
    margin-top: 0;
}

h1,h2,h3 {
    font-family: 'Manrope','DM Sans',sans-serif;
}

main > section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
}

.site-header {
    position: fixed;
    z-index: 20;
    inset: 0 0 auto;
    height: 78px;
    padding: 0 var(--page-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    transition: background .3s,color .3s,box-shadow .3s;
}

.site-header.scrolled {
    color: var(--ink);
    background: rgba(244,243,238,.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line);
}

.brand {
    font: 800 1.35rem 'Manrope',sans-serif;
    letter-spacing: -.08em;
}

.brand span {
    color: var(--accent);
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(1.2rem,3vw,2.8rem);
}

.nav-link {
    font-size: .79rem;
    font-weight: 600;
    opacity: .78;
}

.nav-link:hover,.nav-link.active {
    opacity: 1;
}

.nav-link.active::after {
    content: '';
    display: block;
    height: 2px;
    margin-top: 5px;
    background: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.language-switch {
    display: flex;
    gap: .15rem;
    padding: .2rem;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 99px;
}

.site-header.scrolled .language-switch {
    border-color: var(--line);
}

.language-button {
    min-width: 2rem;
    padding: .38rem .45rem;
    border: 0;
    border-radius: 99px;
    color: inherit;
    background: transparent;
    font: 700 .68rem 'DM Sans',sans-serif;
    cursor: pointer;
    opacity: .78;
}

.language-button.active {
    color: var(--ink);
    background: var(--accent);
    opacity: 1;
}

.theme-toggle {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    color: inherit;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
}

.site-header.scrolled .theme-toggle {
    border-color: var(--line);
}

.menu-toggle {
    display: none;
}

.section {
    position: relative;
}

.hero {
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: #273a36;
}

.hero-image {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.hero-image-light {
    background-image: url("../img/bg/light_bg_1.jpg");
}

.hero-image-dark {
    background-image: url("../img/bg/dark_bg_1.jpg");
    opacity: 0;
    transition: opacity .4s;
}

.hero-image-light,
.hero-image-dark,
.contact-background {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.hero-image-light,
.hero-image-dark {
    background-position: center 45%;
}

.contact-background {
    background-position: center 50%;
}

body[data-theme="dark"] .hero-image-light {
    opacity: 0;
}

body[data-theme="dark"] .hero-image-dark {
    opacity: 1;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,rgba(8,17,16,.73),rgba(8,17,16,.43) 48%,rgba(8,17,16,.06)),linear-gradient(0deg,rgba(8,17,16,.42),transparent 35%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(900px,100%);
    padding: 8rem var(--page-pad) 7rem;
}

.eyebrow {
    margin-bottom: 1.4rem;
    color: #68756c;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .19em;
}

.eyebrow.light {
    color: var(--accent);
}

h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(3rem,5.5vw,6.8rem);
    line-height: .99;
    letter-spacing: -.075em;
    font-weight: 600;
}

h1 em,h2 em {
    color: var(--accent);
    font-style: normal;
}

.hero-copy {
    margin-bottom: 2.4rem;
    color: rgba(255,255,255,.76);
    font-size: clamp(.95rem,1.4vw,1.1rem);
}

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

.text-link span:last-child {
    font-size: 1.1rem;
    transition: transform .2s;
}

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

.light-link {
    color: #fff;
}

.hero-footer {
    position: absolute;
    right: var(--page-pad);
    bottom: 1.7rem;
    left: var(--page-pad);
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,.72);
    font-size: .6rem;
    letter-spacing: .16em;
}

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

.about,.projects {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.section-heading h2,.projects h2 {
    font-size: clamp(2.7rem,5vw,4.8rem);
    line-height: 1.03;
    letter-spacing: -.07em;
    font-weight: 600;
}

.section-heading h2 span,.projects h2 span {
    color: #7e8981;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(260px,.88fr) 1.12fr;
    align-items: center;
    gap: clamp(3rem,9vw,9rem);
    margin-top: 3.7rem;
}

.portrait-frame {
    position: relative;
    min-height: 450px;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: #d8ded4;
}

.portrait-frame img,.project-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    place-content: center;
    justify-items: center;
    gap: .75rem;
    color: #314039;
    background: linear-gradient(145deg,#d9dfd2,#aab7a9);
    text-align: center;
}

.image-placeholder span {
    font: 800 clamp(1.7rem,3vw,2.7rem)/.98 'Manrope',sans-serif;
    letter-spacing: -.06em;
}

.image-placeholder small {
    color: #526158;
    font-size: .7rem;
}

.portrait-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1rem 1.2rem;
    color: #fff;
    background: rgba(20,31,27,.82);
    font-size: .65rem;
    letter-spacing: .12em;
}

.portrait-caption span {
    color: #b7c1b8;
}

.about-copy {
    max-width: 560px;
}

.about-copy p {
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.85;
}

.about-copy .lead {
    margin-bottom: 1.4rem;
    color: var(--ink);
    font: 600 clamp(1.45rem,2.5vw,2.15rem)/1.35 'Manrope',sans-serif;
    letter-spacing: -.045em;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 1.8rem 0 2rem;
}

.skill-list span {
    padding: .55rem .85rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: #59645d;
    font-size: .72rem;
}

.projects {
    background: #e9e9e1;
}

.projects-top {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.projects-top .section-heading h2 {
    margin-bottom: 0;
}

.section-intro {
    max-width: 300px;
    margin-bottom: .4rem;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.75;
}

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

.project-card {
    min-width: 0;
}

.project-image {
    position: relative;
    aspect-ratio: 4/4.6;
    overflow: hidden;
    background: #cfd5cc;
}

.project-image img {
    transition: transform .65s cubic-bezier(.2,.7,.2,1);
}

.project-card:hover .project-image img {
    transform: scale(1.055);
}

.project-image-one {
    background: #b9c8be;
}

.project-image-two {
    background: #c8c9b7;
}

.project-image-three {
    background: #b8c2c0;
}

.project-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ink);
    background: var(--accent);
    font-size: .72rem;
    font-weight: 700;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-top: 1.3rem;
    color: #6b766e;
    font-size: .59rem;
    font-weight: 700;
    letter-spacing: .13em;
}

.project-card h3 {
    margin: .8rem 0 .65rem;
    font-size: clamp(1.1rem,1.8vw,1.45rem);
    letter-spacing: -.045em;
}

.project-card p {
    max-width: 360px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.75;
}

.contact-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(100px,13vh,150px) var(--page-pad) 30px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: var(--dark);
}

.contact-background,.contact-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.contact-background {
    z-index: -2;
}

.contact-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.contact-overlay {
    z-index: -1;
    background: linear-gradient(110deg,rgba(10,17,15,.88),rgba(10,17,15,.62) 55%,rgba(10,17,15,.35));
}

.contact-content {
    width: min(760px,100%);
    margin: auto 0;
    padding: 40px 0 70px;
}

.contact-content h2 {
    margin-bottom: 1.5rem;
    font-size: clamp(3rem,7vw,6rem);
    line-height: 1;
    letter-spacing: -.07em;
    font-weight: 600;
}

.contact-copy {
    max-width: 480px;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,.76);
    font-size: .98rem;
    line-height: 1.85;
}

.contact-details {
    display: flex;
    flex-direction: column;
    width: min(480px,100%);
    border-top: 1px solid rgba(255,255,255,.22);
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 17px 5px;
    border-bottom: 1px solid rgba(255,255,255,.22);
    transition: background .25s,padding .25s;
}

.contact-detail:hover {
    padding-left: 12px;
    background: rgba(255,255,255,.06);
}

.contact-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.contact-label {
    color: rgba(255,255,255,.55);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.contact-value {
    color: #fff;
    font-size: .94rem;
    overflow-wrap: anywhere;
}

.contact-detail:hover .contact-value {
    color: var(--accent);
}

.contact-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.22);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: rgba(255,255,255,.65);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .13em;
}

.footer-top a:hover {
    color: var(--accent);
}

.copyright {
    margin: 18px 0 0;
    color: rgba(255,255,255,.48);
    font-size: .7rem;
    text-align: center;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s,transform .8s cubic-bezier(.2,.7,.2,1);
}

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

.project-card:nth-child(2) {
    transition-delay: .12s;
}

.project-card:nth-child(3) {
    transition-delay: .24s;
}

body[data-theme="dark"] {
    --ink: #edf0e9;
    --muted: #aab4ac;
    --paper: #171e1b;
    --line: rgba(237,240,233,.17);
    --dark: #0e1412;
}

body[data-theme="dark"] .projects {
    background: #202925;
}

body[data-theme="dark"] .section-heading h2 span,
body[data-theme="dark"] .projects h2 span {
    color: #a5b1a7;
}

body[data-theme="dark"] .skill-list span {
    color: #c2cbc3;
}

body[data-theme="dark"] .portrait-frame {
    background: #28352e;
}

body[data-theme="dark"] .image-placeholder {
    color: #e0e8df;
    background: linear-gradient(145deg,#344239,#202b25);
}

body[data-theme="dark"] .image-placeholder small {
    color: #b3c1b5;
}

body[data-theme="dark"] .project-image {
    background: #303a34;
}

body[data-theme="dark"] .project-meta {
    color: #b0bcb2;
}

body[data-theme="dark"] .site-header.scrolled {
    background: rgba(23,30,27,.94);
}

@media (min-width: 1025px) {
    .hero-image-light,
    .hero-image-dark {
        background-position: center 45%;
    }

    .contact-background {
        background-position: center 50%;
    }
}


@media (min-width: 601px) and (max-width: 1024px) {
    .hero-image-light,
    .hero-image-dark {
        background-position: 55% center;
    }

    .contact-background {
        background-position: 55% center;
    }
}

@media (max-width: 600px) {
    .hero-image-light,
    .hero-image-dark {
        background-position: 60% center;
        background-size: cover;
    }

    .contact-background {
        background-position: 60% center;
        background-size: cover;
    }
}

@media (max-width: 760px) {
    .site-header {
        height: 68px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 10px 0 10px 10px;
        border: 0;
        color: inherit;
        background: transparent;
    }

    .menu-toggle span {
        width: 24px;
        height: 2px;
        background: currentColor;
    }

    .nav {
        position: absolute;
        top: 68px;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .6rem var(--page-pad) 1.2rem;
        color: var(--ink);
        background: var(--paper);
        box-shadow: 0 12px 20px rgba(0,0,0,.08);
    }

    .nav.open {
        display: flex;
    }

    .nav-link {
        padding: .85rem 0;
    }

    .nav-link.active::after {
        display: none;
    }

    .header-actions {
        gap: .45rem;
    }

    .language-switch {
        gap: 0;
    }

    .language-button {
        min-width: 1.8rem;
        padding: .35rem .3rem;
    }

    .theme-toggle {
        width: 2rem;
        height: 2rem;
    }

    .hero-content {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }

    h1 {
        font-size: clamp(3rem,12vw,5.5rem);
    }

    .hero-footer {
        font-size: .52rem;
    }

    .about,.projects {
        justify-content: flex-start;
        padding-top: 100px;
        padding-bottom: 70px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2.5rem;
    }

    .portrait-frame {
        width: min(100%,470px);
        min-height: 0;
        aspect-ratio: 4/4.2;
    }

    .projects-top {
        display: block;
        margin-bottom: 2rem;
    }

    .section-intro {
        margin-top: 1.3rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .project-image {
        aspect-ratio: 5/4;
    }

    .project-card h3 {
        font-size: 1.4rem;
    }

    .contact-section {
        padding: 100px 6% 24px;
    }

    .contact-content {
        padding: 35px 0 55px;
    }

    .contact-content h2 {
        font-size: clamp(2.8rem,11vw,4.5rem);
    }

    .contact-copy {
        font-size: .9rem;
    }

    .contact-detail {
        gap: 14px;
        padding: 15px 4px;
    }

    .contact-value {
        font-size: .85rem;
    }

    .footer-top {
        font-size: .55rem;
        letter-spacing: .08em;
    }
}

@media (max-width: 420px) {
    .contact-section {
        padding-right: 20px;
        padding-left: 20px;
    }

    .contact-content h2 {
        font-size: 2.7rem;
    }

    .contact-icon {
        width: 34px;
        height: 34px;
    }

    .footer-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

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