:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Linear.app Style Fixed Grid Background overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Increased visibility: prominent modern square grid lines */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center center;
    pointer-events: none;
    /* Widened fade mask so the grid covers far more of the screen before fading to black */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0.15) 100%);
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0.15) 100%);
}

.dashboard {
    width: 100%;
    max-width: 1400px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 4rem;
    /* slightly less top/bottom padding to give hero more room */
    position: relative;
}

.navbar {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    padding: 1.5rem 0;
    z-index: 10;
}

.navbar a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.navbar a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.hero-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 2rem;
}

.background-text {
    width: 100%;
    text-align: center;
    z-index: 1;
    position: relative;
}

.background-text h1 {
    font-family: var(--font-heading);
    font-size: 15vw;
    /* Keeps it exactly within screen width bounds */
    line-height: 1;
    color: #dedede;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    letter-spacing: -2px;
    white-space: nowrap;
}

.content-layer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Horizontally centers side boxes against the avatar's height */
    width: 100%;
    padding: 0 2rem;
    margin-top: -4vw;
    /* This controls the EXACT 10% overlap of the head into the text! */
}

.info-box {
    flex: 1;
    max-width: 320px;
    margin-top: 4rem;
    /* Subtle nudge downward if needed */
}

.info-box p {
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.8px;
    color: #cccccc;
    font-weight: 500;
}

.avatar-container {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.avatar {
    width: 100%;
    max-width: 450px;
    object-fit: cover;
}

.scroll-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    margin-top: 4rem;
    gap: 1.5rem;
}

.scroll-text {
    font-family: monospace;
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: #888888;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.scroll-line {
    width: 2px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    margin-right: 0.5rem; /* Centering under the vertical text */
}

.scroll-dot {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 40px; /* Light streak */
    background: linear-gradient(to bottom, transparent, #06b6d4, #ffffff);
    animation: scrollStreak 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px #06b6d4;
}

@keyframes scrollStreak {
    0% {
        top: -50%;
    }
    100% {
        top: 150%;
    }
}

/* --- PROJECTS SECTION (Apple/Valorant Style) --- */
.projects-section {
    height: 500vh;
    /* gives enough scroll depth to span the horizontal scroll width */
    position: relative;
    background-color: transparent;
    /* Expose the grid */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.horizontal-scroll {
    display: flex;
    align-items: center;
    padding: 0 10vw;
    gap: 8vw;
    will-change: transform;
    min-width: max-content;
}

.projects-title {
    flex: 0 0 auto;
    width: 30vw;
}

.projects-title h2 {
    font-size: 2rem;
    color: #d946ef;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.projects-title h3 {
    font-size: 6vw;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
}

.projects-title p {
    font-size: 1.2rem;
    color: #a0a0a0;
}

/* Container for the 3D flip card */
.project-card {
    flex: 0 0 auto;
    width: 30vw; /* Narrower size for 5 cards */
    aspect-ratio: 10/14; /* Valorant portrait style */
    perspective: 1500px;
}

/* The wrapper that actually flips */
.project-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1);
    transform-style: preserve-3d;
    pointer-events: none; /* Pre-empt hover jitter */
}

.project-card:hover .project-card-inner {
    transform: rotateY(180deg);
}

/* Common properties for both front and back faces */
.project-card-front, .project-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    background: #0d0d0d;
    pointer-events: auto;
}

/* Front Face Styling */
.project-card-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.project-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.1);
    transition: filter 0.5s ease;
}

.project-card:hover .project-card-front img {
    filter: brightness(0.3);
}

.front-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    text-align: left;
}

.front-overlay h4 {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Back Face Styling */
.project-card-back {
    background: #080808;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

.project-card-back h4 {
    font-size: 2rem;
    color: #d946ef;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.project-card-back p {
    font-size: 1.1rem;
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.project-links a {
    display: inline-block;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: monospace;
    letter-spacing: 1px;
}

.project-links a:hover {
    background: #fff;
    color: #000;
}

.gap-card {
    width: 25vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-card h2 {
    font-size: 3rem;
    color: #222;
    font-family: var(--font-heading);
}

/* Scroll Intersection Reveal Classes */
.reveal-hidden {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* --- PUBLICATIONS SECTION (Sticky Card Stack) --- */
.pub-section {
    padding: 10rem 10vw;
    background-color: transparent;
    /* Expose grid */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pub-header {
    text-align: center;
    margin-bottom: 6rem;
}

.pub-header h2 {
    font-size: 2rem;
    color: #d946ef;
    /* Matching the 01 // neon fuchsia color */
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.pub-header h3 {
    font-size: 6vw;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.pub-header p {
    font-size: 1.2rem;
    color: #a0a0a0;
}

.pub-cards-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    position: relative;
    padding-bottom: 2rem;
}

/* The magic sticky stacking */
.pub-card {
    position: sticky;
    min-height: 55vh;
    height: auto;
    border-radius: 30px;
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 -30px 50px rgba(0, 0, 0, 0.95);
    /* Deep shadow to separate black layers */
    border: 2px solid #ffffff;
    /* Stark white border per request */
    background: #000000;
    /* Pure black background per request */
}

/* Tiered stacking offsets so they look layered from behind */
.card-1 {
    top: 15vh;
    z-index: 10;
}

.card-2 {
    top: 18vh;
    z-index: 11;
}

.card-3 {
    top: 21vh;
    z-index: 12;
}

.pub-card-content {
    max-width: 800px;
}

.pub-year {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: #ffffff;
    /* Solid white background for year */
    color: #000000;
    /* Black text for year */
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.pub-card h4 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    line-height: 1.1;
    letter-spacing: -1px;
    color: #ffffff;
}

.pub-journal {
    font-size: 1.2rem;
    color: #777777;
    /* Grayscale detail */
    font-weight: 300;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pub-desc {
    font-size: 1.1rem;
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 85%;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
    border-bottom: 1px solid transparent;
}

.pub-link:hover {
    opacity: 0.7;
    border-bottom: 1px solid #ffffff;
}

.pub-link:hover .arrow {
    transform: translateX(5px);
}

.pub-link .arrow {
    transition: transform 0.3s ease;
}

/* --- HOBBIES SECTION (Cinematic Film Strip) --- */
.hobbies-section {
    padding: 10rem 0;
    background-color: transparent;
    /* Expose grid */
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hobbies-header {
    text-align: center;
    margin-bottom: 8rem;
    padding: 0 4rem;
}

.hobbies-header h2 {
    font-size: 2rem;
    color: #d946ef;
    /* Magenta sync */
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.hobbies-header h3 {
    font-size: 6vw;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    color: #ffffff;
}

.hobbies-header p {
    font-size: 1.2rem;
    color: #a0a0a0;
}

.film-strip-tilt {
    transform: rotate(-6deg) scale(1.1);
    /* Tilt diagonally */
    width: 100vw;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.95);
    padding: 4rem 0;
    border-top: 2px solid #222;
    border-bottom: 2px solid #222;
}

.film-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    /* Move by precisely half its total width seamlessly */
    animation: marquee 20s linear infinite;
}

/* Hover pause removed per request */

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(calc(-50% - 2rem), 0, 0);
    }

    /* Offset by exactly half width (-50%) and half the gap (-2rem) */
}

/* Cinematic Slide framing */
.film-frame {
    width: 35vw;
    aspect-ratio: 4/3;
    background: #0d0d0d;
    padding: 1.5rem 1.5rem 5.5rem 1.5rem;
    /* classic polaroid thick bottom lip */
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
    filter: grayscale(80%) sepia(30%) contrast(1.1);
    border: 1px solid #222;
    position: relative;
}

.film-frame:hover {
    transform: scale(1.05) rotate(1.5deg);
    filter: grayscale(0%) sepia(0%) contrast(1);
    /* Reveal true detail on hover */
    z-index: 10;
}

.film-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #1a1a1a;
}

/* --- EXPERIENCE SECTION (Draw Timeline) --- */
.exp-section {
    padding: 4rem 10vw;
    background-color: transparent;
    /* Seamless grid continuation */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.exp-header {
    text-align: center;
    margin-bottom: 8rem;
}

.exp-header h2 {
    font-size: 2rem;
    color: #4ade80;
    /* Neon green iteration */
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.exp-header h3 {
    font-size: 6vw;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    color: #ffffff;
}

.exp-header p {
    font-size: 1.2rem;
    color: #a0a0a0;
}

.timeline-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 0;
}

.timeline-track {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
    /* Hidden ghost track */
}

/* The glowing line that gets physically drawn by JS scrolling */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    /* Default 0, controlled by JS interpolation */
    background: linear-gradient(to bottom, #d946ef, #4ade80);
    /* Magenta to Green tracking */
    box-shadow: 0 0 15px #d946ef, 0 0 30px #4ade80;
    transition: height 0.1s ease-out;
    /* Smooth tracking */
    will-change: height;
}

.timeline-node {
    position: relative;
    width: 50%;
    margin-bottom: 8rem;
}

.timeline-node:last-child {
    margin-bottom: 0;
}

.left-node {
    padding-right: 5rem;
    left: 0;
    text-align: right;
}

.right-node {
    padding-left: 5rem;
    left: 50%;
    text-align: left;
}

.node-dot {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #000;
    border: 2px solid #555;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.5s ease;
}

/* When the JS line crosses the dot, it lights up physically */
.node-dot.active {
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 20px #ffffff, 0 0 40px #4ade80;
    transform: translateY(-50%) scale(1.5);
}

.left-node .node-dot {
    right: -10px;
    /* Center on vertical rail */
}

.right-node .node-dot {
    left: -10px;
    /* Center on vertical rail */
}

.node-content {
    background: rgba(10, 10, 10, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    /* Glassmorphism on black */
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.node-content:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.exp-date {
    display: inline-block;
    color: #a0a0a0;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.node-content h4 {
    font-size: 2rem;
    color: #ffffff;
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.node-content h4 .company-name {
    color: #777777;
    font-weight: 300;
}

.node-content p {
    font-size: 1.1rem;
    color: #888;
    line-height: 1.6;
}

/* --- EDUCATION SECTION (Sticky Scroll Wipe) --- */
.edu-section {
    position: relative;
    height: 200vh; /* Delivers a full viewport of pure scroll traction to perform the wipe precisely */
    background: #000;
}

.edu-sticky {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden; 
}

.edu-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10vw;
}

/* BASE LAYER (IITB) - Always sits bolted completely static underneath */
.iitb-layer {
    background: #0a0a0a;
    z-index: 1;
}

/* WIPE OVERLAY LAYER (Monash) */
.monash-layer {
    background: #0d0d0d;
    z-index: 2;
    /* Physically hiding the card off perfectly to the right border */
    clip-path: inset(0 0 0 100%); 
    will-change: clip-path; /* Hint GPU render buffer ahead of time */
    border-left: 1px solid rgba(6, 182, 212, 0.4); /* Neon laser slice trailing the wipe */
}

.edu-content {
    max-width: 900px;
}

.edu-year {
    display: inline-block;
    color: #4ade80; /* Base color */
    font-family: monospace;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.monash-layer .edu-year {
    color: #06b6d4; /* Sync overlay brand */
}

.edu-layer h2 {
    font-family: var(--font-heading);
    font-size: 5vw;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.edu-layer h3 {
    font-size: 2rem;
    color: #dedede;
    margin-bottom: 2rem;
    font-family: monospace;
}

.edu-layer p {
    font-size: 1.2rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.edu-nodes {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    font-family: monospace;
    color: #ffffff;
    font-size: 1rem;
    background: rgba(255,255,255,0.05); /* subtle layout pill */
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
}

.node-divider {
    width: 6px; height: 6px;
    border-radius: 50%;
}

.iitb-layer .node-divider { background: #4ade80; }
.monash-layer .node-divider { background: #06b6d4; }


/* --- CONTACT SECTION (Classified Spotlight Terminal) --- */
.contact-section {
    height: 100vh;
    background: #000000;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    cursor: crosshair;
    /* Hacker aesthetic */
}

/* The magic spotlight layer bound directly to CSS variables updated by Javascript */
.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Visually cast a faint light ring from the mouse to guide usage */
    background: radial-gradient(circle 500px at var(--x, -1000px) var(--y, -1000px), rgba(255, 255, 255, 0.05), transparent 80%);
    pointer-events: none;
    z-index: 10;
}

.terminal-wrapper {
    position: relative;
    width: 100%;
    padding: 0 10vw;
    /* Spotlight mask: Changed to 0.85 opacity outside the ring to let content be faintly visible in the dark */
    -webkit-mask-image: radial-gradient(circle 450px at var(--x, 50%) var(--y, 50%), rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.1) 100%);
    mask-image: radial-gradient(circle 450px at var(--x, 50%) var(--y, 50%), rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.1) 100%);
}

.terminal-main-flex {
    display: flex;
    width: 100%;
    gap: 80px;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 1024px) {
    .terminal-main-flex {
        flex-direction: column-reverse;
        gap: 60px;
        align-items: flex-start;
    }
}

.terminal-text-side {
    flex: 1;
}

.terminal-profile {
    width: 45vw; /* Massively increased size */
    max-width: 900px; /* Prevent it from breaking 4k monitors */
    min-width: 320px; /* Still maintains standard size on small screens */
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    position: relative;
    backdrop-filter: blur(10px);
}

.profile-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(6, 182, 214, 0.3);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-overlay {
    display: none;
}

.profile-id-badge {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.id-tag {
    font-size: 0.75rem;
    color: #06b6d4;
    font-family: monospace;
    letter-spacing: 2px;
}

.id-name {
    font-size: 1.2rem;
    color: #ffffff;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    color: #4ade80;
    /* Secure green */
    font-family: monospace;
    letter-spacing: 2px;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 15px #4ade80;
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.terminal-text {
    font-size: 3vw;
    font-family: monospace;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    /* Neon blur */
}

.neon-cyan {
    color: #06b6d4;
    text-shadow: 0 0 30px #06b6d4;
}

.terminal-sub {
    font-size: 1.2rem;
    color: #888888;
    font-family: monospace;
    margin-bottom: 6rem;
    max-width: 600px;
    line-height: 1.6;
}

.terminal-btn {
    background: transparent;
    border: 1px solid #06b6d4;
    color: #06b6d4;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    font-family: monospace;
    letter-spacing: 2px;
}

.terminal-btn:hover {
    background: #06b6d4;
    color: #000000;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.8);
}

.magnetic-wrap {
    position: relative;
    z-index: 10;
}

.btn-magnetic {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    height: 90px;
    background: #ffffff;
    color: #000000;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s ease;
}

.btn-text {
    pointer-events: none;
    /* Let parent anchor compute the bounding mouse rect perfectly */
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-magnetic:hover {
    background: #e0e0e0;
}

.footer-bottom {
    position: absolute;
    bottom: 2rem;
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    font-size: 0.9rem;
    z-index: 5;
}

.socials {
    display: flex;
    gap: 2rem;
}

.socials a {
    color: #888;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.socials a:hover {
    color: #fff;
}

/* Responsiveness adjustments */
/* Responsiveness adjustments */
@media (max-width: 1024px) {
    .dashboard {
        padding: 1.5rem;
        height: auto;
    }

    /* Mobile Navbar Horizontal Scroll - Pinned to Top */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem 5vw;
        gap: 2rem;
        width: 100%;
        /* Hide scrollbar for a clean look */
        scrollbar-width: none;
    }
    
    .dashboard {
        padding-top: 80px !important; /* Offset for the fixed navbar */
    }
    
    .navbar::-webkit-scrollbar {
        display: none; /* Hide for true app-like feel */
    }

    .navbar a {
        font-size: 0.8rem; 
        white-space: nowrap; /* Prevent intra-word line breaks */
    }

    .background-text h1 {
        font-size: 14vw;
        letter-spacing: -1px;
        white-space: normal;
        /* Allow slight wrapping */
    }

    .content-layer {
        flex-direction: column;
        justify-content: flex-start;
        gap: 3rem;
        padding: 0;
        margin-top: -3vw;
    }

    .info-box,
    .scroll-box {
        text-align: center;
        align-items: center;
        justify-content: center;
        margin-top: 0;
    }
    
    .scroll-box {
        margin-top: 2rem;
        flex-direction: row; /* Make scroll indicator horizontal on mobile */
        gap: 1rem;
    }
    
    .scroll-text {
        writing-mode: horizontal-tb; /* Normal text flow */
        letter-spacing: 2px;
    }
    
    .scroll-line {
        width: 60px;
        height: 2px;
        margin-right: 0;
    }
    
    .scroll-dot {
        width: 30px;
        height: 100%;
        background: linear-gradient(to right, transparent, #06b6d4, #ffffff);
        top: 0; left: -100%;
        animation: scrollStreakHorizontal 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes scrollStreakHorizontal {
        0% { left: -50%; }
        100% { left: 150%; }
    }

    .avatar {
        max-width: 80vw;
        margin: 0 auto;
    }

    /* Mobile projects fallback */
    .projects-section {
        height: auto;
    }

    .sticky-wrapper {
        position: relative;
        height: auto;
        padding: 6rem 0;
        align-items: flex-start; /* FIX: Prevents top from being chopped off vertically */
    }

    .horizontal-scroll {
        flex-direction: column;
        padding: 0 2rem;
        gap: 5rem;
        width: 100%;
        min-width: 100%;
        transform: none !important;
        /* override JS transforms */
    }

    .projects-title {
        width: 100%;
    }

    .project-card {
        width: 100%;
    }

    .projects-title h3 {
        font-size: 12vw;
    }

    /* Mobile Publications Settings */
    .pub-card {
        height: auto;
        min-height: 40vh;
        padding: 3rem 2rem;
        position: relative !important; /* CRITICAL: Disable sticky stacking on mobile */
        top: auto !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Keep isolated shadows */
        margin-bottom: 2rem;
    }

    .pub-card h4 {
        font-size: 8vw;
    }

    .pub-desc {
        font-size: 1rem;
        max-width: 100%;
    }

    .pub-cards-container {
        gap: 2rem;
        padding-bottom: 2rem;
    }

    /* Mobile Hobbies Overrides */
    .film-strip-tilt {
        transform: rotate(-3deg) scale(1.05);
        /* Less extreme tilt on small screens */
        padding: 2rem 0;
    }

    .film-frame {
        width: 75vw;
        /* Make cards physically larger to be legible on mobile */
        padding: 1rem 1rem 3.5rem 1rem;
    }

    /* Mobile Overrides for new sections */
    .timeline-track {
        left: 20px;
        /* Move track to far left so it doesn't cross text */
    }

    .timeline-node {
        width: 100%;
        padding-left: 60px !important;
        /* give space for track */
        padding-right: 0 !important;
        left: 0 !important;
        text-align: left !important;
    }

    .left-node .node-dot,
    .right-node .node-dot {
        left: 10px;
        /* Lock dots to new track */
        right: auto;
    }

    .edu-layer h2 {
        font-size: 9vw; /* Retain punchy header sizing */
    }
    .edu-layer h3 {
        font-size: 1.2rem;
    }
    .edu-content {
        padding-top: 2rem; /* Fix horizontal padding shifts on phone */
    }

    .terminal-wrapper {
        align-items: center;
        text-align: center;
    }

    .terminal-text {
        font-size: 10vw;
        /* Keep text huge on mobile viewport */
    }

    .terminal-sub {
        font-size: 1rem;
    }

    .contact-section {
        height: auto;
        min-height: 100vh;
        padding: 6rem 0 2rem 0; /* Add padding to prevent tight layout */
    }

    /* Expand spotlight dramatically strictly on mobile to retain usability via touch bounds */
    .contact-section::before {
        background: radial-gradient(circle 800px at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.05), transparent 80%);
    }

    .terminal-wrapper {
        padding: 4rem 10vw;
        -webkit-mask-image: radial-gradient(circle 800px at var(--x, 50%) var(--y, 50%), rgba(0, 0, 0, 1) 40%, rgba(0,0,0, 0.3) 100%);
        mask-image: radial-gradient(circle 800px at var(--x, 50%) var(--y, 50%), rgba(0, 0, 0, 1) 40%, rgba(0,0,0, 0.3) 100%);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Deep Mobile Overrides (Phones & Small Tablets) */
@media (max-width: 768px) {
    .dashboard {
        padding: 1rem;
    }
    
    .background-text h1 {
        font-size: 18vw; 
        margin-top: 2rem;
    }
    
    .content-layer {
        margin-top: 2rem;
        gap: 2rem;
    }
    
    /* Flat Project Cards (Disable 3D Hover on Mobile) */
    .project-card {
        aspect-ratio: auto;
        min-height: auto;
        height: auto;
        width: 100%;
        perspective: none !important;
    }
    
    .project-card-inner {
        transform: none !important; /* Disable hover flip CSS totally */
        display: flex;
        flex-direction: column;
        height: auto;
    }
    
    .project-card-front, .project-card-back {
        position: relative;
        height: auto;
        transform: none !important;
        -webkit-backface-visibility: visible;
        backface-visibility: visible;
    }
    
    .project-card-front {
        min-height: 40vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    .project-card-back {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: none;
        padding: 3rem 2rem;
    }

    .front-overlay h4 {
        font-size: 1.8rem;
    }

    /* Edu Nodes Wrapping */
    .edu-nodes {
        flex-wrap: wrap;
        padding: 1rem;
        justify-content: center;
        text-align: center;
        border-radius: 20px;
    }

    /* Clean Contact UI on Mobile: Hide Terminal Text block */
    .terminal-header,
    .terminal-text,
    .terminal-sub {
        display: none !important;
    }

    /* Terminal Profile Card Full Width */
    .terminal-profile {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        margin-bottom: 2rem;
    }
    
    .terminal-main-flex {
        gap: 0;
    }

    .magnetic-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 3rem 0; /* Huge visual breathing room to center it physically in the gap */
    }

    /* Override the massive desktop button dimensions specifically */
    .btn-magnetic.terminal-btn {
        width: 80% !important;
        max-width: 250px !important;
        height: 60px !important;
        font-size: 1.1rem !important;
        border-radius: 30px !important;
        margin: 0 auto;
    }

    /* Timeline spacing adjustments */
    .node-content {
        padding: 2rem 1.5rem;
    }
    
    .node-content h4 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
}