/* ========================================
   CSS Variables & Design Tokens
   ======================================== */
:root {
    /* Colors - Warm, analog palette (Dark Mode) */
    --color-bg: #1a1816;
    --color-bg-warm: #1e1b19;
    --color-surface: #252220;
    --color-surface-elevated: #2d2a27;

    --color-text: #f5f0e8;
    --color-text-muted: #a69f94;
    --color-text-subtle: #6b6560;

    --color-accent-primary: #5fb5b5;
    --color-accent-secondary: #e07b53;
    --color-accent-tertiary: #7eb8c9;
    --color-accent-pink: #d4829c;
    --color-accent-purple: #9b7ec4;

    /* Confetti colors */
    --confetti-yellow: #f4d35e;
    --confetti-orange: #ee964b;
    --confetti-red: #e85d5d;
    --confetti-pink: #e889b8;
    --confetti-purple: #b088f9;
    --confetti-blue: #72c4d8;
    --confetti-green: #8bd49c;
    --confetti-white: #f5f0e8;

    /* Typography */
    --font-serif: 'Google Sans Flex', sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 150ms var(--ease-out-expo);
    --transition-medium: 300ms var(--ease-out-expo);
    --transition-slow: 600ms var(--ease-out-expo);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* Light Mode - Warm paper/cream tones */
[data-theme="light"] {
    --color-bg: #f5f0e6;
    --color-bg-warm: #ebe5d9;
    --color-surface: #ffffff;
    --color-surface-elevated: #e8e2d6;

    --color-text: #2a2520;
    --color-text-muted: #5c564d;
    --color-text-subtle: #8a8378;

    --color-accent-primary: #3d9999;
    --color-accent-secondary: #c56a42;
    --color-accent-tertiary: #4a9ab5;
    --color-accent-pink: #b86a84;
    --color-accent-purple: #7a5fa8;

    /* Confetti colors - slightly more saturated for light bg */
    --confetti-yellow: #d4b82e;
    --confetti-orange: #d4753a;
    --confetti-red: #c94545;
    --confetti-pink: #c96b98;
    --confetti-purple: #8f6fd9;
    --confetti-blue: #4a9ab5;
    --confetti-green: #5ea86d;
    --confetti-white: #2a2520;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    cursor: none;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Custom cursor */
@media (hover: hover) {
    body {
        cursor: none;
    }
}

/* Selection styling */
::selection {
    background: var(--color-accent-primary);
    color: var(--color-bg);
}

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

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   Canvas Layers
   ======================================== */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

#ambient-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* ========================================
   Film Grain Overlay
   ======================================== */
.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -10%);
    }

    20% {
        transform: translate(-15%, 5%);
    }

    30% {
        transform: translate(7%, -25%);
    }

    40% {
        transform: translate(-5%, 25%);
    }

    50% {
        transform: translate(-15%, 10%);
    }

    60% {
        transform: translate(15%, 0%);
    }

    70% {
        transform: translate(0%, 15%);
    }

    80% {
        transform: translate(3%, 35%);
    }

    90% {
        transform: translate(-10%, 10%);
    }
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    z-index: 100;
    background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
}

.logo-text {
    color: var(--color-accent-primary);
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

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

    50% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent-primary);
    transition: var(--transition-medium);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--color-surface-elevated);
    border-radius: var(--radius-full);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--color-accent-primary);
    transform: rotate(15deg);
}

.theme-icon {
    font-size: 1.2rem;
    position: absolute;
    transition: var(--transition-medium);
}

.theme-icon.sun {
    opacity: 0;
    transform: translateY(20px) rotate(-90deg);
    color: var(--color-accent-primary);
}

.theme-icon.moon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
    color: var(--color-accent-primary);
}

[data-theme="light"] .theme-icon.sun {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

[data-theme="light"] .theme-icon.moon {
    opacity: 0;
    transform: translateY(-20px) rotate(90deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-xl);
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-2xl);
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

/* Portrait on the right */
.portrait-wrapper {
    order: 2;
}

.bio-content {
    order: 1;
}

/* Portrait Area */
.portrait-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.portrait-frame {
    width: 280px;
    height: 350px;
    background: var(--color-surface);
    border: 2px solid var(--color-surface-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 60px rgba(255, 255, 255, 0.02);
    transition: var(--transition-slow);
}

.portrait-frame:hover {
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(255, 255, 255, 0.04);
}

/* 3D Portrait Canvas */
#portrait-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.portrait-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg,
            var(--color-surface) 0%,
            var(--color-surface-elevated) 100%);
    transition: opacity 0.5s ease;
}

.portrait-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg,
            var(--color-surface) 0%,
            var(--color-surface-elevated) 100%);
}

.portrait-icon {
    font-size: 3rem;
    color: var(--color-accent-primary);
    margin-bottom: var(--space-md);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

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

    50% {
        transform: translateY(-10px);
    }
}

.portrait-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-subtle);
}

/* Portrait Decorations */
.portrait-decoration {
    position: absolute;
    border-radius: var(--radius-full);
    pointer-events: none;
}

.decoration-1 {
    width: 8px;
    height: 8px;
    background: var(--color-accent-primary);
    top: -20px;
    right: 40px;
    animation: orbit 8s linear infinite;
}

.decoration-2 {
    width: 6px;
    height: 6px;
    background: var(--color-accent-pink);
    bottom: 30px;
    left: -15px;
    animation: orbit 12s linear infinite reverse;
}

.decoration-3 {
    width: 4px;
    height: 4px;
    background: var(--color-accent-tertiary);
    top: 60px;
    right: -10px;
    animation: orbit 6s linear infinite;
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(10px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(10px) rotate(-360deg);
    }
}

/* Flashlight Toggle Button */
.flashlight-toggle {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: rgba(232, 197, 71, 0.1);
    border: 1px solid rgba(232, 197, 71, 0.3);
    color: var(--color-accent-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    /* Hidden in light mode by default */
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

/* Enable pointer events in dark mode, but keep hidden until animation */
html:not([data-theme="light"]) .flashlight-toggle {
    pointer-events: auto;
}

/* Visible state (set by animation or when active) */
.flashlight-toggle.visible {
    opacity: 1;
}

.flashlight-toggle:hover {
    background: rgba(232, 197, 71, 0.2);
    border-color: rgba(232, 197, 71, 0.6);
    transform: translateX(-50%) scale(1.1);
}

/* Active state when flashlight is on */
.flashlight-toggle.active {
    background: rgba(232, 197, 71, 0.3);
    border-color: rgba(232, 197, 71, 0.8);
    box-shadow: 0 0 20px rgba(232, 197, 71, 0.3);
}

.flashlight-toggle.active:hover {
    transform: translateX(-50%) scale(1.1);
}

.flashlight-icon {
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(232, 197, 71, 0.5));
}

/* Pop-up animation for button entrance */
@keyframes flashlightPopUp {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }

    50% {
        transform: translateX(-50%) translateY(-5px) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.flashlight-toggle.pop-up {
    animation: flashlightPopUp var(--popup-duration, 400ms) cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Bio Content */
.bio-content {
    max-width: 600px;
}

.bio-header {
    margin-bottom: var(--space-lg);
}

.tagline {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent-primary);
    margin-bottom: var(--space-sm);
    position: relative;
    padding-left: var(--space-lg);
}

.tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 20px;
    height: 1px;
    background: var(--color-accent-primary);
}

.name {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    font-size: 0.9rem;
}

.role-tag {
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.role-tag:hover {
    color: var(--color-accent-secondary);
}

.role-divider {
    color: var(--color-text-subtle);
}

.bio-text {
    margin-bottom: var(--space-xl);
}

.bio-text p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
}

.bio-text em {
    color: var(--color-text);
    font-style: italic;
    font-family: var(--font-serif);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-icon {
    font-size: 1rem;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--color-accent-primary);
    color: var(--color-bg);
    border: none;
}

.btn-primary:hover {
    background: var(--color-accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 197, 71, 0.2);
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-surface-elevated);
}

.btn-secondary:hover {
    border-color: var(--color-accent-tertiary);
    color: var(--color-accent-tertiary);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: none;
    padding-left: 0;
}

.btn-ghost:hover {
    color: var(--color-text);
}

.btn-ghost:hover .btn-icon {
    transform: rotate(15deg);
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent-tertiary);
    border-radius: var(--radius-full);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.status-text {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    font-style: italic;
    font-family: var(--font-serif);
}

/* Hero Decorations */
.hero-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.deco-line {
    position: absolute;
    background: linear-gradient(90deg,
            transparent,
            var(--color-surface-elevated),
            transparent);
    height: 1px;
}

.line-1 {
    top: 20%;
    left: 0;
    right: 0;
    opacity: 0.3;
}

.line-2 {
    bottom: 30%;
    left: 0;
    right: 0;
    opacity: 0.2;
}

.deco-circle {
    position: absolute;
    border: 1px solid var(--color-surface-elevated);
    border-radius: var(--radius-full);
    opacity: 0.2;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.deco-star {
    position: absolute;
    font-size: 1rem;
    color: var(--color-accent-primary);
    opacity: 0.4;
    animation: twinkle 4s ease-in-out infinite;
}

.star-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 40%;
    right: 15%;
    animation-delay: 1.5s;
}

.star-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 3s;
}

/* ========================================
   Sections Common Styles
   ======================================== */
section {
    padding: var(--space-2xl) var(--space-xl);
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-number {
    display: block;
    font-size: 0.75rem;
    color: var(--color-accent-primary);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   Projects Section
   ======================================== */
/* ========================================
   Projects Section
   ======================================== */
.projects-section {
    background: var(--color-bg-warm);
}

.projects-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs) 0;
    position: relative;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
    color: var(--color-text);
}

.filter-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.filter-btn.active {
    color: var(--color-text);
}

.filter-btn.active::after {
    transform: scaleX(1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden !important;
    transition: var(--transition-medium);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg,
            var(--color-surface-elevated) 0%,
            var(--color-surface) 100%);
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    transform: none !important;
    transition: none !important;
    pointer-events: none;
}

.project-image::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--color-text-subtle);
    opacity: 0.3;
}

.project-info {
    padding: var(--space-lg);
}

.project-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-primary);
}

.project-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    margin: var(--space-sm) 0;
}

.project-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ========================================
   Research Section
   ======================================== */
.research-section {
    min-height: 50vh;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    background: var(--color-bg-warm);
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.contact-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid transparent;
    transition: var(--transition-fast);
}

.contact-link:hover {
    color: var(--color-accent-primary);
    border-bottom-color: var(--color-accent-primary);
}

/* ========================================
   Footer
   ======================================== */
.main-footer {
    padding: var(--space-xl);
    text-align: center;
    border-top: 1px solid var(--color-surface);
}

.footer-text {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

    .portrait-wrapper {
        order: -1;
    }

    .bio-content {
        order: 0;
    }

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

    .tagline {
        padding-left: 0;
    }

    .tagline::before {
        display: none;
    }

    .subtitle {
        justify-content: center;
    }

    .cta-buttons {
        justify-content: center;
    }

    .status-indicator {
        justify-content: center;
    }

    .main-nav {
        padding: var(--space-md);
    }

    .nav-links {
        gap: var(--space-md);
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
    }

    section {
        padding: var(--space-xl) var(--space-md);
    }

    .portrait-frame {
        width: 220px;
        height: 280px;
    }
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.loader-symbol {
    font-size: 3rem;
    color: var(--color-accent-primary);
    animation: loaderPulse 1.5s ease-in-out infinite;
    margin-bottom: var(--space-lg);
}

@keyframes loaderPulse {

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

    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.6;
    }
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
    animation: loaderProgress 2s ease-out forwards;
}

@keyframes loaderProgress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

/* ========================================
   Typewriter Effect
   ======================================== */
.typewriter {
    display: inline;
}

.cursor-blink {
    display: inline;
    color: var(--color-accent-primary);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ========================================
   Enhanced Hover & Focus Effects
   ======================================== */
.project-card {
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    opacity: 0;
    background: linear-gradient(135deg,
            var(--color-accent-primary) 0%,
            var(--color-accent-secondary) 50%,
            var(--color-accent-tertiary) 100%);
    z-index: -1;
    transition: var(--transition-medium);
    filter: blur(20px);
}

.project-card:hover::before {
    opacity: 0.15;
}

.project-image {
    transition: var(--transition-slow);
}

.project-card:hover .project-image {
    background: linear-gradient(135deg,
            var(--color-accent-primary) 0%,
            var(--color-accent-secondary) 100%);
}

.project-card:hover .project-image::after {
    opacity: 0;
}

/* Link underline animation */
.bio-text a {
    position: relative;
    color: var(--color-accent-primary);
}

.bio-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: var(--transition-medium);
}

.bio-text a:hover::after {
    width: 100%;
}

/* Magnetic button effect placeholder */
.btn {
    transform-origin: center;
}

/* Portrait parallax-like effect */
.portrait-frame {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Glowing accent on buttons */
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    background: var(--color-accent-primary);
    filter: blur(15px);
    opacity: 0;
    z-index: -1;
    transition: var(--transition-medium);
}

.btn-primary:hover::after {
    opacity: 0.4;
}

/* Stagger animation for project cards */
.projects-grid .project-card:nth-child(1) {
    transition-delay: 0s;
}

.projects-grid .project-card:nth-child(2) {
    transition-delay: 0.1s;
}

.projects-grid .project-card:nth-child(3) {
    transition-delay: 0.2s;
}

/* Contact link hover effects */
.contact-link {
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-accent-primary);
    transform: translateY(100%);
    transition: var(--transition-medium);
    z-index: -1;
}

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

.contact-link:hover::before {
    transform: translateY(0);
}