@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    /* Dark Theme (Default) */
    --bg-dark: #050505;
    --bg-gradient-start: #0a0a0a;
    --bg-gradient-end: #000000;
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --glass-blur: 12px;
    --transition-speed: 0.3s;

    /* Light Theme Variables */
    --bg-light: #f8fafc;
    --card-bg-light: rgba(255, 255, 255, 0.8);
    --text-main-light: #0f172a;
    --text-muted-light: #64748b;
}

[data-theme="light"] {
    --bg-dark: var(--bg-light);
    --bg-gradient-start: #f1f5f9;
    --bg-gradient-end: #e2e8f0;
    --card-bg: var(--card-bg-light);
    --card-border: rgba(0, 0, 0, 0.05);
    --text-main: var(--text-main-light);
    --text-muted: var(--text-muted-light);
    --accent-primary: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

/* Hero Section - Terminal Intro */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #000000 0%, #0a0a0a 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .hero-section {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1), transparent 40%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.1), transparent 40%);
    pointer-events: none;
}

[data-theme="light"] .hero-section::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15), transparent 40%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.15), transparent 40%);
}

.terminal-container {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.terminal-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--text-main);
    white-space: nowrap;
}

[data-theme="light"] .terminal-text {
    color: var(--text-main-light);
}

.terminal-prompt {
    color: var(--accent-primary);
    margin-right: 0.5em;
}

.terminal-output {
    color: var(--text-main);
}

[data-theme="light"] .terminal-output {
    color: var(--text-main-light);
}

.terminal-cursor {
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-primary);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.3s ease, color 0.2s ease;
    animation: fadeInBounce 1s ease 2.5s forwards;
    z-index: 2;
}

.scroll-indicator:hover {
    color: var(--text-main);
}

.scroll-indicator svg {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

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

@keyframes bounce {

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

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

/* Content Wrapper */
.content-wrapper {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Section Spacing */
.section {
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Section Labels */
.section-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

/* About Content */
.about-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Timeline Styles */
.timeline {
    list-style: none;
    padding: 0;
}

.timeline li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 30px;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline li::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 24px;
    bottom: -20px;
    width: 2px;
    background: var(--card-border);
}

.timeline li:last-child::after {
    display: none;
}

.timeline .date {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.timeline p {
    color: var(--text-muted);
    margin: 0;
}

.timeline a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-primary);
    transition: all 0.2s;
}

.timeline a:hover {
    color: var(--accent-primary);
    border-bottom-color: transparent;
}

/* Research Section */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.research-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--card-border);
}

.research-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.research-year {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.research-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.research-venue {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.research-type {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.research-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.research-link:hover {
    color: var(--text-main);
    transform: translateX(4px);
}

/* Interests Placeholder */
.interests-placeholder {
    text-align: center;
    padding: 60px 40px;
}

.wip-text {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    padding: 60px 20px 40px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.footer-links svg {
    width: 20px;
    height: 20px;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Sticky Nav */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
}

.nav-pill {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    padding: 8px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 24px;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-100px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-pill.visible {
    transform: translateY(0);
}

.nav-logo {
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text-main);
}

/* WIP Banner */
.wip-banner {
    background-color: #ffcc00;
    color: #000;
    text-align: center;
    padding: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    position: relative;
    z-index: 1001;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        min-height: 100svh;
        /* Use small viewport height for better mobile support */
    }

    .terminal-text {
        font-size: clamp(1.2rem, 5vw, 2rem);
        white-space: normal;
        /* Allow wrapping on very small screens */
        text-align: center;
    }

    .scroll-indicator {
        bottom: 30px;
    }

    .section {
        padding: 40px 20px;
    }

    .card {
        padding: 30px 20px;
    }

    h2 {
        font-size: 1.75rem;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .research-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .footer-links {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 100vh;
        min-height: 100svh;
    }

    .terminal-container {
        padding: 20px 15px;
        width: 100%;
    }

    .terminal-text {
        font-size: clamp(1rem, 4.5vw, 1.5rem);
        white-space: normal;
        word-break: break-word;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .nav-pill {
        padding: 8px 16px;
        gap: 16px;
    }

    .nav-links {
        display: none;
    }
}

/* Ensure scroll indicator is always visible above content */
@media (max-height: 600px) {
    .scroll-indicator {
        bottom: 15px;
    }
}