:root {
    --background: #f4f3ee;
    --surface: #fbfaf7;
    --surface-hover: #ffffff;
    --text: #1a1d1b;
    --muted: #70736f;
    --line: #d9dad4;
    --line-strong: #bfc4bd;
    --accent: #285b4d;
    --accent-soft: #dfe8e3;
    --radius: 18px;
    --shadow: 0 16px 48px rgba(31, 40, 36, 0.07);
    --max-width: 1440px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 88% 1%, rgba(40, 91, 77, 0.08), transparent 34rem),
        var(--background);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.page-shell {
    width: min(100% - 48px, var(--max-width));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--text);
    color: #fff;
    transform: translateY(-160%);
}

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

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 84px;
    border-bottom: 1px solid var(--line);
}

.brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 34px);
}

.nav a,
.social-links a,
.contact-social a {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 150ms ease;
}

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

.hero {
    min-height: min(820px, calc(100vh - 84px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(84px, 11vw, 164px) 0 48px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hero h1,
.section h2,
.archive-section h2,
.contact-section h2 {
    margin: 0;
    font-weight: 560;
    letter-spacing: -0.055em;
}

.hero h1 {
    max-width: 1160px;
    font-size: clamp(58px, 8vw, 116px);
    line-height: 0.91;
}

.hero__bottom {
    display: grid;
    grid-template-columns: minmax(0, 690px) auto;
    align-items: end;
    justify-content: space-between;
    gap: 48px;
    margin-top: clamp(34px, 5vw, 64px);
}

.hero__intro {
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 1.55vw, 21px);
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(251, 250, 247, 0.72);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
    border-color: var(--accent);
    background: #fff;
    transform: translateY(-1px);
}

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

.button--primary:hover,
.button--primary:focus-visible {
    background: #214d41;
    color: #fff;
}

.hero__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: auto;
    padding-top: clamp(54px, 8vw, 108px);
    color: var(--muted);
    font-size: 13px;
}

.social-links,
.contact-social {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.section {
    padding: clamp(82px, 10vw, 144px) 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 24px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: end;
    gap: clamp(36px, 7vw, 110px);
    margin-bottom: clamp(42px, 6vw, 76px);
}

.section h2,
.archive-section h2,
.contact-section h2 {
    font-size: clamp(40px, 5.3vw, 76px);
    line-height: 0.98;
}

.section-heading__copy {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.featured-card,
.react-card,
.work-card,
.skill-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(251, 250, 247, 0.82);
}

.featured-card {
    display: flex;
    min-height: 430px;
    flex-direction: column;
    padding: 28px;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.featured-card:hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-topline {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.card-topline span:first-child {
    color: var(--accent);
    font-weight: 750;
}

.featured-card__content {
    margin: auto 0 42px;
}

.featured-card h3 {
    margin: 0;
    font-size: clamp(32px, 3.2vw, 48px);
    font-weight: 590;
    letter-spacing: -0.045em;
}

.featured-card__content p {
    max-width: 600px;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tech-list span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
}

.card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.card-links a {
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.card-links a:hover,
.card-links a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.work-card {
    position: relative;
    min-height: 250px;
    padding: 22px;
    text-decoration: none;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.work-card:hover,
.work-card:focus-visible {
    border-color: var(--line-strong);
    background: var(--surface-hover);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.work-card__number,
.work-card__type {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.work-card__number {
    color: var(--accent);
    font-weight: 750;
}

.work-card__type {
    position: absolute;
    top: 22px;
    right: 22px;
    color: var(--muted);
}

.work-card h3 {
    margin: 74px 36px 0 0;
    font-size: 23px;
    font-weight: 620;
    letter-spacing: -0.035em;
}

.work-card p {
    margin: 14px 28px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.work-card__arrow {
    position: absolute;
    right: 22px;
    bottom: 20px;
    color: var(--accent);
    font-size: 20px;
}

.section--react {
    background: linear-gradient(180deg, transparent, rgba(40, 91, 77, 0.025), transparent);
}

.project-label {
    justify-self: end;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.react-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: clamp(36px, 7vw, 110px);
    padding: clamp(28px, 4vw, 54px);
}

.react-card__lead {
    max-width: 740px;
    margin: 0;
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 540;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.react-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 54px;
    color: var(--muted);
    font-size: 13px;
}

.react-card__features span::before {
    margin-right: 8px;
    color: var(--accent);
    content: "•";
}

.react-card__side {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.archive-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 60px;
    padding: clamp(82px, 10vw, 144px) 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 24px;
}

.archive-section__content {
    max-width: 800px;
}

.archive-section__content > p:not(.eyebrow) {
    max-width: 650px;
    margin: 26px 0 34px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.archive-stats {
    display: flex;
    align-items: flex-end;
    gap: clamp(28px, 5vw, 74px);
}

.archive-stats div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.archive-stats strong {
    font-size: clamp(58px, 7vw, 100px);
    font-weight: 540;
    letter-spacing: -0.07em;
    line-height: 0.8;
}

.archive-stats span {
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.skill-group {
    padding: 24px;
}

.skill-group > span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.skill-group p {
    margin: 38px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.contact-section {
    padding: clamp(96px, 12vw, 180px) 0 clamp(80px, 9vw, 130px);
    scroll-margin-top: 24px;
}

.contact-section__copy {
    margin: 26px 0 48px;
    color: var(--muted);
    font-size: 17px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.contact-grid a {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 28px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(251, 250, 247, 0.75);
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.contact-grid a:hover,
.contact-grid a:focus-visible {
    border-color: var(--accent);
    background: #fff;
}

.contact-grid span {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.contact-grid strong {
    overflow-wrap: anywhere;
    font-size: clamp(18px, 2.1vw, 28px);
    font-weight: 580;
    letter-spacing: -0.025em;
}

.contact-social {
    margin-top: 26px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 0 42px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

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

@media (max-width: 980px) {
    .hero__bottom,
    .section-heading,
    .react-card {
        grid-template-columns: 1fr;
    }

    .hero__bottom {
        align-items: start;
    }

    .hero__actions {
        justify-content: flex-start;
    }

    .featured-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .work-grid,
    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-card {
        min-height: 380px;
    }

    .project-label {
        justify-self: start;
    }

    .archive-section {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

@media (max-width: 700px) {
    .page-shell {
        width: min(100% - 28px, var(--max-width));
    }

    .site-header {
        min-height: 70px;
    }

    .nav a:nth-child(2),
    .nav a:nth-child(4) {
        display: none;
    }

    .nav {
        gap: 16px;
    }

    .hero {
        min-height: auto;
        padding-top: 86px;
    }

    .hero h1 {
        font-size: clamp(52px, 16vw, 74px);
    }

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

    .work-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        min-height: 350px;
        padding: 22px;
    }

    .featured-card__content {
        margin-top: 70px;
    }

    .react-card {
        padding: 24px;
    }

    .archive-stats {
        width: 100%;
        justify-content: space-between;
    }

    .contact-grid strong {
        font-size: 18px;
    }

    .footer {
        flex-direction: column;
        gap: 7px;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
