:root {
    --color-bg-hero: #0a192f;
    --color-accent-blue: #0070f3;
    --color-text: #ffffff;
    --font-main: 'Unbounded', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: #000;
    color: var(--color-text);
    overflow-x: hidden;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 400vh;
    /* Increased scroll space for smoother sequence */
    width: 100%;
    margin-bottom: -1px;
}

.hero-sticky-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--color-bg-hero);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transform-origin: center center;
    will-change: transform;
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

/* Slide Typography */
.hero-title {
    font-size: 5vw;
    /* Reduced from 8vw */
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.hero-subtitle {
    font-size: 2.5vw;
    /* Reduced from 4vw */
    font-weight: 600;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
}

.hero-text-small {
    font-size: 1.2vw;
    font-weight: 400;
    margin-top: 1rem;
    opacity: 0.7;
}

/* Slide 4 Layout */
#slide-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.keywords-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.keyword {
    font-size: 1.2vw;
    /* Reduced from 2.5vw */
    font-weight: 500;
    padding: 0.8em 1.6em;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.keyword:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05) translateY(0);
}

.hero-slide.active .keyword {
    opacity: 1;
    transform: translateY(0);
}

.hero-slide.active .keyword:hover {
    transform: scale(1.05);
}

/* Staggered animation delays for keywords */
.hero-slide.active .keyword:nth-child(1) {
    transition-delay: 0.1s;
}

.hero-slide.active .keyword:nth-child(2) {
    transition-delay: 0.2s;
}

.hero-slide.active .keyword:nth-child(3) {
    transition-delay: 0.3s;
}

.hero-slide.active .keyword:nth-child(4) {
    transition-delay: 0.4s;
}

.sparkle-icon {
    width: 3.5vw;
    /* Reduced from 6vw */
    height: auto;
    animation: rotateAndPulse 4s infinite ease-in-out;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.scroll-icon {
    width: 24px;
    height: auto;
    animation: bounce 2s infinite;
}

.scroll-indicator.hide {
    opacity: 0;
    pointer-events: none;
}

/* Animations */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes rotateAndPulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.1) rotate(10deg);
        opacity: 0.8;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 15vw;
    }

    .hero-subtitle {
        font-size: 8vw;
    }

    .keyword {
        font-size: 5vw;
    }
}

/* --- Marquee Section --- */
.marquee-section {
    position: relative;
    background-color: #0B0B0B;
    padding: 100px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 5;
}

.marquee-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(0, 79, 226, 0.4) 0%, rgba(39, 145, 231, 0.2) 40%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    will-change: transform;
}

.marquee-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.marquee-bg {
    width: 100%;
    height: 130%;
    /* Taller for parallax movement */
    object-fit: cover;
    opacity: 0.8;
    transform: translateY(0);
    will-change: transform;
    margin-top: -15%;
    /* Center the overflow */
}

.marquee-container {
    position: relative;
    z-index: 2;
    width: 100%;
    background: transparent;
    display: flex;
    overflow: hidden;
    /* Clip everything outside */
}

.marquee-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 4rem;
    /* Gap between text items */
    width: max-content;
    will-change: transform;
    padding-left: 100vw;
    /* Start off-screen or allow smooth entry */
}

/* Remove old img styles & sparkle styles */
.star-icon {
    width: 3rem;
    /* Adjust to match text size */
    height: auto;
    vertical-align: middle;
}

.marquee-item {
    font-family: 'Unbounded', sans-serif;
    font-size: 5rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3rem;
    /* Increase gap for the icon */
    text-transform: uppercase;
}

/* --- Who Am I Section (Final Pixel Perfect) --- */
.whoami-section {
    position: relative;
    background-color: #030303;
    /* Added background stars */
    background-image: url('backgroundstars.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    padding: 120px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    color: #fff;
    z-index: 5;
}

.whoami-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 1. Background Decorations (Blue Flowers) */
.whoami-glow {
    position: absolute;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(35, 136, 255, 0.15), transparent 60%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    top: 10%;
    left: -20%;
    opacity: 0.6;
}

/* Layout Grid */
.whoami-layout {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    position: relative;
    padding-left: 3rem;
    /* Add space for the line */
}

/* Vertical Line */
.whoami-layout::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 11px;
    /* Center of 24px container width (-1px for line width/2) => 12px - 0.5px = 11.5px. 11px is close. */
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 0;
}

/* Section Separator (Star) */
.section-separator {
    display: flex;
    justify-content: flex-start;
    padding-left: 0;
    opacity: 1;
    margin: -1.75rem 0;
    /* Align vertically with the line flow */
    position: relative;
    z-index: 1;
    /* Above the line */
    transform: none;
    margin-left: -3rem;
    /* Pull back into the padding area to align with line */
}

/* Typography */
.subsection-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 2.8rem;
    /* Reduced from 3.5rem to match visual hierarchy better if requested "smaller" */
    font-weight: 500;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* 1. About Me */
.about-me-block {
    max-width: 1000px;
}

/* Special Case: About Me title stays large? User said "make word Profession and Work smaller". 
   Usually "About me" is the same hierarchy. I will apply smaller size to .subsection-title which affects all. 
   If About Me needs to remain large, I would separate them, but "About me being larger" wasn't specified, just P and W smaller.
   Let's keep About Me large if originally intended, but the user implies "Profession and Work" specifically.
   Actually, usually these headers are consistent. I'll make .subsection-title 2.5rem - 2.8rem range. */

.about-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #cbd5e1;
    font-weight: 300;
    opacity: 0.9;
    max-width: 900px;
}

/* 2. Profession Grid */
.profession-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.prof-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.prof-card.full-width {
    grid-column: span 2;
    padding: 2.5rem 2rem;
    justify-content: center;
}

.prof-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.prof-header h4 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0;
    color: #fff;
}

.year-text {
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2388FF;
}

.prof-card p {
    font-family: 'Unbounded', sans-serif;
    /* Changed to Unbounded as requested */
    font-size: 0.9rem;
    /* Slightly smaller for Unbounded as it can be wide */
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
    font-weight: 300;
}

/* 3. Work Section */
.work-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.work-text {
    font-family: 'Unbounded', sans-serif;
    /* Changed to Unbounded as requested */
    font-size: 1.4rem;
    color: #fff;
    line-height: 1.5;
    font-weight: 300;
    /* Lighter weight for Unbounded body often looks better */
    max-width: 85%;
}

.highlight-blue {
    color: #2388FF;
    font-weight: 500;
}

.work-arrow-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.work-arrow {
    width: 60px;
    /* Increased size slightly to balance font */
    height: 60px;
    stroke: #fff;
    transition: transform 0.3s ease;
}

.work-card:hover {
    border-color: rgba(35, 136, 255, 0.5);
}

.work-card:hover .work-arrow {
    stroke: #2388FF;
    transform: translate(5px, -5px);
}

/* Animation Entrance */
.whoami-layout>div,
.whoami-layout>.section-separator {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.whoami-section.active .whoami-layout>div,
.whoami-section.active .whoami-layout>.section-separator {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delays */
.whoami-section.active .whoami-layout>*:nth-child(1) {
    transition-delay: 0s;
}

/* About */
.whoami-section.active .whoami-layout>*:nth-child(2) {
    transition-delay: 0.1s;
}

/* Star */
.whoami-section.active .whoami-layout>*:nth-child(3) {
    transition-delay: 0.2s;
}

/* Profession */
.whoami-section.active .whoami-layout>*:nth-child(4) {
    transition-delay: 0.3s;
}

/* Star */
.whoami-section.active .whoami-layout>*:nth-child(5) {
    transition-delay: 0.4s;
}

/* Work */

/* Responsive */
@media (max-width: 900px) {
    .subsection-title {
        font-size: 2.2rem;
    }

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

    .prof-card.full-width {
        grid-column: span 1;
    }

    .work-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .work-arrow-container {
        align-self: flex-end;
    }

    .work-text {
        font-size: 1.1rem;
        max-width: 100%;
    }
}

/* --- Stack Section --- */
.stack-section {
    background-color: #030303;
    padding: 100px 0;
    position: relative;
    z-index: 5;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.stack-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

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

.section-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: #fff;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* WIDER cards */
    gap: 1.5rem;
    width: 100%;
}

.stack-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    /* Slightly more rounded */
    padding: 2.5rem;
    /* More breathing room */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: default;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Subtle glow effect on top border */
.stack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0.5;
}

.stack-card:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(35, 136, 255, 0.4);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.stack-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.5rem;
    /* Larger title */
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stack-desc {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
    font-weight: 300;
}

/* --- Contact Section --- */
.contact-section {
    background-color: #030303;
    padding: 120px 0 60px;
    position: relative;
    z-index: 5;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    align-items: center;
    text-align: center;
}

.contact-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    /* Responsive huge text */
    font-weight: 700;
    color: #fff;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin: 0;
    text-transform: uppercase;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-link {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.contact-link:hover {
    color: #2388FF;
    border-color: #2388FF;
}

.footer-bottom {
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    width: 100%;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 300;
}

/* Responsive Adjustments for new sections */
@media (max-width: 768px) {
    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-link {
        font-size: 1.1rem;
    }
}

/* Animation Classes */
.stack-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.stack-section.active {
    opacity: 1;
    transform: translateY(0);
}

.stack-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Staggered transition delays for cards */
.stack-section.active .stack-card:nth-child(1) {
    transition-delay: 0.1s;
}

.stack-section.active .stack-card:nth-child(2) {
    transition-delay: 0.2s;
}

.stack-section.active .stack-card:nth-child(3) {
    transition-delay: 0.3s;
}

.stack-section.active .stack-card:nth-child(4) {
    transition-delay: 0.4s;
}

.stack-section.active .stack-card:nth-child(5) {
    transition-delay: 0.5s;
}

.stack-section.active .stack-card:nth-child(6) {
    transition-delay: 0.6s;
}

.stack-section.active .stack-card {
    opacity: 1;
    transform: translateY(0);
}

.contact-section .contact-title {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-section.active .contact-title {
    opacity: 1;
    transform: scale(1);
}

.contact-section .contact-links {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.3s;
}

.contact-section.active .contact-links {
    opacity: 1;
    transform: translateY(0);
}

/* --- Custom Cursor --- */
body {
    cursor: none;
    /* Hide default cursor */
}

a,
button,
.clickable {
    cursor: none;
    /* Ensure it stays hidden on interactive elements */
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
    /* Slight lag for smoothness */
    mix-blend-mode: difference;
    /* Optional: makes it visible on light backgrounds */
}

/* Hover state for links */
body.hovering .custom-cursor {
    transform: translate(-50%, -50%) scale(1.5);
    /* Scale up on hover */
}

/* Fix for Hero Section (White cursor, no blend mode) */
.custom-cursor.on-hero {
    mix-blend-mode: normal !important;
}

.custom-cursor.on-hero path {
    fill: white !important;
}