/* =====================================================================
   Prakrut Kotecha — shared design system
   Modern / bold, dark-first, fully responsive.
   Edit CONTENT in assets/content.js. Edit LOOK here.
   ===================================================================== */

/* ---------- 1. THEME TOKENS ---------- */
:root {
    /* DARK (default) */
    --bg-color: #0a0b10;
    --bg-elev: #0f1118;
    --card-bg: rgba(22, 24, 32, 0.72);
    --card-solid: #14161f;
    --card-glass: rgba(255, 255, 255, 0.045);
    --text-main: #f4f6fb;
    --text-secondary: #9aa2b4;
    --accent: #7d9bff;
    --accent-strong: #6d8bff;
    --accent-gradient: linear-gradient(120deg, #6d8bff 0%, #22d3ee 100%);
    --accent-secondary: #ff7eb6;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --nav-bg: rgba(10, 11, 16, 0.72);
    --icon-color: #f4f6fb;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    --glow: 0 0 30px rgba(109, 139, 255, 0.35);
    --blob-1: rgba(109, 139, 255, 0.20);
    --blob-2: rgba(34, 211, 238, 0.16);
    --blob-3: rgba(255, 126, 182, 0.12);
}

[data-theme="light"] {
    --bg-color: #f7f8fc;
    --bg-elev: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.86);
    --card-solid: #ffffff;
    --card-glass: rgba(20, 30, 60, 0.035);
    --text-main: #141722;
    --text-secondary: #5b6273;
    --accent: #3b5bdb;
    --accent-strong: #2f4fd0;
    --accent-gradient: linear-gradient(120deg, #3b5bdb 0%, #0bb5d6 100%);
    --accent-secondary: #e5468a;
    --border: rgba(10, 15, 40, 0.10);
    --border-strong: rgba(10, 15, 40, 0.18);
    --nav-bg: rgba(247, 248, 252, 0.78);
    --icon-color: #141722;
    --shadow: 0 10px 40px rgba(20, 30, 70, 0.10);
    --glow: 0 0 24px rgba(59, 91, 219, 0.18);
    --blob-1: rgba(59, 91, 219, 0.14);
    --blob-2: rgba(11, 181, 214, 0.12);
    --blob-3: rgba(229, 70, 138, 0.08);
}

/* ---------- 2. BASE ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.65;
    font-weight: 400;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Soft gradient "mesh" background — pure CSS, GPU-cheap */
body::before {
    content: '';
    position: fixed;
    inset: -20% -20% auto -20%;
    height: 140vh;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(45% 40% at 15% 12%, var(--blob-1), transparent 60%),
        radial-gradient(40% 38% at 88% 8%, var(--blob-2), transparent 60%),
        radial-gradient(50% 45% at 70% 85%, var(--blob-3), transparent 65%);
    filter: saturate(1.1);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

img, video { max-width: 100%; }

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---------- 3. NAV ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.nav-title {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 999px;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-links a:hover { color: var(--text-main); background: var(--card-glass); }

.nav-links a.active {
    color: var(--text-main);
    background: var(--card-glass);
    box-shadow: inset 0 0 0 1px var(--border-strong);
}

.theme-toggle {
    margin-left: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-glass);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--icon-color);
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.2s ease, box-shadow 0.3s ease;
}
.theme-toggle:hover { transform: rotate(18deg); border-color: var(--accent); box-shadow: var(--glow); }

/* ---------- 4. LAYOUT ---------- */
.container { max-width: 1120px; margin: 56px auto; padding: 0 32px; }

.section { margin-bottom: 84px; }

.section-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 30px;
    position: relative;
    padding-bottom: 12px;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 52px; height: 3px;
    border-radius: 3px;
    background: var(--accent-gradient);
}
.section-subtitle { font-size: 1.2rem; font-weight: 700; margin: 32px 0 18px; letter-spacing: -0.01em; }

/* ---------- 5. HERO ---------- */
.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 52px;
    align-items: center;
    margin-bottom: 40px;
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0 0 10px;
}

.hero-role {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--card-glass);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 22px;
}
.hero-role::before {
    content: '';
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: var(--glow);
}

.hero p { font-size: 1.02rem; color: var(--text-secondary); margin: 0 0 16px; }
.hero p strong { color: var(--text-main); font-weight: 600; }

.interest-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.interest-chip {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--card-glass);
    border: 1px solid var(--border);
    padding: 6px 13px;
    border-radius: 999px;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.interest-chip:hover { color: var(--text-main); border-color: var(--accent); transform: translateY(-2px); }

.hero-photo-wrap {
    position: relative;
    width: 210px;
    height: 210px;
    flex-shrink: 0;
    border-radius: 22px;
    padding: 3px;
    background: var(--accent-gradient);
    box-shadow: var(--shadow);
}
.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 19px;
    display: block;
    background: var(--card-solid);
}

.socials { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.social-icon {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-glass);
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.social-icon:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.social-icon svg { width: 20px; height: 20px; }

/* ---------- 6. PUBLICATIONS ---------- */
.pub-item {
    display: flex;
    gap: 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pub-item:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.pub-item.plain { background: transparent; backdrop-filter: none; }

.pub-thumb {
    width: 168px;
    height: 108px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--card-solid);
}
.pub-details { flex: 1; min-width: 0; }
.pub-title { font-weight: 650; font-size: 1.02rem; line-height: 1.35; margin-bottom: 6px; color: var(--text-main); }
.pub-authors { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 4px; }
.pub-authors strong { color: var(--text-main); font-weight: 650; }
.pub-venue { font-size: 0.86rem; font-style: italic; color: var(--text-secondary); margin-bottom: 12px; }
.pub-award { font-size: 0.9rem; font-weight: 600; color: var(--text-main); margin: 6px 0 12px; }

.pub-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-links a {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-main);
    background: var(--card-glass);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 8px;
    transition: all 0.15s ease;
}
.pub-links a:hover { background: var(--accent-gradient); color: #fff; border-color: transparent; }

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--card-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    margin-left: 8px;
    vertical-align: middle;
}
.badge.accent { color: var(--accent); border-color: var(--accent); }

/* ---------- 7. PROJECT CARDS ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.projects-grid.two { grid-template-columns: repeat(2, 1fr); }

.project-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: inherit;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow), var(--glow); }

.project-thumb {
    width: 100%;
    height: 172px;
    object-fit: cover;
    background: var(--card-solid);
    border-bottom: 1px solid var(--border);
    display: block;
}
.project-card:hover .pub-title { color: var(--accent); }
.project-card .pub-details { padding: 16px 18px 18px; display: flex; flex-direction: column; }
.project-card .pub-authors { margin-bottom: 12px; }

.pub-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.pub-tag {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--card-glass);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 999px;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    font-weight: 650;
    font-size: 1rem;
    color: var(--accent);
}
.view-all:hover { gap: 12px; }

/* ---------- 8. EXPERIENCE (timeline) ---------- */
.experience-list { display: flex; flex-direction: column; gap: 4px; }
.experience-item {
    display: flex;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.experience-item:last-child { border-bottom: none; }
.exp-logo {
    width: 56px; height: 56px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    padding: 6px;
    flex-shrink: 0;
}
.exp-content { flex: 1; }
.exp-header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.exp-title { font-weight: 650; font-size: 1.02rem; color: var(--text-main); }
.exp-date { font-size: 0.82rem; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.exp-org { font-size: 0.92rem; color: var(--accent); margin: 2px 0 6px; }
.exp-desc { font-size: 0.9rem; color: var(--text-secondary); }

/* ---------- 9. TALKS SCROLLER ---------- */
.talks-scroller { overflow: hidden; position: relative; border: 1px solid var(--border); border-radius: 16px; padding: 20px 0; cursor: pointer; background: var(--card-bg); }
.talks-scroller.paused { cursor: default; }
.talks-track { display: flex; gap: 18px; width: max-content; padding: 0 18px; animation: scrollTalks 45s linear infinite; }
.talks-scroller.paused .talks-track { animation-play-state: paused; }
@keyframes scrollTalks { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.talk-card {
    flex: 0 0 236px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.talks-scroller .talk-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.talk-card-img { width: 100%; height: 132px; object-fit: cover; background: var(--card-glass); display: block; }
.talk-card-content { padding: 13px 15px; }
.talk-card-title { font-weight: 650; font-size: 0.92rem; margin-bottom: 5px; }
.talk-card-venue { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }
.talks-hint { position: absolute; bottom: 8px; right: 14px; font-size: 0.72rem; color: var(--text-secondary); opacity: 0.7; pointer-events: none; }

/* ---------- 10. NEWS ---------- */
.news-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--card-bg); }
.news-item { display: flex; gap: 20px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-date { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 600; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.news-content { font-size: 0.95rem; color: var(--text-main); }

/* ---------- 11. FOOTER ---------- */
.site-footer { margin: 96px 0 40px; text-align: center; font-size: 0.82rem; color: var(--text-secondary); }

/* ---------- 12. ANIMATIONS ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- 13. RESPONSIVE ---------- */
@media (max-width: 900px) {
    .projects-grid, .projects-grid.two { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .hero-photo-wrap { order: -1; margin: 0 auto; width: 172px; height: 172px; }
    .hero-role, .interest-chips, .socials { justify-content: center; }
    .interest-chips { justify-content: center; }
    .nav-container { padding: 12px 20px; }
    .container { padding: 0 20px; margin: 40px auto; }
}
@media (max-width: 640px) {
    .projects-grid, .projects-grid.two { grid-template-columns: 1fr; }
    .pub-item { flex-direction: column; }
    .pub-thumb { width: 100%; height: 190px; }
    .nav-container { flex-direction: column; gap: 12px; }
    .nav-links { justify-content: center; }
    .section { margin-bottom: 60px; }
    .news-item { flex-direction: column; gap: 4px; }
}
