:root {
    --bg-dark: #050505;
    --onyx-950: #08080a;
    --onyx-900: #0d0d0f;
    --onyx-800: #1a1a1c;
    --onyx-700: #252528;
    --onyx-400: #8a8a8e;
    --onyx-100: #eef1f4;

    --cyber-blue: #00f0ff;
    --signal-white: #ffffff;
    --slate-600: #64748b;
    --slate-glow: rgba(0, 240, 255, 0.15);

    --accent-gradient: linear-gradient(135deg, var(--cyber-blue), #00a3ff);
    --glass-bg: rgba(13, 13, 15, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.9);

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    /* Spacing System */
    --unit: 4px;
    --s-1: calc(var(--unit) * 2);
    --s-2: calc(var(--unit) * 4);
    --s-4: calc(var(--unit) * 8);
    --s-8: calc(var(--unit) * 16);

    /* Transitions */
    --t-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast: all 0.2s ease;
}

/* --- View Transitions API Base --- */
::view-transition-old(*),
::view-transition-new(*) {
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.2, 1, 0.2, 1);
}

/* Grain Overlay */
/* Technical Grid Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

.bg-radial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.03), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Grain Overlay Refined */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 10000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    position: relative;
    z-index: 1;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-black);
    color: white;
    font-family: var(--font-main);
    overflow-x: hidden;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* --- Typography --- */
h1 {
    font-size: var(--step-5);
    font-family: var(--font-heading);
}

h2 {
    font-size: var(--step-3);
    font-family: var(--font-heading);
}

h3 {
    font-size: var(--step-1);
    font-family: var(--font-heading);
}

h4 {
    font-size: var(--step-0);
    font-family: var(--font-heading);
    font-weight: 700;
}

.gradient-text {
    view-transition-name: gradient-header;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 4rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.text-left {
    text-align: left !important;
}

/* --- Components --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font-heading);
    border: none;
}

.btn-primary {
    background: var(--cyber-blue);
    color: var(--bg-dark);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--onyx-800);
    border-color: var(--cyber-blue);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: var(--zinc-900);
    color: var(--zinc-100);
    border: 1px solid var(--zinc-800);
}

.btn-secondary:hover {
    border-color: var(--cyber-blue);
    transform: translateY(-3px);
}

.badge {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--cyber-blue);
    padding: 0.4rem 1rem;
    border-radius: 4px; /* Sharp technical edge */
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    display: inline-block;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: white;
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--cyber-blue);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--zinc-400);
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: white;
}

/* --- Cinematic Hero --- */
.hero-section {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    z-index: 10;
    position: relative;
}

.hero-section h1 {
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--signal-white);
}

.glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--slate-glow) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--zinc-900);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.photo-placeholder .icon {
    font-size: 8rem;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
}

/* Section Base */
section {
    width: 100vw;
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    padding: 120px 0;
}

.container {
    max-width: 1300px;
}

/* Removed Blobs & Curtain - Handled by bg-grid and bg-radial */

.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}

.blob-wrapper {
    position: absolute;
    width: 600px;
    height: 600px;
}

.blob {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.15;
    will-change: transform;
    transition: transform 0.2s ease-out;
    /* Smooth parallax */
}

#blob-1-wrapper {
    top: -10%;
    left: -10%;
    animation: move-1 40s linear infinite alternate;
}

#blob-1 {
    background: var(--indigo-500);
}

#blob-2-wrapper {
    bottom: -15%;
    right: -10%;
    animation: move-2 35s linear infinite alternate;
}

#blob-2 {
    background: var(--onyx-800);
}

#blob-3-wrapper {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: move-3 45s linear infinite alternate;
}

#blob-3 {
    background: var(--cyber-blue);
}

@keyframes move-1 {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(20vw, 30vh);
    }
}

@keyframes move-2 {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(-30vw, -20vh);
    }
}

@keyframes move-3 {
    from {
        transform: translate(-50%, -50%);
    }

    to {
        transform: translate(-30%, -70%);
    }
}

/* --- Capabilities --- */
.capabilities-section {
    padding: 8rem 0;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.capability-card {
    background: var(--onyx-900);
    padding: 3rem 2rem;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    transition: var(--t-smooth);
    position: relative;
    overflow: hidden;
}

.capability-card:hover {
    border-color: var(--cyber-blue);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.capability-card .icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: block;
    opacity: 0.8;
}

.capability-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-family: var(--font-heading);
    color: var(--signal-white);
}

.capability-card ul {
    list-style: none;
    color: var(--onyx-400);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* --- Projects --- */
.projects-section {
    padding: 8rem 0;
}

.projects-vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.project-showcase {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: flex-start;
    padding: 4rem;
    background: var(--onyx-900);
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    transition: var(--t-smooth);
}

.project-showcase:hover {
    border-color: rgba(0, 240, 255, 0.3);
}

.project-visual {
    background: #000;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.project-details h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--signal-white);
}

.project-desc {
    font-size: 1rem;
    color: var(--onyx-400);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.proof-points {
    background: var(--onyx-800);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border-left: 2px solid var(--cyber-blue);
}

.proof-points strong {
    font-family: var(--font-mono);
    color: var(--cyber-blue);
    font-size: 0.7rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.proof-points ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    font-size: 0.9rem;
    list-style: none;
    color: var(--onyx-100);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.metric {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyber-blue);
    background: rgba(0, 240, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
}

.text-link {
    color: var(--signal-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--cyber-blue);
    transition: var(--t-fast);
}

.text-link:hover {
    color: var(--cyber-blue);
    border-bottom-width: 2px;
}

/* --- How I Build --- */
.depth-section {
    padding: 10rem 0;
    background: #0c0c0e;
}

.depth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.depth-steps {
    margin-top: 3rem;
}

.step {
    margin-bottom: 2.5rem;
}

.step h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.step p {
    color: var(--zinc-400);
    font-size: 1rem;
}

.code-showcase-card {
    background: var(--deep-black);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
}

.code-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

.dots span:nth-child(1) {
    background: #ff5f56;
}

.dots span:nth-child(2) {
    background: #ffbd2e;
}

.dots span:nth-child(3) {
    background: #27c93f;
}

.file-name {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--zinc-400);
}

.code-body {
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

code {
    color: #d4d4d8;
}

.keyword {
    color: #c678dd;
}

.class-name {
    color: #e5c07b;
}

.comment {
    color: #5c6370;
    font-style: italic;
}

.func {
    color: #61afef;
}

.type {
    color: #56b6c2;
}

/* --- Metrics --- */
.metrics-section {
    padding: 6rem 0;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    background: var(--onyx-900);
    padding: 4rem;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
}

.metric-item .count {
    font-size: 4rem;
    font-weight: 800;
    color: var(--cyber-blue);
    display: block;
    line-height: 1;
    font-family: var(--font-heading);
}

.metric-item p {
    color: var(--onyx-400);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Forms --- */
.contact-section {
    padding: 10rem 0;
}

.contact-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--onyx-900);
    padding: 4rem;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--onyx-950);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    color: white;
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: var(--t-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cyber-blue);
    background: var(--onyx-800);
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Philosophy Section --- */
.philosophy-section {
    padding: 10rem 0;
    background: var(--bg-dark);
    position: relative;
}

.philosophy-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 5rem 4rem;
    background: rgba(15, 15, 18, 0.6);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

.philosophy-card h3 {
    font-size: var(--step-2);
    line-height: 1.3;
    margin-bottom: 2rem;
    font-weight: 700;
    color: white;
}

.philosophy-card p {
    font-size: 1.2rem;
    color: var(--zinc-400);
    max-width: 700px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .project-showcase,
    .project-showcase.reverse,
    .depth-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .project-showcase.reverse .project-visual {
        order: 0;
    }

    .metrics-row {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 120px 5% 4rem;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .hero-section h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 0 auto 2rem;
    }

    .hero-visual {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        height: 300px;
        margin: 0 auto;
    }

    .personal-frame {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    .hero-btns {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .capabilities-section,
    .projects-section,
    .depth-section,
    .metrics-section,
    .philosophy-section,
    .contact-section {
        padding: 5rem 0;
    }

    .project-details h3 {
        font-size: 1.8rem;
    }

    .project-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .metrics-row {
        padding: 2rem;
        border-radius: 20px;
    }

    .metric-item .count {
        font-size: 2.5rem;
    }

    .philosophy-card {
        padding: 3rem 1.5rem;
        border-radius: 20px;
    }

    .philosophy-card h3 {
        font-size: 1.5rem;
    }

    .contact-card {
        padding: 3rem 1.5rem;
        border-radius: 20px;
    }
}