:root {
    --bg: #0d0d0d;
    --bg-accent: #d4af37;
    --surface: rgba(18, 18, 18, 0.88);
    --surface-strong: #171717;
    --text: #f5e7b2;
    --muted: #c7b77b;
    --primary: #d4af37;
    --primary-dark: #9a7a17;
    --line: rgba(212, 175, 55, 0.2);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Source Sans 3", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.22), transparent 28%),
        radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.12), transparent 30%),
        linear-gradient(135deg, #080808 0%, #121212 45%, #050505 100%);
}

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

.page-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 1rem auto;
    background: var(--surface);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.page-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(212, 175, 55, 0.06), transparent 30%, transparent 70%, rgba(212, 175, 55, 0.04)),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 39px,
            rgba(212, 175, 55, 0.03) 40px
        );
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.language-switcher {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.06);
}

.lang-button {
    min-width: 3rem;
    padding: 0.45rem 0.8rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.lang-button.is-active {
    background: var(--primary);
    color: #111;
}

.brand,
h1,
h2,
h3 {
    font-family: "Space Grotesk", sans-serif;
}

.brand {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--primary);
}

.site-nav {
    display: flex;
    gap: 1rem;
    font-weight: 600;
}

.site-nav a {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    transition: background-color 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    background: rgba(212, 175, 55, 0.14);
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 0.25rem;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1.7rem;
    height: 2px;
    background: var(--primary);
    margin: 0.35rem 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.section {
    padding: 4.5rem 1.5rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 2rem;
    align-items: center;
    min-height: 78vh;
}

.hero-title-frame {
    display: inline-block;
    padding: 1.1rem 1.3rem 1rem;
    border-radius: 28px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background:
        linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.04) 45%, rgba(0, 0, 0, 0.65)),
        rgba(18, 18, 18, 0.9);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    position: relative;
    overflow: hidden;
}

.hero-title-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 241, 184, 0.22), transparent 32%),
        linear-gradient(90deg, rgba(212, 175, 55, 0.08), transparent 45%);
    pointer-events: none;
}

.hero-title-frame h1 {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-dark);
}

h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    line-height: 0.95;
    margin: 0;
    max-width: 11ch;
    text-wrap: balance;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0;
}

.gold-text {
    background: linear-gradient(180deg, #fff1b8 0%, #d4af37 45%, #8f6a10 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead,
.stack p,
.project-card p,
.contact-form,
.hero-card li {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.quick-links,
.social-strip {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.quick-links a,
.social-strip a {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(212, 175, 55, 0.05);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-link {
    color: var(--primary);
    font-weight: 700;
}

.contact-link:hover {
    color: #f3d36d;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.9rem 1.4rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

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

.button-primary {
    background: var(--primary);
    color: #111;
    box-shadow: 0 12px 24px rgba(212, 175, 55, 0.22);
}

.button-secondary {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}

.hero-card,
.project-card,
.contact-form,
.form-alert {
    background: var(--surface-strong);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 1.75rem;
    transform: rotate(2deg);
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.07), rgba(255, 255, 255, 0.01)),
        var(--surface-strong);
}

.stats-panel {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.stat-box {
    padding: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    background: rgba(212, 175, 55, 0.04);
}

.stat-value {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-name {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.hero-card-label,
.project-tag {
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
}

.grid-two {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

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

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

.experience-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.experience-card {
    padding: 1.4rem;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.05), rgba(255, 255, 255, 0.01)),
        var(--surface-strong);
}

.experience-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
    flex-wrap: wrap;
}

.experience-meta span {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.project-card {
    padding: 1.4rem;
    min-height: 240px;
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.05), rgba(255, 255, 255, 0.01)),
        var(--surface-strong);
}

.skills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.skills-card {
    padding: 1.4rem;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.05), rgba(255, 255, 255, 0.01)),
        var(--surface-strong);
}

.skills-wrap span {
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(24, 24, 24, 0.96);
    border: 1px solid var(--line);
    font-weight: 700;
}

.contact-section {
    padding-bottom: 5rem;
}

.form-alert {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
}

.form-alert-success {
    border-color: rgba(212, 175, 55, 0.28);
    color: #f3d36d;
}

.form-alert-error {
    border-color: rgba(228, 92, 92, 0.26);
    color: #ff8b8b;
}

.contact-form {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.05), rgba(255, 255, 255, 0.01)),
        var(--surface-strong);
}

.contact-form label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    font: inherit;
    background: #0f0f0f;
    color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid rgba(212, 175, 55, 0.24);
    border-color: var(--primary);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 500ms ease, transform 500ms ease;
}

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

@media (max-width: 860px) {
    .hero,
    .grid-two,
    .project-grid,
    .experience-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .site-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .language-switcher {
        order: 2;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 0.5rem;
    }

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

    .hero-card {
        transform: none;
    }
}

@media (max-width: 540px) {
    .page-shell {
        width: min(100% - 1rem, 100%);
        margin: 0.5rem auto;
        border-radius: 22px;
    }

    .section,
    .site-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: clamp(2.3rem, 12vw, 3.3rem);
    }

    .hero-title-frame {
        width: 100%;
        padding: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}
