:root {
    --bg: #0e0e11;
    --card: #16161d;
    --text: #e8e8eb;
    --muted: #a1a1aa;
    --accent: #6366f1;
    --radius: 18px;
    --tilt-angle: -6deg;
    --tilt-angle-reverse: 3deg;
    --max-width: 1200px;
}

/* ================================
   Reset & Base Styles
   ================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    background: linear-gradient(180deg, #0e0e11, #0b0b0f);
    color: var(--text);
}

/* ================================
   Progress Bar
   ================================ */

#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    width: 0;
    z-index: 1200;
}

/* ================================
   Navigation
   ================================ */

nav {
    position: sticky;
    top: 0;
    background: rgba(14, 14, 17, 0.6);
    backdrop-filter: blur(12px);
    z-index: 1100;
}

.nav-inner {
    max-width: var(--max-width);
    margin: auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

    .brand img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--muted);
    }

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 1.25rem;
    transition: color 0.3s ease;
}

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

/* ================================
   Utility Classes
   ================================ */

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem;
}

.muted {
    color: var(--muted);
}

/* ================================
   Hero Section
   ================================ */

.hero-section {
    position: relative;
    min-height: 100vh;
    padding: 0;
    margin-top: -4rem;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

    .hero-video-container iframe,
    .hero-video-container video {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

    .hero-video-container iframe {
        width: 100vw;
        height: 56.25vw;
        min-height: 100vh;
        min-width: 177.77vh;
    }

    .hero-video-container video {
        width: 120vw;
        height: 67.5vw;
        min-height: 120vh;
        min-width: 213.33vh;
        transform: translate(-50%, -50%) scale(1.25);
        object-fit: cover;
    }

    .hero-video-container::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        opacity: 1;
        transition: opacity 0.6s ease;
        pointer-events: none;
    }

    .hero-video-container.loaded::before {
        opacity: 0;
    }

    .hero-video-container::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.85);
        z-index: 1;
    }

.hero-loading {
    position: absolute;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 1;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

    .hero-loading.hidden {
        opacity: 0;
    }

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ================================
   About Intro Section
   ================================ */

.about-intro {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.about-avatar-hero {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    margin-bottom: 2.5rem;
    animation: float 6s ease-in-out infinite;
}

.about-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text), var(--muted));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role-container {
    position: relative;
    height: 6rem;
    width: 100%;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0 3rem;
    overflow: hidden;
}

.role-text {
    position: absolute;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    padding: 0 2rem;
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

    .role-text.active {
        opacity: 1;
        transform: translateX(0);
    }

    .role-text.exit {
        opacity: 0;
        transform: translateX(50px);
    }

.scroll-btn {
    position: absolute;
    bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: var(--accent);
    text-decoration: none;
    animation: bounce 2s infinite;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .scroll-btn:hover {
        background: rgba(99, 102, 241, 0.3);
        border-color: var(--accent);
        transform: translateY(-4px);
        animation: none;
    }

/* ================================
   About Section
   ================================ */

.about-section {
    position: relative;
    min-height: 60vh;
    padding: 6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-details {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    justify-content: center;
}

.about-card {
    background: linear-gradient(180deg, #1b1b23, #14141b);
    padding: 2.25rem;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    gap: 2rem;
    align-items: center;
    transform: rotate(var(--tilt-angle));
    max-width: 980px;
    margin: 0 auto;
    transition: transform 0.25s ease-out;
}

    .about-card.reveal {
        transform: translateY(30px) rotate(var(--tilt-angle));
    }

        .about-card.reveal.visible {
            transform: translateY(0) rotate(var(--tilt-angle));
        }

    .about-card.is-tilting,
    .skills-container.is-tilting {
        transition: none;
    }

.about-inner {
    display: flex;
    gap: 2rem;
    align-items: center;
    transform: rotate(calc(var(--tilt-angle) * -1));
}

.about-avatar {
    width: 220px;
    height: 220px;
    border-radius: 14px;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transform: rotate(8deg);
    flex-shrink: 0;
}

.about-text {
    max-width: 600px;
}

    .about-text h2 {
        font-size: clamp(1.5rem, 3.5vw, 2.25rem);
        letter-spacing: -0.02em;
        margin-bottom: 1rem;
    }

    .about-text p {
        color: var(--muted);
        margin-top: 1rem;
        line-height: 1.6;
    }

.cta-row {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ================================
   Skills Section
   ================================ */

.skills-section {
    padding: 3rem 0;
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-container {
    max-width: var(--max-width);
    margin: 0 auto;
    background: linear-gradient(180deg, #1b1b23, #14141b);
    padding: 2.25rem;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    transform: rotate(var(--tilt-angle-reverse));
    transition: transform 0.25s ease-out;
}

    .skills-container.reveal {
        transform: translateY(30px) rotate(var(--tilt-angle-reverse));
    }

        .skills-container.reveal.visible {
            transform: translateY(0) rotate(var(--tilt-angle-reverse));
        }

.skills-inner {
    transform: rotate(calc(var(--tilt-angle-reverse) * -1));
}

.skills-title {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, var(--text), var(--muted));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .skill-tag:hover {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2));
        border-color: var(--accent);
        transform: translateY(-2px);
    }

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    }

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

    .btn-outline:hover {
        border-color: var(--accent);
        background: rgba(99, 102, 241, 0.1);
    }

/* ================================
   Features Section
   ================================ */

.features {
    padding: 4rem 0;
}

.feature-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

    .feature-row.reverse {
        flex-direction: row-reverse;
    }

.media {
    flex: 1;
    min-width: 280px;
}

    .media video,
    .media iframe {
        width: 100%;
        height: 100%;
        aspect-ratio: 16/9;
        border-radius: 14px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
        display: block;
    }

.info {
    flex: 0 0 360px;
    background: linear-gradient(180deg, #121216, #181821);
    padding: 1.6rem;
    border-radius: 14px;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

    .info h3 {
        margin-bottom: 0.35rem;
    }

    .info p {
        color: var(--muted);
        margin-bottom: 1rem;
    }

    .info .meta {
        display: flex;
        gap: 1rem;
        color: var(--muted);
        font-size: 0.9rem;
    }

/* ================================
   Gallery Section
   ================================ */

.gallery {
    padding: 4rem 0;
}

#gallery,
#music {
    scroll-margin-top: 6rem;
}

.gallery-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #121216, #181821);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.4s ease;
}

    .gallery-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        border-color: rgba(99, 102, 241, 0.3);
    }

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

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.gallery-expand {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.9);
    border-radius: 8px;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-expand {
    opacity: 1;
    transform: scale(1);
}

/* Audio Gallery Items */
.gallery-item.audio-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.audio-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--accent);
    transition: all 0.4s ease;
}

.gallery-item.audio-item:hover .audio-thumbnail {
    transform: scale(1.05);
    color: #8b5cf6;
}

.audio-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    padding: 0 1rem;
}

.gallery-item audio {
    display: none;
}

/* Gallery Separator */
.gallery-separator {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    opacity: 0.6;
}

.separator-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
}

.separator-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

    .separator-content svg {
        flex-shrink: 0;
    }

/* ================================
   Lightbox
   ================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .lightbox.active {
        opacity: 1;
        visibility: visible;
    }

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

    .lightbox-content img {
        max-width: 100%;
        max-height: 80vh;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    }

        .lightbox-content img.hidden {
            display: none;
        }

.lightbox-caption {
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
}

.lightbox-audio-player {
    width: 100%;
    max-width: 600px;
    display: none;
    margin: 1rem 0;
}

    .lightbox-audio-player.active {
        display: block;
    }

    .lightbox-audio-player audio {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
    }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .lightbox-close:hover,
    .lightbox-prev:hover,
    .lightbox-next:hover {
        background: rgba(99, 102, 241, 0.8);
        border-color: rgba(99, 102, 241, 0.9);
        transform: scale(1.1);
    }

.lightbox-close {
    top: 2rem;
    right: 2rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

    .lightbox-prev:hover {
        transform: translateY(-50%) scale(1.1);
    }

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

    .lightbox-next:hover {
        transform: translateY(-50%) scale(1.1);
    }

/* ================================
   Contact Section
   ================================ */

#contact {
    padding: 4rem 0;
}

.contact-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.contact-card {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(180deg, #1b1b23, #14141b);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .contact-intro p {
        font-size: 1.125rem;
        color: var(--muted);
    }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

    .contact-item:hover {
        transform: translateY(-2px);
        border-color: rgba(99, 102, 241, 0.3);
        box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
    }

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 12px;
    color: #fff;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 500;
}

.contact-value {
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
    word-break: break-word;
}

.contact-item:has(.contact-value:first-child) .contact-value,
a[href^="mailto:"] .contact-value {
    font-size: clamp(0.65rem, 2.5vw, 1rem);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ================================
   Background Elements
   ================================ */

.tilt-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;
}

    .tilt-bg .block {
        position: absolute;
        width: 220px;
        height: 220px;
        border-radius: 12px;
        opacity: 0.1;
        transform: rotate(-18deg);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        will-change: transform, opacity;
    }

    .tilt-bg .b1 {
        background: var(--accent);
        left: 6%;
        top: 10%;
    }

    .tilt-bg .b2 {
        background: #ef4444;
        right: 8%;
        top: 18%;
    }

    .tilt-bg .b3 {
        background: #10b981;
        left: 30%;
        bottom: 6%;
        width: 180px;
        height: 180px;
    }

/* ================================
   Animations & Reveals
   ================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ================================
   Footer
   ================================ */

footer {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--muted);
}

/* ================================
   Media Queries
   ================================ */

@media (max-width: 880px) {
    .nav-inner {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        width: 100%;
    }

        .nav-links a {
            margin-left: 0;
            font-size: 0.9rem;
            padding: 0.25rem 0.5rem;
        }

    .about-intro {
        padding: 1rem;
    }

    .about-headline {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .about-avatar-hero {
        width: 140px;
        height: 140px;
    }

    .role-container {
        height: 5rem;
        margin-top: 1.5rem;
    }

    .role-text {
        font-size: clamp(1.5rem, 8vw, 3rem);
        padding: 0 1rem;
    }

    .about-card {
        padding: 1.25rem;
        flex-direction: column;
        transform: none;
    }

    .about-inner {
        transform: none;
        flex-direction: column;
    }

    .about-avatar {
        transform: none;
        width: 160px;
        height: 160px;
    }

    .skills-section {
        padding: 2rem 0;
    }

    .skills-container {
        transform: none;
        padding: 1.5rem;
    }

    .skills-inner {
        transform: none;
    }

    .skills-grid {
        gap: 1.5rem;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        align-items: stretch;
    }

    .info {
        width: 100%;
        flex: 0 0 auto;
    }

    .contact-card {
        padding: 1.75rem;
    }

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

    .contact-item {
        padding: 1rem;
    }

    .contact-value {
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-separator {
        gap: 0.5rem;
        margin: 0.5rem 0;
    }

    .separator-content {
        font-size: 0.8rem;
    }

        .separator-content svg {
            width: 20px;
            height: 20px;
        }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }
}

@media (max-width: 360px) {
    .gallery-grid {
        gap: 0.5rem;
    }
}
