/* ============================================
   DAVYD NAVERIANI — PORTFOLIO
   2D Sunny Sky Theme
   ============================================ */

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

:root {
    /* Sky palette */
    --sky-top: #4a9fe5;
    --sky-mid: #7ec8e3;
    --sky-bottom: #c3e8f7;
    --sun-yellow: #ffe066;
    --sun-orange: #ffb347;
    --cloud-white: #fff;
    --cloud-shadow: #d4eaf7;

    /* UI colors */
    --bg: #f6fafd;
    --card-bg: #f0f6fb;
    --card-bg-hover: #e8f1f8;
    --card-border: rgba(74, 159, 229, 0.12);
    --card-shadow: rgba(74, 159, 229, 0.08);
    --text: #1a2f4a;
    --text-secondary: #3d5a7a;
    --text-muted: #7a9bb5;
    --accent: #e8723a;
    --accent-soft: rgba(232, 114, 58, 0.1);
    --accent-hover: #d4622e;
    --border: rgba(30, 58, 95, 0.08);
    --tag-bg: rgba(74, 159, 229, 0.08);
    --tag-border: rgba(74, 159, 229, 0.15);

    /* Typography */
    --font-display: 'Nunito', system-ui, sans-serif;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --max-w: 740px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    background: linear-gradient(180deg,
        var(--sky-top) 0%,
        var(--sky-mid) 30%,
        var(--sky-bottom) 55%,
        #dceef8 70%,
        white 85%
    );
    background-attachment: fixed;
}

::selection {
    background: var(--sun-yellow);
    color: var(--text);
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

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

/* ============================================
   SKY SCENE
   ============================================ */
.sky-scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Sun */
.sun {
    position: absolute;
    top: 60px;
    right: 12%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--sun-yellow) 40%, var(--sun-orange) 100%);
    box-shadow:
        0 0 40px rgba(255, 224, 102, 0.5),
        0 0 80px rgba(255, 179, 71, 0.3),
        0 0 120px rgba(255, 179, 71, 0.15);
    animation: sun-pulse 4s ease-in-out infinite;
}

.sun-rays {
    position: absolute;
    top: 22px;
    right: calc(12% - 38px);
    width: 176px;
    height: 176px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg, rgba(255, 224, 102, 0.08) 5deg, transparent 10deg,
        transparent 30deg, rgba(255, 224, 102, 0.08) 35deg, transparent 40deg,
        transparent 60deg, rgba(255, 224, 102, 0.08) 65deg, transparent 70deg,
        transparent 90deg, rgba(255, 224, 102, 0.08) 95deg, transparent 100deg,
        transparent 120deg, rgba(255, 224, 102, 0.08) 125deg, transparent 130deg,
        transparent 150deg, rgba(255, 224, 102, 0.08) 155deg, transparent 160deg,
        transparent 180deg, rgba(255, 224, 102, 0.08) 185deg, transparent 190deg,
        transparent 210deg, rgba(255, 224, 102, 0.08) 215deg, transparent 220deg,
        transparent 240deg, rgba(255, 224, 102, 0.08) 245deg, transparent 250deg,
        transparent 270deg, rgba(255, 224, 102, 0.08) 275deg, transparent 280deg,
        transparent 300deg, rgba(255, 224, 102, 0.08) 305deg, transparent 310deg,
        transparent 330deg, rgba(255, 224, 102, 0.08) 335deg, transparent 340deg
    );
    animation: sun-rays-spin 60s linear infinite;
}

@keyframes sun-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes sun-rays-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Clouds */
.cloud {
    position: absolute;
    background: var(--cloud-white);
    border-radius: 100px;
    opacity: 0.9;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: var(--cloud-white);
    border-radius: 50%;
}

/* Clouds use percentage-based positioning so they work on any screen.
   Minimal off-screen overshoot so they reappear quickly.
   Same duration + evenly staggered delays = always spread out. */

.cloud-1 {
    width: 160px; height: 45px;
    top: 70px; left: 0;
    animation: cloud-drift 60s linear infinite;
    animation-delay: 0s;
    opacity: 0.85;
}
.cloud-1::before { width: 60px; height: 60px; top: -30px; left: 25px; }
.cloud-1::after { width: 45px; height: 45px; top: -18px; left: 80px; }

.cloud-2 {
    width: 130px; height: 38px;
    top: 190px; left: 0;
    animation: cloud-drift 60s linear infinite;
    animation-delay: -12s;
    opacity: 0.7;
}
.cloud-2::before { width: 50px; height: 50px; top: -25px; left: 22px; }
.cloud-2::after { width: 38px; height: 38px; top: -16px; left: 65px; }

.cloud-3 {
    width: 190px; height: 52px;
    top: 310px; left: 0;
    animation: cloud-drift 60s linear infinite;
    animation-delay: -24s;
    opacity: 0.55;
}
.cloud-3::before { width: 75px; height: 75px; top: -38px; left: 35px; }
.cloud-3::after { width: 55px; height: 55px; top: -22px; left: 100px; }

.cloud-4 {
    width: 110px; height: 32px;
    top: 130px; left: 0;
    animation: cloud-drift 60s linear infinite;
    animation-delay: -36s;
    opacity: 0.5;
}
.cloud-4::before { width: 42px; height: 42px; top: -20px; left: 18px; }
.cloud-4::after { width: 32px; height: 32px; top: -14px; left: 55px; }

.cloud-5 {
    width: 145px; height: 40px;
    top: 250px; left: 0;
    animation: cloud-drift 60s linear infinite;
    animation-delay: -48s;
    opacity: 0.4;
}
.cloud-5::before { width: 55px; height: 55px; top: -28px; left: 28px; }
.cloud-5::after { width: 40px; height: 40px; top: -16px; left: 78px; }

@keyframes cloud-drift {
    0%   { transform: translateX(-200px); }
    100% { transform: translateX(100vw); }
}

/* Birds */
.birds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bird {
    position: absolute;
    color: rgba(30, 58, 95, 0.25);
}

/* Birds are well-spaced: top-left, center-top, right-mid */
.bird-1 {
    top: 100px; left: 3%;
    animation: bird-fly-1 90s linear forwards;
    animation-delay: 2s;
}

.bird-2 {
    top: 160px; left: 35%;
    animation: bird-fly-2 100s linear forwards;
    animation-delay: 8s;
}

.bird-3 {
    top: 120px; left: 65%;
    animation: bird-fly-3 95s linear forwards;
    animation-delay: 14s;
}

@keyframes bird-fly-1 {
    0%   { transform: translate(0, 0); opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(70vw, -30px); opacity: 0; }
}

@keyframes bird-fly-2 {
    0%   { transform: translate(0, 0); opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(55vw, -20px); opacity: 0; }
}

@keyframes bird-fly-3 {
    0%   { transform: translate(0, 0); opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(30vw, -25px); opacity: 0; }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s var(--ease);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(30, 58, 95, 0.06);
    padding: 0.75rem 0;
    box-shadow: 0 2px 20px rgba(30, 58, 95, 0.05);
}

.nav-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: auto;
}

.nav.scrolled .nav-name {
    color: var(--text);
    text-shadow: none;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.4rem;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav.scrolled .nav-links a {
    color: var(--text-muted);
    text-shadow: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: 0.3s ease;
}

.nav.scrolled .nav-toggle span {
    background: var(--text);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    padding: 7rem 0 4rem;
    position: relative;
    z-index: 1;
}

.hero .container { width: 100%; }

.hero-layout {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.hero-text {
    flex: 1;
    background: rgba(20, 60, 100, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.25rem 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    display: block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-tagline {
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.25rem;
    max-width: 520px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.hero-tagline strong {
    color: white;
    font-weight: 700;
}

.hero-bio {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 520px;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.hero-bio a {
    color: var(--sun-yellow);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 224, 102, 0.4);
}

.hero-bio a:hover { text-decoration-color: var(--sun-yellow); }

/* Photo */
.hero-photo { display: none; }

.photo-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 3px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

/* Social */
.social-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.08);
}

.social-link:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.social-link svg { width: 17px; height: 17px; }

/* ============================================
   CONTENT PANEL — white box below the sky
   ============================================ */
.content-panel {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 28px 28px 0 0;
    margin-top: -2rem;
    box-shadow: 0 -8px 40px rgba(30, 58, 95, 0.08);
}

/* ============================================
   SECTIONS — SHARED
   ============================================ */
.section {
    padding: 4.5rem 0;
    position: relative;
    z-index: 1;
}

#news .section-header {
    margin-bottom: 1rem;
}

.section-header {
    margin-bottom: 2.25rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section-rule {
    width: 36px;
    height: 3px;
    background: var(--accent);
    border: none;
    margin-top: 0.6rem;
    border-radius: 2px;
}

/* Fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s var(--ease);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   NEWS
   ============================================ */
.news-list { list-style: none; }

.news-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}

.news-item:last-child { border-bottom: none; }

.news-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.news-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.news-text strong { color: var(--text); font-weight: 700; }

.news-text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(232, 114, 58, 0.3);
}

.news-text a:hover { text-decoration-color: var(--accent); }

/* News toggle */
.news-hidden { display: none; }
.news-list.expanded .news-hidden { display: grid; }

.news-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.45rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px var(--card-shadow);
}

.news-toggle:hover {
    color: var(--text-secondary);
    background: var(--card-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--card-shadow);
}

.news-toggle svg { transition: transform 0.3s var(--ease); }
.news-toggle.expanded svg { transform: rotate(180deg); }

/* ============================================
   RESEARCH
   ============================================ */
.paper-card {
    background: var(--card-bg);

    border: 1.5px solid var(--card-border);
    border-radius: 18px;
    padding: 2rem;
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 24px var(--card-shadow);
}

.paper-card:hover {
    background: var(--card-bg-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(74, 159, 229, 0.12);
}

.paper-venue {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.paper-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.paper-title a { color: var(--text); }
.paper-title a:hover { color: var(--accent); }

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

.paper-abstract {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.paper-footer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.paper-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    background: var(--tag-bg);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--tag-border);
    letter-spacing: 0.02em;
}

.paper-links { display: flex; gap: 0.5rem; }

.paper-link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    border: 1.5px solid rgba(232, 114, 58, 0.25);
    background: var(--accent-soft);
    transition: all 0.25s ease;
}

.paper-link:hover {
    background: rgba(232, 114, 58, 0.18);
    border-color: rgba(232, 114, 58, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 114, 58, 0.1);
}

.paper-link svg { width: 13px; height: 13px; }

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 540px) {
    .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
    background: var(--card-bg);

    border: 1.5px solid var(--card-border);
    border-radius: 18px;
    padding: 1.5rem;
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px var(--card-shadow);
}

.project-card:hover {
    background: var(--card-bg-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(74, 159, 229, 0.12);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.project-icon { color: var(--text-muted); }
.project-icon svg { width: 18px; height: 18px; }

.project-ext-link { color: var(--text-muted); transition: all 0.2s ease; }
.project-ext-link:hover { color: var(--accent); transform: translateY(-1px); }
.project-ext-link svg { width: 16px; height: 16px; }

.project-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.45rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.1rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* ============================================
   HACKATHONS
   ============================================ */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.award-item {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);

    border: 1.5px solid var(--card-border);
    border-radius: 18px;
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 20px var(--card-shadow);
}

.award-item:hover {
    background: var(--card-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(74, 159, 229, 0.1);
}

.award-place {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    padding-top: 0.1rem;
    white-space: nowrap;
}

.award-place-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 0.2rem;
}

.award-info h4 {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.award-meta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.award-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   EDUCATION
   ============================================ */
.edu-timeline {
    display: flex;
    flex-direction: column;
}

.edu-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 1.25rem;
}

.edu-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.4rem;
}

.edu-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sun-orange);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(255, 179, 71, 0.35);
    border: 2px solid white;
}

.edu-line {
    width: 2px;
    flex-grow: 1;
    background: linear-gradient(to bottom, var(--sun-orange), rgba(255, 179, 71, 0.15));
    min-height: 30px;
    margin-top: 0.5rem;
    border-radius: 1px;
}

.edu-content { padding-bottom: 1.75rem; }

.edu-degree {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 700;
}

.edu-school {
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 600;
}

.edu-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.edu-details {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.edu-details li {
    margin-bottom: 0.15rem;
    list-style: none;
    padding-left: 1rem;
    position: relative;
}

.edu-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--sun-orange);
    opacity: 0.5;
}

/* ============================================
   BLOG
   ============================================ */
.blog-list { display: flex; flex-direction: column; }

.blog-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.25rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}

.blog-item:first-child { padding-top: 0; }
.blog-item:last-child { border-bottom: none; }

.blog-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.blog-info h4 {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.blog-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.coming-soon {
    display: inline-flex;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 0.5rem;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(30, 58, 95, 0.06);
    position: relative;
    z-index: 1;
}

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

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.footer .social-links { gap: 0.35rem; }

.footer .social-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border-color: var(--border);
    color: var(--text-muted);
    background: var(--card-bg);
}

.footer .social-link:hover {
    color: var(--accent);
    border-color: rgba(232, 114, 58, 0.3);
    background: var(--accent-soft);
}

.footer .social-link svg { width: 15px; height: 15px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(30, 58, 95, 0.06);
        padding: 5rem 2rem 2rem;
        gap: 1.25rem;
        transition: right 0.4s var(--ease);
        z-index: 999;
    }

    .nav-links.open { right: 0; }

    .nav-links a,
    .nav.scrolled .nav-links a {
        color: var(--text-secondary);
        text-shadow: none;
        font-size: 0.8rem;
    }

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

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.25);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .nav-overlay.active { opacity: 1; pointer-events: all; }

    .hero { padding-top: 6rem; min-height: auto; padding-bottom: 4rem; }
    .hero-name { font-size: 2.4rem; }
    .hero-layout { flex-direction: column; }
    .section { padding: 3rem 0; }

    .sun { width: 70px; height: 70px; top: 50px; right: 8%; }
    .sun-rays { width: 130px; height: 130px; top: 20px; right: calc(8% - 30px); }
    .moon-svg { top: 45px; right: 8%; width: 65px; height: 65px; }

    .news-item { grid-template-columns: 1fr; gap: 0.2rem; }
    .projects-grid { grid-template-columns: 1fr !important; }
    .award-item { grid-template-columns: 1fr; gap: 0.5rem; }
    .blog-item { grid-template-columns: 1fr; gap: 0.25rem; }

    .edu-marker { display: none; }
    .edu-item {
        grid-template-columns: 1fr;
        padding-left: 1rem;
        border-left: 2px solid rgba(255, 179, 71, 0.25);
    }

    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
    .hero-name { font-size: 2rem; }
    .paper-card { padding: 1.25rem; }
    .paper-footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ============================================
   DARK MODE / NIGHT THEME
   ============================================ */

/* Prevent transition flash on page load */
.no-transition,
.no-transition *,
.no-transition *::before,
.no-transition *::after {
    transition: none !important;
}

/* Smooth theme transition for content panel */
.content-panel {
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

/* --- Night sky elements --- */
#star-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

[data-theme="dark"] #star-canvas { opacity: 1; }

.moon-svg {
    display: none;
    position: absolute;
    top: 55px;
    right: 12%;
}

[data-theme="dark"] .moon-svg {
    display: block;
    animation: moon-pulse 6s ease-in-out infinite;
}

@keyframes moon-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(245,240,220,0.35)) drop-shadow(0 0 30px rgba(245,240,220,0.12));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(245,240,220,0.55)) drop-shadow(0 0 45px rgba(245,240,220,0.22));
    }
}

[data-theme="dark"] .sun { opacity: 0; }

/* --- Dark mode variables --- */
[data-theme="dark"] {
    --sky-top: #0a1628;
    --sky-mid: #0f2744;
    --sky-bottom: #162d50;

    --bg: #0d1b2a;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-hover: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: rgba(0, 0, 0, 0.2);
    --text: #e0e6ed;
    --text-secondary: #a0b4c8;
    --text-muted: #6b8299;
    --accent: #f0885a;
    --accent-soft: rgba(240, 136, 90, 0.12);
    --accent-hover: #f59a72;
    --border: rgba(255, 255, 255, 0.06);
    --tag-bg: rgba(255, 255, 255, 0.06);
    --tag-border: rgba(255, 255, 255, 0.1);
}

/* Body gradient — night sky */
[data-theme="dark"] body {
    background: linear-gradient(180deg,
        var(--sky-top) 0%,
        var(--sky-mid) 30%,
        var(--sky-bottom) 55%,
        #111f32 70%,
        #0d1b2a 85%
    );
}

[data-theme="dark"] .sun-rays { opacity: 0; }
[data-theme="dark"] .cloud { opacity: 0 !important; }
[data-theme="dark"] .bird { color: rgba(200, 220, 255, 0.12); }

/* Content panel */
[data-theme="dark"] .content-panel {
    background: #111d2e;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
}

/* Nav scrolled */
[data-theme="dark"] .nav.scrolled {
    background: rgba(17, 29, 46, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* Hero */
[data-theme="dark"] .hero-text {
    background: rgba(10, 20, 40, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Selection */
[data-theme="dark"] ::selection {
    background: var(--accent);
    color: white;
}

/* Timeline dot border matches dark panel bg */
[data-theme="dark"] .edu-dot {
    border-color: #111d2e;
}

/* Card hover shadows */
[data-theme="dark"] .paper-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .award-item:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

/* Footer */
[data-theme="dark"] .footer {
    border-top-color: rgba(255, 255, 255, 0.06);
}

/* --- Theme toggle button --- */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav.scrolled .theme-toggle {
    color: var(--text-muted);
    background: var(--card-bg);
}

.nav.scrolled .theme-toggle:hover {
    color: var(--text);
    background: var(--card-bg-hover);
}

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

/* Dark mode responsive */
@media (max-width: 768px) {
    [data-theme="dark"] .nav-links {
        background: rgba(17, 29, 46, 0.97);
        border-left-color: rgba(255, 255, 255, 0.06);
    }

    [data-theme="dark"] .nav-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
}
