:root {
    --bg: #0a0a0a;
    --bg-soft: #101010;
    --panel: #141414;
    --panel-2: #1b1b1b;
    --text: #ededed;
    --muted: #9a9a9a;
    --muted-2: #6e6e6e;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #d9a441;
    --accent-soft: rgba(217, 164, 65, 0.12);
    --danger: #f27272;
    --success: #6fcf97;
    --max: 1120px;
    --radius: 16px;
    --radius-sm: 10px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* {
    box-sizing: border-box;
}

::selection {
    background: var(--accent);
    color: #14100a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black, transparent 75%);
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

code, .mono {
    font-family: var(--font-mono);
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 48px);
    background: rgba(10, 10, 10, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    transition: box-shadow .3s var(--ease), padding .3s var(--ease);
}

.site-header.scrolled {
    padding-top: 11px;
    padding-bottom: 11px;
    box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.6);
}

.brand,
.site-nav {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--text);
    border-radius: 9px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: border-color .3s var(--ease);
}

.brand:hover .brand-mark {
    border-color: var(--accent);
}

.site-nav {
    gap: 2px;
}

.site-nav a {
    position: relative;
    padding: 8px 16px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 999px;
    transition: color .25s var(--ease), background .25s var(--ease);
}

.site-nav a:hover {
    color: var(--text);
}

.site-nav a.active {
    color: var(--bg);
    background: var(--text);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    border-radius: var(--radius-sm);
}

.menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

/* Hero */

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-content {
    position: relative;
    width: min(var(--max), calc(100% - 36px));
    margin: 0 auto;
    padding: 108px 0 96px;
}

.hero-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.avatar-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: none;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--text);
    border-radius: 14px;
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    flex: none;
}

.role-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.social-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 30px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: color .25s var(--ease);
}

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

.icon-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eyebrow,
.section-kicker,
.meta,
.status {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
}

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

h1 {
    max-width: 760px;
    margin-bottom: 20px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.hero-copy {
    max-width: 580px;
    color: var(--muted);
    font-size: clamp(16px, 1.6vw, 19px);
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.button.primary:hover {
    box-shadow: 0 14px 30px -16px rgba(237, 237, 237, 0.35);
}

.button.ghost {
    background: transparent;
    color: var(--text);
}

.button.ghost:hover {
    border-color: var(--line-strong);
    background: var(--panel);
}

/* Layout containers */

.intro-band,
.section-grid,
.feature-section,
.page-hero,
.content-rows,
.project-list,
.skills-grid,
.project-detail-layout,
.project-gallery-section,
.contact-layout,
.legal-copy {
    width: min(var(--max), calc(100% - 36px));
    margin: 0 auto;
}

.intro-band {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    padding: 72px 0;
    border-bottom: 1px solid var(--line);
}

.intro-band h2,
.page-hero h1 {
    font-size: clamp(30px, 4.4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    font-weight: 600;
}

.intro-band p,
.page-hero p {
    color: var(--muted);
    font-size: 17px;
}

.role-lines {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 26px;
}

.role-line .eyebrow {
    display: block;
    margin-bottom: 4px;
}

.role-line p {
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
}

/* Role card */

.role-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.role-card .avatar-mark {
    width: 44px;
    height: 44px;
    font-size: 16px;
    border-radius: 11px;
}

.role-card-body h3 {
    font-size: 16px;
    margin-bottom: 3px;
}

.role-card-body p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 0;
}

/* Section grid (values) */

.section-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 0 80px;
}

.section-grid article,
.project-card,
.skill-card,
.project-story,
.project-sidebar,
.contact-form,
.contact-note,
.feature-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.section-grid article,
.project-card,
.skill-card,
.feature-card {
    transition: transform .3s var(--ease), border-color .3s var(--ease);
}

.section-grid article:hover,
.project-card:hover,
.skill-card:hover,
.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
}

.section-grid article {
    padding: 26px;
}

.section-grid span {
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 13px;
}

.section-grid h3 {
    font-size: 19px;
    margin: 14px 0 8px;
}

.section-grid p,
.project-card p,
.skill-card p,
.project-story p,
.project-sidebar p,
.feature-panel p,
.content-rows p,
.legal-copy p,
.contact-note p {
    color: var(--muted);
}

/* Featured projects */

.feature-section {
    padding: 0 0 96px;
}

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

.section-heading h2 {
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    font-weight: 600;
}

.feature-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 26px;
}

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

.feature-card {
    min-height: 420px;
}

.feature-card h3 {
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

/* Page hero */

.page-hero.compact {
    padding: 96px 0 52px;
}

/* About content rows */

.content-rows,
.legal-copy {
    display: grid;
    gap: 16px;
    padding-bottom: 90px;
}

.content-rows article,
.legal-copy {
    border-top: 1px solid var(--line);
    padding-top: 26px;
}

.content-rows h2 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.role-card-section {
    width: min(var(--max), calc(100% - 36px));
    margin: 0 auto;
    padding-bottom: 54px;
}

/* Projects */

.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 90px;
}

.project-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
    padding: 24px;
}

.project-banner {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    filter: grayscale(65%) contrast(1.02);
    transition: filter .4s var(--ease);
}

.project-card:hover .project-banner,
.feature-card:hover .project-banner {
    filter: grayscale(0%);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-mono);
    letter-spacing: 0;
}

.project-card h2,
.project-card h3 {
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    font-weight: 600;
}

.project-card .button {
    align-self: flex-start;
}

.project-description {
    margin-top: 18px;
}

/* Skills */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-bottom: 90px;
}

.skill-card {
    display: grid;
    gap: 14px;
    padding: 26px;
    align-content: start;
}

.skill-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.skill-card h2 {
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
}

.skill-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.skill-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Project detail */

.project-detail-hero {
    padding: 82px 0 42px;
}

.project-detail-banner {
    width: 100%;
    max-height: 430px;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    margin-bottom: 30px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: color .25s var(--ease), gap .25s var(--ease);
}

.back-link:hover {
    gap: 10px;
    color: var(--text);
}

.project-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 16px;
    padding-bottom: 90px;
}

.project-story,
.project-sidebar {
    padding: 26px;
}

.project-story {
    font-size: 17px;
}

.project-story p {
    color: var(--muted);
}

.project-sidebar {
    align-self: start;
    display: grid;
    gap: 16px;
}

.project-sidebar h2 {
    font-size: 15px;
    font-weight: 600;
}

.project-sidebar .button {
    width: 100%;
}

.project-gallery-section {
    padding-bottom: 90px;
}

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

.project-gallery figure {
    margin: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px;
    transition: border-color .3s var(--ease);
}

.project-gallery figure:hover {
    border-color: var(--line-strong);
}

.project-gallery img {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: contain;
    background: var(--bg-soft);
}

/* Contact */

.contact-layout {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 16px;
    padding-bottom: 90px;
}

.contact-note,
.contact-form {
    padding: 26px;
}

.contact-note h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.contact-note .social-row {
    margin-top: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
    resize: vertical;
}

.check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.check span {
    display: inline;
}

.hidden-field {
    position: absolute;
    left: -9999px;
}

.notice {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.notice p {
    margin-bottom: 0;
}

.notice.success {
    color: var(--success);
    background: rgba(111, 207, 151, 0.08);
    border-color: rgba(111, 207, 151, 0.25);
}

.notice.error {
    color: var(--danger);
    background: rgba(242, 114, 114, 0.08);
    border-color: rgba(242, 114, 114, 0.25);
}

/* Modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.modal-overlay[hidden] {
    display: none;
}

.modal-box {
    position: relative;
    width: min(360px, 100%);
    padding: 30px 26px 26px;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    text-align: center;
}

.modal-box h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-box p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

#recaptcha-container {
    display: flex;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: color .2s var(--ease), border-color .2s var(--ease);
}

.modal-close:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

/* Footer */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px clamp(18px, 4vw, 48px);
    color: var(--muted-2);
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.site-footer strong {
    color: var(--muted);
    font-weight: 600;
}

.site-footer p {
    margin-bottom: 0;
}

.site-footer a {
    text-decoration: none;
    color: var(--muted-2);
    transition: color .2s var(--ease);
}

.site-footer a:hover {
    color: var(--text);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.footer-sep {
    color: var(--line-strong);
}

@media (max-width: 760px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 18px 18px;
        background: rgba(10, 10, 10, 0.98);
        border-bottom: 1px solid var(--line);
    }

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

    .site-nav a {
        padding: 12px 14px;
        border-radius: var(--radius-sm);
    }

    .site-nav a.active {
        background: var(--panel);
        color: var(--text);
    }

    .intro-band,
    .section-grid,
    .featured-projects,
    .project-list,
    .skills-grid,
    .project-detail-layout,
    .project-gallery,
    .contact-layout,
    .two-col {
        grid-template-columns: 1fr;
    }

    .feature-panel,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}

[data-reveal].is-in {
    opacity: 1;
    transform: none;
}

.section-grid article:nth-child(2),
.featured-projects article:nth-child(2),
.project-list article:nth-child(2),
.skills-grid article:nth-child(2) {
    transition-delay: .08s;
}

.section-grid article:nth-child(3) {
    transition-delay: .16s;
}

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

    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .button:hover,
    .section-grid article:hover,
    .project-card:hover,
    .skill-card:hover,
    .feature-card:hover {
        transform: none;
    }
}
