/* ===================================================
   KISHWAR SHAFIN — PERSONAL WEBSITE
   A clean, modern academic site with dark mode.
   =================================================== */

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
    /* Light Theme — Guardians of the Galaxy */
    --bg-primary: #F5F7FC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #EDF0F9;
    --bg-card: #FFFFFF;
    --text-primary: #13286B;
    --text-secondary: #3D5087;
    --text-tertiary: #7887AB;
    --accent: #4A7A5A;
    --accent-hover: #3D6A4D;
    --accent-soft: rgba(74, 122, 90, 0.08);
    --accent-border: rgba(74, 122, 90, 0.22);
    --border: #D0D8EA;
    --border-light: #E2E8F4;
    --shadow-sm: 0 1px 3px rgba(19, 40, 107, 0.04), 0 1px 2px rgba(19, 40, 107, 0.06);
    --shadow-md: 0 4px 12px rgba(19, 40, 107, 0.06), 0 2px 4px rgba(19, 40, 107, 0.04);
    --shadow-lg: 0 10px 30px rgba(19, 40, 107, 0.08), 0 4px 8px rgba(19, 40, 107, 0.04);
    --gradient-hero: linear-gradient(135deg, #F0F3FA 0%, #E4E9F5 50%, #DDE3F2 100%);
    --nav-bg: rgba(245, 247, 252, 0.85);
    --code-bg: #EDF0F9;
}

[data-theme="dark"] {
    /* Dark Theme — Deep Space */
    --bg-primary: #080C1A;
    --bg-secondary: #0F1528;
    --bg-tertiary: #0B1020;
    --bg-card: #131A30;
    --text-primary: #E8ECF4;
    --text-secondary: #9AABC8;
    --text-tertiary: #607090;
    --accent: #6BAF82;
    --accent-hover: #82C498;
    --accent-soft: rgba(107, 175, 130, 0.10);
    --accent-border: rgba(107, 175, 130, 0.22);
    --border: #1E2845;
    --border-light: #182035;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --gradient-hero: linear-gradient(135deg, #080C1A 0%, #0D1430 50%, #101838 100%);
    --nav-bg: rgba(8, 12, 26, 0.85);
    --code-bg: #131A30;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.3;
    font-weight: 600;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* ---------- LAYOUT ---------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s ease;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-logo:hover {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
    border-radius: 1px;
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

/* ---------- HERO SECTION ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 64px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(82, 158, 233, 0.06) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 80px;
    align-items: center;
}

.hero-greeting {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

.hero-bio {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

/* Hero Photo */
.hero-image {
    display: flex;
    justify-content: center;
}

.hero-photo-wrapper {
    width: 280px;
    height: 340px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--border);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.hero-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.hero-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    gap: 8px;
}

.hero-photo-placeholder p {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- SECTION HEADERS ---------- */
.section-header {
    margin-bottom: 56px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.2rem;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* ---------- RESEARCH HIGHLIGHTS / FEATURED VIDEO SECTION ---------- */
.highlights-section {
    background: var(--bg-tertiary);
}

.featured-video-wrapper {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.featured-video-wrapper:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-lg);
}

.featured-video-embed {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.featured-video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.featured-video-info {
    padding: 8px 0;
}

.talk-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent-border);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.talk-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
    line-height: 1.35;
}

.talk-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.talk-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.talk-link:hover {
    gap: 8px;
}

/* ---------- INVITED TALKS SECTION ---------- */
.talks-section {
    background: var(--bg-primary);
}

.talks-section .paper-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #FFFFFF;
}

.talks-section .paper-figure img {
    object-fit: contain;
    object-position: center;
}

/* ---------- RESEARCH SECTION ---------- */
.research-section {
    background: var(--bg-tertiary);
}

.research-section .paper-figure {
    background: #FFFFFF;
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.paper-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    align-items: start;
}

.paper-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.paper-figure {
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.paper-figure img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.paper-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    gap: 8px;
    font-size: 0.8rem;
}

.paper-icon {
    font-size: 2.5rem;
}

.paper-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.paper-authors {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.paper-venue {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 10px;
}

.paper-abstract {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.paper-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.paper-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.paper-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* ---------- FOOTER ---------- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

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

.footer-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ---------- SCROLL ANIMATIONS ---------- */
.section-header,
.featured-video-wrapper,
.paper-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-header.visible,
.featured-video-wrapper.visible,
.paper-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-name {
        font-size: 2.6rem;
    }

    .hero-bio {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-links {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-photo-wrapper {
        width: 220px;
        height: 270px;
    }

    .featured-video-wrapper {
        grid-template-columns: 1fr;
    }

    .paper-card {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section {
        padding: 60px 0;
    }
}

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

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

    .hero-name {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}


