:root {
    --bg: #f6efe7;
    --surface: #fffaf4;
    --surface-strong: #f0ded0;
    --text: #2f2824;
    --muted: #72665d;
    --accent: #a86f4c;
    --accent-dark: #6e432b;
    --line: rgba(47, 40, 36, 0.12);
    --shadow: 0 24px 70px rgba(63, 45, 34, 0.14);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(168, 111, 76, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 12%, rgba(81, 110, 94, 0.14), transparent 25rem),
        var(--bg);
    line-height: 1.6;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1120px, calc(100% - 2rem));
    margin: 1rem auto 1.2rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 244, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 34px rgba(63, 45, 34, 0.08);
}

.brand {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    background: var(--accent-dark);
    font-weight: 800;
    letter-spacing: 0.04em;
}

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

.nav a {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.95rem;
    transition: 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-strong);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.section {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 6.5rem 0 0;
}

.hero {
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    min-height: calc(100vh - 7.5rem);
    padding-top: 1.6rem;
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 2.5vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--surface), #f4e3d4);
    box-shadow: var(--shadow);
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -5rem -5rem auto;
    width: 15rem;
    height: 15rem;
    border-radius: 50%;
    background: rgba(168, 111, 76, 0.16);
}

.photo-wrap {
    width: min(100%, 270px);
    aspect-ratio: 1;
    margin: 0 auto 1.6rem;
    padding: 0.7rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.68);
}

.photo-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.eyebrow,
.section-kicker {
    margin: 0 0 0.8rem;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 11ch;
    margin-bottom: 0.9rem;
    font-size: clamp(2.7rem, 5.1vw, 4.7rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

h2 {
    margin-bottom: 1.2rem;
    font-size: clamp(2.2rem, 3.7vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

h3 {
    margin-bottom: 0.4rem;
    font-size: 1.25rem;
    line-height: 1.2;
}

.headline {
    max-width: 28rem;
    color: var(--muted);
    font-size: 1rem;
}

.hero-copy p:not(.section-kicker),
.section-content p,
.contact p {
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-copy {
    max-width: 620px;
}

.hero-actions,
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.button,
.contact-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.contact-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(63, 45, 34, 0.12);
}

.primary {
    color: #fff;
    background: var(--accent-dark);
}

.ghost,
.contact-links a {
    background: rgba(255, 250, 244, 0.7);
}

.quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.8rem;
}

.quick-info span {
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 244, 0.72);
    color: var(--muted);
    font-size: 0.92rem;
}

.split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 2rem;
}

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

.timeline-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    padding: 1.3rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 250, 244, 0.7);
}

.timeline-date {
    color: var(--accent-dark);
    font-weight: 800;
}

.timeline-body p {
    margin-bottom: 0;
    color: var(--muted);
}

.place {
    color: var(--text) !important;
    font-weight: 700;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.skill-card,
.project,
.certification,
.contact {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 250, 244, 0.75);
    box-shadow: 0 18px 46px rgba(63, 45, 34, 0.08);
}

.skill-card {
    padding: 1.3rem;
}

.skill-card ul {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

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

.project {
    padding: 1.5rem;
}

.project span {
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.project p {
    margin-bottom: 0;
    color: var(--muted);
}

.certification-section {
    padding-top: 3rem;
}

.certification {
    display: grid;
    grid-template-columns: 1fr 230px;
    align-items: center;
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        linear-gradient(135deg, rgba(255, 250, 244, 0.92), rgba(240, 222, 208, 0.78)),
        radial-gradient(circle at 95% 15%, rgba(168, 111, 76, 0.14), transparent 16rem);
}

.certification h2 {
    max-width: 740px;
    font-size: clamp(2rem, 4vw, 3.6rem);
}

.certification p:not(.section-kicker) {
    max-width: 780px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.certification-badge {
    display: grid;
    place-items: center;
    min-height: 210px;
    padding: 1.3rem;
    border: 1px solid rgba(110, 67, 43, 0.18);
    border-radius: 28px;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 8rem),
        linear-gradient(145deg, #6e432b, #a86f4c);
    box-shadow: 0 18px 46px rgba(110, 67, 43, 0.18);
}

.certification + .certification {
    margin-top: 1rem;
}

.certification-secondary .certification-badge {
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 8rem),
        linear-gradient(145deg, #384b43, #6d8478);
}

.certification-badge span {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.certification-badge strong {
    font-size: 4rem;
    line-height: 1;
    letter-spacing: -0.06em;
}

.certification-badge small {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.contact {
    margin-top: 6.5rem;
    padding: clamp(2rem, 6vw, 4rem);
    text-align: center;
}

.contact h2 {
    margin-inline: auto;
}

.contact-links {
    justify-content: center;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1120px, calc(100% - 2rem));
    margin: 2rem auto;
    padding: 1.3rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.footer p {
    margin: 0;
}

.footer a {
    font-weight: 700;
}

.portfolio-hero {
    min-height: 54vh;
    display: grid;
    align-items: center;
    padding-top: 4rem;
}

.portfolio-intro {
    max-width: 900px;
}

.portfolio-intro h1 {
    max-width: 12ch;
}

.portfolio-intro p:not(.section-kicker) {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.12rem;
}

.portfolio-grid {
    display: grid;
    gap: 1.4rem;
}

.portfolio-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 250, 244, 0.78);
    box-shadow: 0 18px 46px rgba(63, 45, 34, 0.08);
}

.portfolio-shot {
    position: relative;
    display: block;
    min-height: 320px;
    overflow: hidden;
    background: #211a17;
}

.portfolio-shot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.35));
    pointer-events: none;
}

.portfolio-shot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.45s ease;
}

.portfolio-card:hover .portfolio-shot img {
    transform: scale(1.035);
}

.portfolio-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.portfolio-type {
    margin-bottom: 0.7rem;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portfolio-body h3 {
    margin-bottom: 0.8rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.055em;
}

.portfolio-body p:not(.portfolio-type) {
    color: var(--muted);
}

.stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1rem 0 1.5rem;
}

.stack-list span {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 250, 244, 0.8);
    font-size: 0.86rem;
    font-weight: 700;
}

.project-link {
    width: fit-content;
    color: var(--accent-dark);
    font-weight: 800;
}

.project-link::after {
    content: " →";
}

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

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

@media (max-width: 920px) {
    .hero,
    .split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero {
        min-height: auto;
        padding-top: 1rem;
    }

    .hero-copy {
        max-width: none;
    }

    .cards-grid,
    .project-list {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .portfolio-card {
        grid-template-columns: 1fr;
    }

    .certification-badge {
        min-height: 170px;
    }
}

@media (max-width: 700px) {
    .site-header {
        border-radius: 26px;
    }

    .menu-toggle {
        display: block;
    }

    .nav {
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        text-align: center;
    }

    .section {
        padding-top: 4.5rem;
    }

    .hero-card {
        padding: 1.2rem;
    }

    .timeline-item,
    .cards-grid,
    .project-list,
    .certification,
    .portfolio-card {
        grid-template-columns: 1fr;
    }

    .portfolio-shot {
        min-height: 240px;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }
}
