:root {
    /* Colors */
    --bg-color: #0d0d0d;
    --text-primary: #e5e5e5;
    --text-secondary: #a1a1aa;
    --accent-color: #ffffff;
    --link-hover: #ffffff;
    --border-color: #333333;
    --glow-color-1: rgba(120, 119, 198, 0.12);
    --glow-color-2: rgba(120, 119, 198, 0.08);
    --glass-bg: rgba(10, 10, 10, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --fade-alpha: 1;

    /* Typography */
    --font-display: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Font sizes */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --text-4xl: 40px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
}

body[data-theme="light"] {
    --bg-color: #fafafa;
    --text-primary: #171717;
    --text-secondary: #52525b;
    --accent-color: #000000;
    --link-hover: #000000;
    --border-color: #e5e5e5;
    --glow-color-1: rgba(99, 102, 241, 0.15);
    --glow-color-2: rgba(56, 189, 248, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: rgba(0, 0, 0, 0.05);
    --fade-alpha: 1;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-display);
    line-height: 1.6;
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ========================================
   FLOW FIELD CANVAS
   ======================================== */
#flowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   BACKGROUND GLOW EFFECTS
   ======================================== */
.glow-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-color-1) 0%, transparent 60%);
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
    animation: drift 20s ease-in-out infinite alternate;
}

.glow-bg-2 {
    top: auto;
    bottom: -10%;
    left: auto;
    right: -10%;
    background: radial-gradient(circle, var(--glow-color-2) 0%, transparent 60%);
    animation: drift 25s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 30px);
    }
}

/* ========================================
   MAIN CONTENT CONTAINER
   ======================================== */
.container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 60px auto;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    gap: var(--space-8);

    /* Glassmorphism Effect */
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

/* ========================================
   SITE HEADER
   ======================================== */
.site-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    position: relative;
}

.theme-toggle-fixed {
    position: absolute;
    top: 0;
    right: 0;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.theme-toggle-fixed:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--link-hover);
    color: var(--link-hover);
}

/* ========================================
   PAGE HEADER (for projects.html)
   ======================================== */
.page-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
    position: relative;
}

.back-link {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

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

.page-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-2);
}

.page-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.site-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-2);
    animation: fadeInUp 0.8s ease forwards;
}

.site-tagline {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SOCIAL LINKS
   ======================================== */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.social-links a {
    position: relative;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--border-color);
}

.social-links a:hover {
    text-decoration-color: var(--link-hover);
}

/* ========================================
   LINKS
   ======================================== */
a,
.theme-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: inherit;
    cursor: pointer;
    padding: 0;
}

a:hover:not(.social-links a),
.theme-toggle:hover {
    color: var(--link-hover);
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    margin-bottom: var(--space-12);
}

.section h2 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-text {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
}

.location-info {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-2);
    font-family: var(--font-mono);
}

/* ========================================
   CURRENTLY / READING / THOUGHTS LISTS
   ======================================== */
.currently-list,
.reading-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.currently-list li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.reading-list li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: var(--space-4);
    border-left: 2px solid var(--border-color);
}

.label {
    color: var(--text-primary);
    font-weight: 500;
}

.value {
    color: var(--text-secondary);
}

.thoughts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.thought-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.thought-link:hover {
    border-bottom-color: var(--link-hover);
}

.thought-link:hover .thought-title {
    color: var(--link-hover);
}

.thought-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.thought-date {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    position: relative;
}

.experience-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--border-color), transparent);
}

.experience-item {
    position: relative;
    padding-left: var(--space-8);
}

.experience-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    z-index: 1;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
    flex-wrap: wrap;
}

.experience-header h3 {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-primary);
}

.experience-company {
    font-size: var(--text-sm);
    color: var(--accent-color);
    font-family: var(--font-mono);
}

.experience-date {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-1);
}

.experience-location {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.experience-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   EDUCATION SECTION
   ======================================== */
.education-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    position: relative;
}

.education-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--border-color), transparent);
}

.education-item {
    position: relative;
    padding-left: var(--space-8);
}

.education-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--glow-color-1);
    z-index: 1;
}

.education-item h3 {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.education-degree {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.education-date {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-1);
}

.education-extra {
    font-size: var(--text-xs);
    color: var(--accent-color);
    font-family: var(--font-mono);
}

/* ========================================
   PRESS & MENTIONS
   ======================================== */
.press-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.press-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.press-link:hover {
    border-bottom-color: var(--link-hover);
}

.press-link:hover .press-title {
    color: var(--link-hover);
}

.press-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.press-source {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ========================================
   PROJECTS GRID
   ======================================== */
.project-category-block {
    margin-bottom: var(--space-8);
}

.project-category-header {
    margin-bottom: var(--space-5);
    max-width: 720px;
}

.project-category-kicker {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: var(--space-2);
}

.project-category-header h2 {
    font-size: var(--text-2xl);
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.project-category-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-6);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    height: 100%;
}

.project-card-link:hover .project-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--link-hover);
    transform: translateY(-2px);
}

/* ========================================
   PROJECT VIDEO
   ======================================== */
.project-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.project-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--link-hover);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.project-header h3 {
    font-size: var(--text-lg);
    font-weight: 500;
}

.project-card h3 {
    font-size: var(--text-lg);
    font-weight: 500;
    margin-bottom: var(--space-3);
}

.project-status {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: 2px 8px;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border-radius: 12px;
}

.project-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.project-card-link .project-link {
    pointer-events: none;
}

/* ========================================
   VIDEO MODAL
   ======================================== */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.2s ease;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
}

.video-modal-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.video-modal-close:hover {
    color: var(--link-hover);
}

.project-video {
    cursor: pointer;
}

.project-video::after {
    content: 'Click to expand';
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.project-video:hover::after {
    opacity: 1;
}

.project-tech {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.project-link {
    font-size: var(--text-sm);
    color: var(--accent-color);
    font-family: var(--font-mono);
}

/* ========================================
   SKILLS GRID
   ======================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
}

.skill-category h3 {
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.skill-category ul {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.6;
    list-style: none;
}

/* ========================================
   AWARDS LIST
   ======================================== */
.awards-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.awards-list li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: var(--space-4);
    border-left: 2px solid var(--border-color);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: var(--text-xs);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 600px) {
    .container {
        padding: 32px 24px;
        margin: 20px 12px;
    }

    .site-title {
        font-size: var(--text-3xl);
    }

    .site-tagline {
        font-size: var(--text-sm);
    }

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

    .project-category-header h2 {
        font-size: var(--text-xl);
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-2);
        align-items: flex-start;
    }
}
