/* ═══════════════════════════════════════════════════════════════════
   YASH VARDHAN SINGH - Portfolio
   Design: Ultra-minimal, dark, 3D-driven scroll storytelling
   Palette: #0a0a0a / #f5f5f0 / #c8ff00 / #1a1a1a
   Fonts: Syne (display), Space Grotesk (headings), Inter (body)
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Screen Reader Only (SEO helper) ─── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0c0c0e;
    --bg-elevated: #141416;
    --text: #f5f5f0;
    --text-dim: #666666;
    --text-muted: #333333;
    --accent: #c8ff00;
    --accent-dim: rgba(200, 255, 0, 0.08);
    --font-display: 'Syne', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

html {
    font-size: 16px;
    scroll-behavior: auto; /* Lenis handles this */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.lenis, html.lenis body {
    height: auto;
}

body {
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200, 255, 0, 0.015) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(255, 255, 255, 0.008) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(200, 255, 0, 0.01) 0%, transparent 50%);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

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

img, svg {
    display: block;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ─── Custom Cursor ─── */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo);
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(200, 255, 0, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo), border-color 0.3s;
}

body:hover .cursor {
    opacity: 1;
}

.cursor.hovering {
    width: 60px;
    height: 60px;
    background: transparent;
    border: 1px solid var(--accent);
    mix-blend-mode: normal;
}

.cursor-follower.hovering {
    width: 80px;
    height: 80px;
    border-color: rgba(200, 255, 0, 0.1);
}

@media (pointer: coarse) {
    .cursor, .cursor-follower { display: none; }
    body { cursor: auto; }
}

/* ─── Noise Overlay ─── */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
}

/* ─── 3D Canvas ─── */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ─── Preloader ─── */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-inner {
    text-align: center;
    position: relative;
}

.preloader-text {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

.preloader-line {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    display: block;
    opacity: 0;
    transform: translateY(100%);
    color: var(--text);
}

.preloader-counter {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-top: 2rem;
    letter-spacing: 0.1em;
    opacity: 0;
}

/* ─── Navigation ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    mix-blend-mode: difference;
    opacity: 0;
    transform: translateY(-20px);
}

.nav-logo a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    position: relative;
    overflow: hidden;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease-out-expo);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.nav-menu-btn span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--text);
    transition: transform 0.4s var(--ease-out-expo), opacity 0.3s;
}

.nav-menu-btn.active span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.nav-menu-btn.active span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out-expo);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.mobile-link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ─── Section Common ─── */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    position: relative;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
    opacity: 0;
}

.label-index {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.15em;
}

.label-line {
    width: 60px;
    height: 1px;
    background: var(--text-muted);
}

.label-text {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    padding: 0 3rem;
    position: relative;
    z-index: 2;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    opacity: 0;
}

.hero-label svg {
    color: var(--accent);
}

.hero-label span {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 12vw, 11rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 3rem;
}

.hero-title-line {
    display: block;
    overflow: hidden;
}

.hero-word {
    display: inline-block;
    transform: translateY(110%);
}

.hero-title-outline {
    -webkit-text-stroke: 1.5px var(--text);
    color: transparent;
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0;
}

.hero-role {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.hero-role p:first-child {
    color: var(--text);
    margin-bottom: 0.25rem;
}

.hero-location {
    font-size: 0.75rem;
}

.hero-scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

.hero-scroll-indicator span {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    writing-mode: vertical-rl;
}

/* Floating Vector Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.float-shape {
    position: absolute;
    color: var(--text-dim);
    opacity: 0;
}

.shape-1 {
    width: 120px;
    top: 15%;
    right: 10%;
    animation: floatSpin 20s linear infinite;
}

.shape-2 {
    width: 180px;
    bottom: 20%;
    left: 5%;
    animation: floatSpin 30s linear infinite reverse;
}

.shape-3 {
    width: 80px;
    top: 60%;
    right: 25%;
    animation: floatSpin 25s linear infinite;
}

@keyframes floatSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── About ─── */
.about {
    position: relative;
    padding: 12rem 0;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: start;
}

.about-large-text {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 2rem;
}

.about-large-text .word {
    display: inline-block;
    opacity: 0.15;
    transition: opacity 0.3s;
}

.about-large-text .word.active {
    opacity: 1;
}

.about-body-text {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.8;
    max-width: 500px;
    opacity: 0;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-top: 1rem;
}

.stat-item {
    border-left: 1px solid var(--text-muted);
    padding-left: 1.5rem;
    opacity: 0;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--accent);
}

.stat-unit {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.about-vector {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    color: var(--text-dim);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.grid-svg {
    width: 100%;
    height: 100%;
}

/* ─── Skills Marquee ─── */
.skills-marquee {
    padding: 3rem 0;
    border-top: 1px solid var(--text-muted);
    border-bottom: 1px solid var(--text-muted);
    overflow: hidden;
    z-index: 1;
    position: relative;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 25s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-right: 2rem;
    flex-shrink: 0;
}

.marquee-item {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--text);
    opacity: 0.7;
    transition: opacity 0.3s, color 0.3s;
}

.marquee-item:hover {
    opacity: 1;
    color: var(--accent);
}

.marquee-separator {
    color: var(--accent);
    font-size: 0.5rem;
    opacity: 0.5;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── Projects ─── */
.projects {
    padding: 12rem 0;
    position: relative;
    z-index: 1;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-item {
    display: grid;
    grid-template-columns: 60px 1fr 200px;
    gap: 2rem;
    align-items: start;
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--text-muted);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    cursor: pointer;
    transition: background 0.5s var(--ease-out-expo);
    text-decoration: none;
    color: inherit;
}

.project-item:first-child {
    border-top: 1px solid var(--text-muted);
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -3rem;
    right: -3rem;
    bottom: 0;
    background: var(--accent-dim);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out-expo);
    z-index: -1;
}

.project-item:hover::before {
    opacity: 1;
}

.project-index {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    padding-top: 0.25rem;
}

.project-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    transition: color 0.4s var(--ease-out-expo);
}

.project-item:hover .project-title {
    color: var(--accent);
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 1.25rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    border: 1px solid var(--text-muted);
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    transition: border-color 0.3s, color 0.3s;
}

.project-item:hover .project-tags span {
    border-color: rgba(200, 255, 0, 0.2);
    color: var(--text);
}

.project-visual {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.project-item:hover .project-visual {
    opacity: 0.6;
    transform: scale(1);
}

.project-visual svg {
    width: 100%;
    height: 100%;
}

/* ─── Experience ─── */
.experience {
    padding: 12rem 0;
    position: relative;
    z-index: 1;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 1rem;
}

.exp-item {
    display: flex;
    gap: 2rem;
    padding: 2.5rem 0;
    opacity: 0;
    transform: translateY(30px);
}

.exp-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 0.5rem;
}

.exp-dot {
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.exp-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

.exp-item:hover .exp-dot::after {
    opacity: 1;
}

.exp-line-v {
    width: 1px;
    flex: 1;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    margin-top: 0.5rem;
    min-height: 40px;
}

.exp-type {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

.exp-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.exp-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 500px;
}

/* ─── Philosophy ─── */
.philosophy {
    padding: 10rem 0;
    position: relative;
    z-index: 1;
}

.philosophy-text {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.philosophy-text p {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.philosophy-text em {
    color: var(--accent);
    font-style: italic;
}

.philosophy-text .word {
    display: inline-block;
    opacity: 0.1;
}

/* ─── Contact ─── */
.contact {
    padding: 10rem 0 4rem;
    position: relative;
    z-index: 1;
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 4rem;
}

.contact-heading-line {
    display: block;
    overflow: hidden;
}

.contact-heading em {
    color: var(--accent);
    font-style: italic;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 6rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--text-muted);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: padding-left 0.5s var(--ease-out-expo);
}

.contact-link:first-child {
    border-top: 1px solid var(--text-muted);
}

.contact-link:hover {
    padding-left: 1rem;
}

.contact-link-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    min-width: 80px;
}

.contact-link-value {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    flex: 1;
    transition: color 0.3s;
}

.contact-link:hover .contact-link-value {
    color: var(--accent);
}

.contact-link svg {
    opacity: 0;
    transform: translate(-10px, 10px);
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}

.contact-link:hover svg {
    opacity: 1;
    transform: translate(0, 0);
}

.contact-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .about-stats {
        flex-direction: row;
        gap: 2rem;
    }

    .project-item {
        grid-template-columns: 40px 1fr;
    }

    .project-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .section-container {
        padding: 0 1.5rem;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .nav {
        padding: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-menu-btn {
        display: flex;
    }

    .hero-footer {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .about-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .about, .projects, .experience {
        padding: 8rem 0;
    }

    .philosophy {
        padding: 6rem 0;
    }

    .contact-link {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .contact-link-label {
        width: 100%;
    }

    .contact-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .project-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-index {
        display: none;
    }

    .exp-item {
        gap: 1rem;
    }

    .floating-shapes {
        display: none;
    }
}
