:root {
    --bg: #07080a;
    --bg-elevated: #0d0f14;
    --glass-alpha: 0.40;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --surface-soft: rgba(255, 255, 255, 0.032);
    --text: #f6f7f9;
    --muted: #a9adb7;
    --dim: #737783;
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.24);
    --accent: #dfe7ff;
    --accent-strong: #ffffff;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
    --radius: 8px;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Manrope', sans-serif;
    --transition: 220ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 0%, rgba(140, 157, 198, 0.22), transparent 34rem),
        radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.11), transparent 26rem),
        linear-gradient(135deg, #06070a 0%, #11141a 48%, #050507 100%);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 78px 78px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

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

button {
    font: inherit;
}

ul {
    list-style: none;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.glass {
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, calc(var(--glass-alpha) * 0.10)), rgba(255, 255, 255, calc(var(--glass-alpha) * 0.035))),
        var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(1.12);
    -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 8, 10, 0.62);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.05rem;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    transition: color var(--transition);
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    padding: 140px 0 90px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
    gap: 2.8rem;
    align-items: start;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.center {
    text-align: center;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    letter-spacing: 0;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(3rem, 5.8vw, 5.5rem);
    line-height: 0.97;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    max-width: 740px;
    margin-top: 1.65rem;
    color: var(--text);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.55;
    font-weight: 600;
}

.hero-desc,
.large-copy {
    color: var(--muted);
    font-size: 1rem;
}

.hero-desc {
    max-width: 720px;
    margin-top: 1.35rem;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.4rem;
}

.btn {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0 1.3rem;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) * 1.3);
    font-weight: 800;
    transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    backdrop-filter: blur(20px) saturate(1.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.btn-primary {
    color: #06070a;
    background: var(--accent-strong);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.18);
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.9rem;
    max-width: 640px;
    margin-top: 1.8rem;
}

.social-grid a,
.tag,
.pill {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.social-grid a {
    padding: 0 1rem;
    transition: all var(--transition);
}

.social-grid a:hover {
    color: var(--accent-strong);
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(1.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    display: flex;
    min-height: auto;
    align-items: flex-start;
    justify-content: center;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 10% 8%;
    border-radius: 40px;
    background: radial-gradient(circle at 30% 25%, rgba(92, 142, 255, 0.22), transparent 42%), radial-gradient(circle at 72% 74%, rgba(255, 255, 255, 0.08), transparent 32%);
    filter: blur(18px);
    pointer-events: none;
}

.profile-shell {
    position: relative;
    width: min(360px, 100%);
    aspect-ratio: 4 / 5;
    display: grid;
    align-items: center;
    justify-items: center;
    overflow: hidden;
    border-radius: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.24);
}

.profile-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: radial-gradient(circle at 30% 16%, rgba(255, 255, 255, 0.18), transparent 19%), radial-gradient(circle at 70% 82%, rgba(86, 121, 255, 0.12), transparent 20%);
    pointer-events: none;
}

.profile-orbit {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 16px rgba(82, 125, 255, 0.08), 0 0 0 28px rgba(70, 108, 255, 0.04);
    pointer-events: none;
}

.hero-profile-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: top;
    filter: grayscale(0.25) contrast(1.05);
}

.floating-role {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: min(360px, 100%);
    margin-top: 1rem;
    padding: 1.15rem 1.15rem 1.1rem;
    border-radius: calc(var(--radius) * 1.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(22px);
    z-index: 10;
}

.floating-role span {
    display: block;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.floating-role strong {
    display: block;
    margin: 0.2rem 0 0.45rem;
    font-size: 1.14rem;
    color: var(--accent-strong);
}

.floating-role small {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
}

.section {
    padding: 92px 0;
}

.section-alt {
    border-block: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.026);
}

.section-title {
    max-width: 820px;
    margin: 0 auto 2.4rem;
    text-align: center;
    font-size: clamp(2.1rem, 4.7vw, 4rem);
    line-height: 0.98;
}

.section-title.left {
    margin-inline: 0;
    text-align: left;
}

.split-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3.5rem;
    align-items: start;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    margin-top: 1.6rem;
}

.stat,
.skill-card,
.timeline-item,
.info-card,
.media-panel,
.contact-card,
.project-card {
    border-radius: var(--radius);
}

.stat {
    min-height: 154px;
    padding: 1.25rem;
}

.stat strong {
    display: block;
    margin-bottom: 0.55rem;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3rem);
    line-height: 1;
}

.stat span {
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 700;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.skill-card,
.info-card,
.media-panel,
.contact-card {
    padding: 1.25rem;
}

.skill-card h3,
.media-panel h3,
.info-card h3 {
    margin-bottom: 0.72rem;
    font-size: 1.12rem;
}

.skill-tags,
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag,
.pill {
    padding: 0.24rem 0.6rem;
}

.timeline {
    display: grid;
    gap: 1rem;
    max-width: 930px;
    margin: 0 auto;
}

.timeline-item {
    position: relative;
    padding: 1.35rem 1.35rem 1.35rem 1.8rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.048);
    backdrop-filter: blur(16px);
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 1.45rem;
    left: 0.85rem;
    width: 5px;
    height: calc(100% - 2.9rem);
    border-radius: 999px;
    background: linear-gradient(to bottom, var(--accent-strong), rgba(255, 255, 255, 0.12));
}

.meta {
    display: inline-flex;
    margin-bottom: 0.26rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline-item p,
.project-content p,
.info-card p {
    color: var(--muted);
}

.timeline-item h3 {
    font-size: 1.22rem;
}

.timeline-company {
    display: inline-block;
    margin: 0.2rem 0 0.55rem;
    color: var(--text);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.34);
    text-underline-offset: 4px;
}

.experience-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.2rem 0 0.8rem;
}

.property-stars,
.mini-btn {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.mini-btn {
    color: var(--text);
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.mini-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(18px) saturate(1.1);
}

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

.project-card {
    overflow: hidden;
}

.project-slider {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.075) 0 1px, transparent 1px 15px);
}

.project-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    opacity: 0;
    transition: opacity 520ms ease;
}

.project-slide.is-active {
    opacity: 1;
}

.project-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
}

.project-slide img.is-missing {
    display: none;
}

.project-slide img:not(.is-missing) + .image-placeholder {
    display: none;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.slider-controls {
    position: absolute;
    inset: auto 0.9rem 0.9rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.slide-dots {
    display: flex;
    gap: 0.35rem;
    pointer-events: auto;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.slide-dot.is-active {
    width: 22px;
    background: var(--accent-strong);
}

.slider-arrows {
    display: flex;
    gap: 0.35rem;
    pointer-events: auto;
}

.slider-arrow {
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all var(--transition);
}

.slider-arrow:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px) saturate(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
    transform: scale(1.08);
}

.project-content {
    padding: 1.25rem;
}

.project-content h3 {
    margin-bottom: 0.62rem;
    font-size: 1.24rem;
}

.project-tags {
    margin-top: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.media-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.9fr;
    gap: 1.2rem;
}

.media-panel {
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.media-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    border-color: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(24px) saturate(1.15);
}

.embed-frame {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: calc(var(--radius) * 1.2);
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    transition: border-color var(--transition);
}

.media-panel:hover .embed-frame {
    border-color: rgba(255, 255, 255, 0.16);
}

.embed-frame.spotify {
    aspect-ratio: auto;
    height: 352px;
}

.tiktok-widget {
    min-height: 352px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: calc(var(--radius) * 1.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    transition: border-color var(--transition);
}

.media-panel:hover .tiktok-widget {
    border-color: rgba(255, 255, 255, 0.16);
}

.tiktok-widget .tiktok-embed {
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
}

.embed-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-card {
    display: grid;
    gap: 0.75rem;
}

.contact-card a,
.contact-card span {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.contact-card a:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(20px);
}

.lightbox[hidden] {
    display: none;
}

.lightbox figure {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

.lightbox img {
    max-width: min(100%, 1180px);
    max-height: 82vh;
    border-radius: var(--radius);
    object-fit: contain;
    box-shadow: var(--shadow);
}

.lightbox figcaption {
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.lightbox-close,
.lightbox-nav {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    backdrop-filter: blur(16px);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    min-height: 42px;
    padding: 0 0.85rem;
}

.lightbox-nav {
    min-width: 62px;
    min-height: 48px;
}

.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.24);
    color: var(--muted);
    text-align: center;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    filter: blur(10px);
    transition:
        opacity 720ms ease,
        transform 720ms cubic-bezier(0.2, 0.75, 0.2, 1),
        filter 720ms ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform, filter;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

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

    .hero-visual {
        order: -1;
        min-height: 360px;
    }

    .profile-shell {
        width: min(330px, 100%);
    }

    .skills-grid,
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 28px, 1160px);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 76px;
        right: 14px;
        left: 14px;
        display: grid;
        gap: 0;
        padding: 0.6rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: rgba(8, 9, 12, 0.94);
        box-shadow: var(--shadow);
        backdrop-filter: blur(22px);
        transform: translateY(-130%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        display: block;
        padding: 0.76rem;
    }

    .hero {
        min-height: auto;
        padding-top: 104px;
    }

    .hero-actions,
    .btn {
        width: 100%;
    }

    .stats-grid,
    .skills-grid,
    .projects-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .stat {
        min-height: 132px;
    }

    .section {
        padding: 66px 0;
    }

    .lightbox {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .lightbox-prev,
    .lightbox-next {
        position: fixed;
        bottom: 1rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

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