:root {
    --bg: #08090b;
    --surface: rgba(18, 20, 24, 0.78);
    --surface-strong: rgba(26, 29, 34, 0.92);
    --text: #f6f3ec;
    --muted: #bbb5a9;
    --line: rgba(246, 243, 236, 0.13);
    --amber: #38bdf8;
    --mint: #a78bfa;
    --cyan: #60a5fa;
    --rose: #d946ef;
    --violet: #7c3aed;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    text-decoration: none;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 68px 68px,
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px) 0 0 / 68px 68px,
        radial-gradient(circle at 12% 18%, rgba(167, 139, 250, 0.2), transparent 30%),
        radial-gradient(circle at 88% 6%, rgba(56, 189, 248, 0.16), transparent 28%),
        radial-gradient(circle at 75% 62%, rgba(124, 58, 237, 0.14), transparent 32%),
        var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 24%, transparent 72%, rgba(255, 255, 255, 0.04));
    mix-blend-mode: overlay;
    opacity: 0.5;
    z-index: -3;
}

a,
button {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.18), rgba(56, 189, 248, 0.1) 42%, transparent 70%);
    transform: translate3d(-50%, -50%, 0);
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-progress {
    position: fixed;
    inset: 0 auto auto 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--mint), var(--amber), var(--rose));
    z-index: 200;
    box-shadow: 0 0 24px rgba(167, 139, 250, 0.45);
}

.site-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.11;
    z-index: -2;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.header {
    position: fixed;
    top: 1.8rem;
    left: 50%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(112rem, calc(100% - 3.2rem));
    padding: 1rem 1rem 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 1.8rem;
    background: rgba(8, 9, 11, 0.62);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
    font-weight: 900;
}

.logo-mark {
    display: grid;
    width: 4rem;
    height: 4rem;
    place-items: center;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, var(--mint), var(--amber));
    color: #08090b;
    font-family: "JetBrains Mono", monospace;
    font-size: 1.4rem;
    box-shadow: 0 0 28px rgba(167, 139, 250, 0.32);
}

.logo-text {
    color: var(--text);
    font-size: 1.5rem;
    letter-spacing: 0;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar a {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    color: var(--muted);
    font-size: 1.35rem;
    font-weight: 700;
    padding: 0.9rem 1.2rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
    display: none;
    width: 4rem;
    height: 4rem;
    place-items: center;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 2.4rem;
}

.section-shell {
    width: min(112rem, calc(100% - 3.2rem));
    margin: 0 auto;
    padding: 12rem 0;
}

.hero {
    display: grid;
    min-height: 100vh;
    align-items: center;
    grid-template-columns: minmax(0, 1.08fr) minmax(34rem, 0.92fr);
    gap: 6rem;
    padding-top: 14rem;
}

.eyebrow,
.section-kicker {
    color: var(--mint);
    font-family: "JetBrains Mono", monospace;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.contact-panel h2 {
    max-width: 13ch;
    font-size: clamp(4.6rem, 8vw, 8.8rem);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: 0;
}

.hero h1 {
    margin-top: 1.4rem;
}

.hero h2 {
    max-width: 16ch;
    margin-top: 1.2rem;
    background: linear-gradient(100deg, var(--mint), var(--cyan) 54%, var(--rose));
    background-clip: text;
    color: transparent;
    font-size: clamp(2.8rem, 4.2vw, 5rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: 0;
}

.hero h1::selection,
.hero h2::selection,
.section-heading h2::selection {
    background: var(--amber);
    color: #08090b;
}

.hero-text,
.section-heading p,
.about-panel > p,
.contact-panel p {
    max-width: 64ch;
    color: var(--muted);
    font-size: 1.75rem;
    margin-top: 2rem;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    margin-top: 3rem;
}

.btn,
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-height: 4.8rem;
    border-radius: 999px;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.btn {
    padding: 0 2rem;
}

.btn i,
.icon-btn i {
    font-size: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--mint), var(--amber));
    color: #08090b;
    box-shadow: 0 16px 40px rgba(96, 165, 250, 0.22);
}

.btn-secondary,
.icon-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.icon-btn {
    width: 4.8rem;
}

.btn:hover,
.icon-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

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

.impact-card {
    min-height: 13.4rem;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background:
        linear-gradient(145deg, rgba(167, 139, 250, 0.1), transparent 46%),
        rgba(255, 255, 255, 0.045);
    overflow: hidden;
    position: relative;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.impact-card::before {
    content: "";
    position: absolute;
    inset: auto 1.6rem 1.2rem 1.6rem;
    height: 3px;
    background: linear-gradient(90deg, var(--mint), var(--cyan), transparent);
}

.impact-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 48%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.impact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(167, 139, 250, 0.5);
    background:
        linear-gradient(145deg, rgba(167, 139, 250, 0.14), transparent 46%),
        rgba(255, 255, 255, 0.065);
}

.impact-card:hover::after {
    opacity: 1;
}

.impact-kicker {
    display: block;
    color: var(--cyan);
    font-family: "JetBrains Mono", monospace;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-stats strong {
    display: block;
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(2.2rem, 3vw, 3.7rem);
    line-height: 1.05;
    margin-top: 0.8rem;
    overflow-wrap: anywhere;
}

.hero-stats strong[data-suffix]::after {
    content: attr(data-suffix);
}

.impact-label {
    display: block;
    color: var(--muted);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.8rem;
    padding-bottom: 1.2rem;
}

.hero-visual {
    position: relative;
    min-height: 58rem;
    transform-style: preserve-3d;
}

.portrait-frame {
    position: absolute;
    inset: 4rem 0 auto auto;
    width: min(38rem, 88%);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.portrait-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(8, 9, 11, 0.78));
}

.portrait-frame img {
    width: 100%;
    height: 50rem;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.availability-pill {
    position: absolute;
    left: 1.6rem;
    bottom: 1.6rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(8, 9, 11, 0.72);
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.availability-pill span {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 18px var(--mint);
}

.terminal-card {
    position: absolute;
    left: 0;
    bottom: 4.2rem;
    width: min(36rem, 82%);
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: rgba(10, 12, 14, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    transform: translateZ(5rem);
}

.terminal-top {
    display: flex;
    gap: 0.6rem;
    padding: 1.2rem;
    border-bottom: 1px solid var(--line);
}

.terminal-top span {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.terminal-top span:nth-child(1) {
    background: var(--rose);
}

.terminal-top span:nth-child(2) {
    background: var(--amber);
}

.terminal-top span:nth-child(3) {
    background: var(--mint);
}

.terminal-card pre {
    overflow: auto;
    padding: 1.6rem;
}

.terminal-card code {
    color: #dbeafe;
    font-family: "JetBrains Mono", monospace;
    font-size: 1.25rem;
    line-height: 1.8;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
    animation: spin 18s linear infinite;
}

.orbit::before {
    content: "";
    position: absolute;
    top: 18%;
    right: 8%;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 28px var(--cyan);
}

.orbit-one {
    width: 27rem;
    height: 27rem;
    left: 5rem;
    top: 1rem;
}

.orbit-two {
    width: 18rem;
    height: 18rem;
    right: 1rem;
    bottom: 1rem;
    animation-duration: 12s;
    animation-direction: reverse;
}

.split-layout,
.skills-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 5rem;
    align-items: start;
}

.section-kicker {
    margin-bottom: 1.4rem;
}

.section-heading h2,
.contact-panel h2 {
    max-width: 14ch;
    font-size: clamp(3.8rem, 6vw, 6.8rem);
}

.centered {
    max-width: 76rem;
    margin: 0 auto 4rem;
    text-align: center;
}

.centered h2,
.centered p {
    margin-left: auto;
    margin-right: auto;
}

.about-panel,
.contact-panel {
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: clamp(2rem, 4vw, 3.2rem);
}

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

.about-grid article {
    min-height: 20rem;
    padding: 1.8rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
}

.about-grid i {
    color: var(--amber);
    font-size: 3rem;
}

.about-grid h3,
.project-card h3,
.timeline-content h3 {
    color: var(--text);
    font-size: 2.2rem;
    line-height: 1.15;
    margin-top: 1.4rem;
}

.about-grid p,
.project-card p,
.timeline-content p {
    color: var(--muted);
    font-size: 1.45rem;
    margin-top: 1rem;
}

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

.project-card {
    position: relative;
    display: flex;
    min-height: 42rem;
    flex-direction: column;
    padding: 2.2rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.08), transparent 34%),
        var(--surface);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), transparent 36%, rgba(56, 189, 248, 0.14));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.project-card:hover {
    border-color: rgba(96, 165, 250, 0.55);
}

.project-card:hover::after {
    opacity: 1;
}

.project-card.featured {
    grid-column: span 1;
    background:
        linear-gradient(155deg, rgba(167, 139, 250, 0.2), transparent 38%),
        linear-gradient(330deg, rgba(56, 189, 248, 0.14), transparent 36%),
        var(--surface-strong);
}

.project-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.project-topline span,
.timeline-date {
    color: var(--mint);
    font-family: "JetBrains Mono", monospace;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
}

.project-topline i {
    color: var(--amber);
    font-size: 3rem;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 2rem;
}

.project-stack span,
.skill-tags span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 800;
    padding: 0.7rem 1rem;
}

.project-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 2rem;
}

.project-links a {
    display: grid;
    width: 4.4rem;
    height: 4.4rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 2rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.project-links a:hover {
    background: var(--mint);
    color: #08090b;
    transform: translateY(-3px);
}

.timeline {
    position: relative;
    display: grid;
    gap: 1.6rem;
    margin-top: 3.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: 1.1rem;
    width: 2px;
    background: linear-gradient(var(--mint), var(--amber), var(--rose));
}

.timeline-item {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 1.8rem;
}

.timeline-marker {
    position: relative;
    z-index: 1;
    width: 2.4rem;
    height: 2.4rem;
    border: 0.5rem solid var(--bg);
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 24px rgba(167, 139, 250, 0.45);
}

.timeline-content,
.skills-board {
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 2.2rem;
}

.timeline-content h3 {
    margin-top: 0.8rem;
}

.skills-board {
    overflow: hidden;
}

.skill-marquee {
    display: flex;
    width: max-content;
    gap: 1.4rem;
    padding-bottom: 2rem;
    animation: marquee 24s linear infinite;
}

.skill-marquee div {
    display: flex;
    gap: 1.4rem;
}

.skill-marquee img {
    width: 6.4rem;
    height: 6.4rem;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
}

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

.contact {
    padding-bottom: 8rem;
}

.contact-panel {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.contact-panel::before {
    content: "";
    position: absolute;
    inset: -10rem auto auto 50%;
    width: 40rem;
    height: 40rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.18), transparent 66%);
    transform: translateX(-50%);
}

.contact-panel > * {
    position: relative;
}

.contact-panel h2,
.contact-panel p {
    margin-left: auto;
    margin-right: auto;
}

.contact-actions {
    justify-content: center;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 1.6rem;
    width: min(112rem, calc(100% - 3.2rem));
    margin: 0 auto;
    padding: 2.8rem 0 4rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 1.35rem;
    font-weight: 700;
}

.footer a {
    color: var(--text);
}

.reveal {
    opacity: 0;
    transform: translateY(2.4rem);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

@keyframes marquee {
    to {
        transform: translateX(calc(-50% - 0.7rem));
    }
}

@media (max-width: 980px) {
    .menu-toggle {
        display: grid;
    }

    .navbar {
        position: absolute;
        top: calc(100% + 1rem);
        right: 0;
        display: none;
        width: min(32rem, calc(100vw - 3.2rem));
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 1.6rem;
        background: rgba(8, 9, 11, 0.94);
        box-shadow: var(--shadow);
    }

    .navbar.active {
        display: flex;
    }

    .navbar a {
        padding: 1.2rem;
    }

    .hero,
    .split-layout,
    .skills-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 3rem;
        padding-top: 12rem;
    }

    .hero-visual {
        min-height: 50rem;
        order: -1;
    }

    .portrait-frame {
        right: 0;
        left: auto;
        width: min(38rem, 76%);
    }

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

    .project-card {
        min-height: 34rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    html {
        font-size: 58%;
    }

    .header {
        top: 1rem;
        width: calc(100% - 2rem);
    }

    .logo-text {
        display: none;
    }

    .section-shell {
        width: calc(100% - 2rem);
        padding: 9rem 0;
    }

    .hero {
        min-height: auto;
        padding-top: 10rem;
    }

    .hero h1 {
        font-size: 4.4rem;
    }

    .hero h2 {
        max-width: 12ch;
        font-size: 3.1rem;
    }

    .hero-stats,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 44rem;
    }

    .portrait-frame {
        width: 84%;
    }

    .portrait-frame img {
        height: 38rem;
    }

    .terminal-card {
        width: 92%;
    }

    .terminal-card code {
        font-size: 1.1rem;
    }

    .orbit-one {
        left: 0;
        width: 20rem;
        height: 20rem;
    }

    .orbit-two {
        width: 14rem;
        height: 14rem;
    }

    .btn {
        width: 100%;
    }

    .icon-btn {
        flex: 1 1 4.8rem;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }
}

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

    .cursor-glow {
        display: none;
    }
}
