:root {
    --bg: #030712;
    --bg-elevated: #050a1a;
    --bg-soft: #0b1220;
    --accent: #a855f7;
    --accent-soft: rgba(168, 85, 247, 0.16);
    --accent-strong: #7c3aed;
    --text: #f9fafb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.3);
    --card-border: rgba(148, 163, 184, 0.35);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.7);
    --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.6);
    --nav-height: 72px;
    --shell: 1100px;
    --transition-fast: 160ms ease-out;
    --transition-med: 220ms ease-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #111827 0, #020617 48%, #000 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

img, video, iframe {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-main {
    padding-top: var(--nav-height);
}

.eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(2.1rem, 3vw, 2.6rem);
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
}

.section-title.align-left {
    text-align: left;
}

.section-intro {
    font-size: 1rem;
    max-width: 32rem;
    color: var(--text-muted);
    margin: 0.5rem auto 0;
    text-align: center;
}

.section-intro.align-left {
    margin-left: 0;
    text-align: left;
}

.section {
    padding: 4rem 0 4.5rem;
}

.accent {
    color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.6rem;
    font-size: 0.98rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fefdfb;
    box-shadow: 0 16px 40px rgba(88, 28, 135, 0.7);
}

.btn.primary:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 20px 50px rgba(88, 28, 135, 0.9);
}

.btn.ghost {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.5);
    color: var(--text);
}

.btn.ghost:hover {
    background: rgba(30, 64, 175, 0.3);
    border-color: rgba(191, 219, 254, 0.7);
}

.btn.full {
    width: 100%;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 20;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 55%), rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 0, #e5e7eb 0, #f97316 32%, #7c3aed 70%, #0f172a 100%);
    box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.7), 0 14px 35px rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.brand-text {
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    font-size: 0.95rem;
}

.nav-link {
    position: relative;
    padding: 0.25rem 0;
    color: var(--text-muted);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316, var(--accent));
    transition: width var(--transition-med);
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    width: 100%;
}

.nav-link.is-active {
    color: var(--text);
}

.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #e5e7eb;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
}

.hero {
    padding: 5.5rem 0 4.75rem;
}

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 3.25rem;
}

.hero-copy {
    max-width: 32rem;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 4vw, 3rem);
    letter-spacing: -0.06em;
    margin-bottom: 0.9rem;
}

.hero-tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.9rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.hero-media {
    display: flex;
    justify-content: center;
}

.avatar-ring {
    width: min(320px, 70vw);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    padding: 4px;
    background: conic-gradient(from 210deg, #22c55e, #a855f7, #38bdf8, #f97316, #22c55e);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.9);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.section-work {
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.1), transparent 60%), var(--bg-soft);
}

.section-about {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(15, 23, 42, 0.9);
}

.nav-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 2.7rem;
}

.nav-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.06), transparent 60%), rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow-subtle);
    padding: 1.75rem 1.7rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    isolation: isolate;
}

.nav-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(168, 85, 247, 0.22), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition-med);
    z-index: -1;
}

.nav-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.nav-card-body h3 {
    font-size: 1.15rem;
}

.nav-card-body p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-card-cta {
    font-size: 0.9rem;
    color: var(--accent);
    margin-top: 0.4rem;
}

.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(var(--lift, 0));
    transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.tilt-card:hover {
    --lift: -6px;
    box-shadow: var(--shadow-soft);
    border-color: rgba(248, 250, 252, 0.4);
}

.tilt-card:hover::before {
    opacity: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr);
    gap: 2.5rem;
    align-items: flex-start;
}

.about-text p {
    color: var(--text-muted);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pill {
    font-size: 0.8rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: radial-gradient(circle at top, rgba(251, 191, 36, 0.2), transparent 55%), rgba(15, 23, 42, 0.9);
}

.site-footer {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    background: radial-gradient(circle at top, rgba(15, 118, 110, 0.18), transparent 55%), #020617;
    padding: 3.2rem 0 2.2rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    align-items: flex-start;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.footer-subtitle {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-link {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.footer-link:hover {
    color: var(--text);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.field label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.field input,
.field textarea {
    border-radius: 11px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    font: inherit;
}

.field input:focus,
.field textarea:focus {
    outline: 1px solid rgba(59, 130, 246, 0.9);
    border-color: rgba(96, 165, 250, 0.9);
}

.form-note {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-bottom {
    margin-top: 2.4rem;
    border-top: 1px solid rgba(15, 23, 42, 0.9);
    padding-top: 1.2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}

.media-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.04), transparent 60%), rgba(15, 23, 42, 0.96);
    padding: 1.3rem 1.3rem 1.4rem;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.page-game .media-card {
    cursor: default;
}

.media-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-soft);
    border-color: rgba(248, 250, 252, 0.4);
}

.media-thumb {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.image-thumb {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 4 / 3;
}

.media-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.media-title {
    font-size: 1.05rem;
}

.media-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.page-hero {
    padding-top: 5rem;
    padding-bottom: 1.5rem;
}

.page-hero .section-intro {
    max-width: 32rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-med), visibility var(--transition-med);
    z-index: 40;
}

.modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.modal-inner {
    max-width: 900px;
    width: 100%;
    border-radius: 20px;
    background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.05), transparent 55%), #020617;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.95);
    padding: 1.5rem 1.5rem 1.75rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.9rem;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

.modal-body {
    margin-top: 1.2rem;
}

.modal-title {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.modal-media {
    margin-top: 0.9rem;
    border-radius: 16px;
    overflow: hidden;
}

.modal-image,
.modal-video {
    width: 100%;
}

.modal-description {
    margin-top: 0.95rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.audio-project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.7rem;
}

.audio-project {
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    background: radial-gradient(circle at top right, rgba(52, 211, 153, 0.16), transparent 55%), rgba(15, 23, 42, 0.96);
    padding: 1.4rem 1.4rem 1.5rem;
    box-shadow: var(--shadow-subtle);
}

.audio-control {
    width: 100%;
    margin: 0.6rem 0 0.7rem;
}

.waveform {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 26px;
    margin-bottom: 0.7rem;
}

.wave-bar {
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(to top, rgba(156, 163, 175, 0.4), rgba(248, 250, 252, 0.95));
    transform-origin: bottom;
    animation: wave 1s ease-in-out infinite;
    opacity: 0.85;
}

.wave-bar:nth-child(2) { animation-delay: 0.05s; }
.wave-bar:nth-child(3) { animation-delay: 0.1s; }
.wave-bar:nth-child(4) { animation-delay: 0.15s; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; }
.wave-bar:nth-child(6) { animation-delay: 0.25s; }
.wave-bar:nth-child(7) { animation-delay: 0.3s; }
.wave-bar:nth-child(8) { animation-delay: 0.35s; }

.audio-project .wave-bar {
    animation-play-state: paused;
}

.audio-project.is-playing .wave-bar {
    animation-play-state: running;
}

.video-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #020617;
}

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

.tech-list {
    margin-top: 0.4rem;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tech-list li + li {
    margin-top: 0.2rem;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 650ms ease-out forwards;
}

.fade-in-up.delay-1 {
    animation-delay: 160ms;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(0.6);
    }
    50% {
        transform: scaleY(1);
    }
}

@media (max-width: 960px) {
    .hero-shell {
        grid-template-columns: minmax(0, 1.2fr);
        gap: 2.4rem;
    }

    .hero-shell {
        text-align: center;
    }

    .hero-copy {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .avatar-ring {
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audio-project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .site-nav {
        position: fixed;
        inset: var(--nav-height) 0 auto;
        flex-direction: column;
        background: rgba(2, 6, 23, 0.98);
        padding: 0.9rem 1.5rem 1.2rem;
        border-bottom: 1px solid rgba(31, 41, 55, 0.9);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-med), transform var(--transition-med);
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .media-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .section {
        padding: 3.3rem 0 3.6rem;
    }

    .page-hero {
        padding-top: 4.6rem;
    }
}

@media (max-width: 480px) {
    .shell {
        padding: 0 1.1rem;
    }

    .hero {
        padding-top: 5rem;
    }

    .btn {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }
}
