/* ==========================================================================
   Premium Dark Theme Tokens
   ========================================================================== */
:root {
    /* Colors */
    --bg-color: #0c0c0c;
    --surface-color: #161618;
    --surface-light: #202022;
    --text-primary: #F0F0F0;
    --text-secondary: #9E9E9E;
    --text-muted: #555555;

    --accent-color: #FF5520;
    /* Vibrant Orange/Red */
    --accent-hover: #E04210;

    --border-color: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 64px;
    --space-xl: 120px;
    --space-xxl: 200px;

    /* Layout */
    --container-max: 1440px;
    --container-px: 6vw;
    --header-height: 100px;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;
}

/* ==========================================================================
   Reset & Global Setup
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial;
    /* Handled by GSAP if needed, but keep css smooth scroll off for custom scroll logic */
    font-size: 16px;
}

/* Hide cursor contextually if custom cursor works */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    a,
    button,
    .magnetic {
        cursor: none;
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    background: none;
    border: none;
    font-family: inherit;
    color: inherit;
}

/* ==========================================================================
   Aesthetic Elements (Noise & Cursor)
   ========================================================================== */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.cursor-dot,
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Hover States for cursor */
body.hovering .cursor-dot {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

body.hovering .cursor-follower {
    width: 60px;
    height: 60px;
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    mix-blend-mode: difference;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.accent {
    color: var(--accent-color);
}

.accent-dot {
    color: var(--accent-color);
    display: inline-block;
}

.hero__title {
    font-size: clamp(3.5rem, 10vw, 9rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 0.95;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.04em;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: var(--space-xl);
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.section-padding {
    padding: var(--space-xxl) 0;
}

.reveal-mask {
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 var(--container-px);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    display: inline-block;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.hover-reveal {
    position: relative;
    padding: 5px 0;
    overflow: hidden;
    display: inline-block;
}

.hover-reveal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.hover-reveal:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    height: 54px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.btn.--cta {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: none;
}

.btn.--large {
    height: 70px;
    padding: 0 48px;
    font-size: 1.125rem;
}

.btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
    border-radius: var(--radius-pill);
    z-index: 0;
}

.btn-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease;
}

.btn:hover .btn-bg {
    transform: translateY(0);
}

.btn:hover .btn-text {
    color: var(--text-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
}

.hero__container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.hero__subtitle {
    font-family: var(--font-heading);
    letter-spacing: 0.15em;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    display: block;
}

.hero__title-line {
    display: block;
}

.hero__description {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    max-width: 700px;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-primary);
    border-radius: 12px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 2px;
    animation: scroll 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 12px);
        opacity: 0;
    }
}

/* ==========================================================================
   Marquee Banner
   ========================================================================== */
.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--surface-color);
    transform: rotate(-2deg) scale(1.05);
    margin: var(--space-xl) 0;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.marquee-content span {
    display: inline-block;
}

.separator {
    color: var(--accent-color);
    margin: 0 40px;
    font-size: 1rem;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Project Showcase (List/Row style)
   ========================================================================== */
.project-showcase {
    display: flex;
    flex-direction: column;
    gap: var(--space-xxl);
}

.project-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 1024px) {
    .project-row {
        grid-template-columns: 5fr 7fr;
    }

    .project-row.reverse .project-row__info {
        order: 2;
    }

    .project-row.reverse .project-row__image-wrap {
        order: 1;
    }
}

.project-row__number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 300;
    display: block;
    margin-bottom: var(--space-sm);
    border-bottom: 2px solid var(--accent-color);
    width: 50px;
    padding-bottom: 10px;
}

.project-row__title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: var(--space-md);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: var(--space-md);
}

.tag {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-row__desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.view-project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.125rem;
    color: var(--text-primary);
    position: relative;
}

.view-project-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.view-project-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.project-row__image-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
}

.placeholder-pattern {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Abstract CSS shapes for placeholders */
.abstract-shape {
    position: absolute;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.shape-1 {
    border-radius: 20px;
    transform: rotate(15deg);
}

.shape-2 {
    border-radius: 50%;
    width: 50%;
    height: 70%;
    transform: rotate(-20deg);
}

.shape-3 {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* ==========================================================================
   Education & Timeline
   ========================================================================== */
.dual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .dual-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xxl);
    }
}

.timeline {
    border-left: 1px solid var(--border-color);
    padding-left: var(--space-md);
    position: relative;
}

.timeline-item {
    margin-bottom: var(--space-lg);
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: calc(var(--space-md) * -1 - 6px);
    top: 6px;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-color);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    color: var(--accent-color);
    margin-bottom: 8px;
    display: block;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.timeline-subtitle {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

.skills-category {
    margin-bottom: var(--space-lg);
}

.skills-category h4 {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    font-size: 0.875rem;
    padding: 10px 20px;
    background-color: var(--surface-color);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--surface-light);
    border-color: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--surface-color);
    padding-top: var(--space-xxl);
    padding-bottom: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.footer__top {
    margin-bottom: var(--space-xxl);
}

.footer__title {
    font-size: clamp(3rem, 8vw, 7rem);
    margin-bottom: var(--space-lg);
    line-height: 1;
}

.mega-link {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-underline-offset: 8px;
    display: inline-block;
    transition: color 0.3s ease;
}

.mega-link:hover {
    color: var(--accent-color);
}

.footer__bottom {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-md);
}

@media (min-width: 768px) {
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer__socials {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.footer__credits {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: right;
}

.footer__credits .time {
    color: var(--text-muted);
}
.lang-toggle { font-family: var(--font-heading); font-weight: 500; font-size: 0.875rem; color: var(--text-primary); border: 1px solid var(--border-color); border-radius: var(--radius-pill); padding: 6px 14px; background: rgba(255, 255, 255, 0.05); transition: all 0.3s ease; }
.lang-toggle:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--text-primary); }
