:root {
    --bg: #060814;
    --bg-soft: #0c1022;
    --text: #eef3ff;
    --muted: #a8b3d1;
    --gold: #e8c47a;
    --cyan: #7dd3fc;
    --glass: rgba(16, 22, 48, 0.62);
    --stroke: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 28px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Be Vietnam Pro", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

#stars,
.sky-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

#stars {
    z-index: 0;
}

.sky-glow {
    z-index: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(125, 211, 252, 0.16), transparent 32%),
        radial-gradient(circle at 86% 8%, rgba(232, 196, 122, 0.14), transparent 28%),
        radial-gradient(circle at 70% 80%, rgba(90, 80, 200, 0.18), transparent 40%),
        url("../img/background.jpg") center / cover no-repeat;
    opacity: 0.28;
    filter: saturate(1.1);
}

.nav,
main,
.footer {
    position: relative;
    z-index: 1;
}

.nav {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 7vw;
    backdrop-filter: blur(16px);
    background: rgba(6, 8, 20, 0.55);
    border-bottom: 1px solid var(--stroke);
    z-index: 10;
}

.nav-brand {
    font-weight: 700;
    letter-spacing: 0.18em;
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.92rem;
    transition: color 0.25s ease;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: #fff;
}

.hero {
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    padding: 7vh 7vw 8vh;
}

.eyebrow {
    color: var(--gold);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.72rem;
    margin: 0 0 12px;
}

h1,
h2,
h3 {
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.15;
    margin: 0 0 16px;
}

h1 {
    font-size: clamp(3rem, 7vw, 6.4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    max-width: 16ch;
}

h3 {
    font-size: 1.5rem;
}

.typed-wrap {
    min-height: 1.8em;
    font-size: 1.2rem;
    color: var(--cyan);
    margin: 0 0 18px;
}

.caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 4px;
    background: var(--cyan);
    animation: blink 1s step-end infinite;
    vertical-align: -2px;
}

@keyframes blink {
    50% { opacity: 0; }
}

.lede {
    max-width: 38ch;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(120deg, var(--gold), #f3dea8);
    color: #1a1408;
}

.btn-ghost {
    border-color: var(--stroke);
    background: rgba(255, 255, 255, 0.04);
}

.hero-portrait {
    position: relative;
    display: grid;
    place-items: center;
}

.portrait-frame {
    position: relative;
    width: min(100%, 420px);
    aspect-ratio: 4 / 5;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--stroke);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
    to { transform: scale(1.12) translateY(-12px); }
}

.portrait-badge {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(7, 10, 24, 0.72);
    backdrop-filter: blur(12px);
}

.portrait-badge strong {
    display: block;
    letter-spacing: 0.2em;
}

.portrait-badge span {
    color: var(--muted);
    font-size: 0.88rem;
}

.orbit {
    position: absolute;
    border: 1px dashed rgba(125, 211, 252, 0.35);
    border-radius: 50%;
    animation: spin 28s linear infinite;
}

.orbit-1 {
    width: 86%;
    height: 70%;
}

.orbit-2 {
    width: 108%;
    height: 88%;
    animation-duration: 42s;
    animation-direction: reverse;
    border-color: rgba(232, 196, 122, 0.28);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.section {
    padding: 8vh 7vw;
}

.section-head {
    margin-bottom: 36px;
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

.glass-card {
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.facts {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 12px;
}

.facts li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--stroke);
}

.facts span {
    color: var(--gold);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-photo {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--stroke);
    background: #000;
}

.about-photo img {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.caption {
    margin: 0;
    padding: 14px 18px 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-icon {
    color: var(--gold);
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    margin-bottom: 18px;
}

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

.gallery {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    grid-template-rows: 240px 240px;
    gap: 16px;
}

.gallery-item {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--stroke);
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: 2 / 4;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item figcaption {
    position: absolute;
    left: 14px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(6, 8, 20, 0.7);
    font-size: 0.78rem;
}

.contact-item {
    display: block;
    margin-bottom: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    border-color: rgba(232, 196, 122, 0.4);
}

.contact-item .label {
    display: block;
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.socials a {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    color: var(--muted);
}

.socials a:hover {
    color: var(--text);
    border-color: var(--gold);
}

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

.contact-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid rgba(232, 196, 122, 0.45);
    outline-offset: 1px;
}

.form-note {
    margin: 0;
    color: var(--cyan);
    font-size: 0.9rem;
}

.footer {
    padding: 28px 7vw 40px;
    color: var(--muted);
    border-top: 1px solid var(--stroke);
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: rise 0.9s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 980px) {
    .hero,
    .about-grid,
    .contact-grid,
    .cards {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 220px 220px;
    }

    .gallery-item.tall,
    .gallery-item.wide {
        grid-row: auto;
        grid-column: auto;
        min-height: 220px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        right: 7vw;
        z-index: 20;
        flex-direction: column;
        gap: 0;
        min-width: 200px;
        padding: 12px;
        border-radius: 16px;
        background: rgba(10, 14, 32, 0.98);
        border: 1px solid var(--stroke);
        box-shadow: var(--shadow);
        display: none;
    }

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

    .nav-links a {
        padding: 12px;
    }

    h2 {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .gallery {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .gallery-item {
        min-height: 220px;
    }

    .hero {
        padding-top: 4vh;
    }
}
