/* CSS Variables for Theme — Editorial Cream
   Cream paper, warm near-black ink, sage + ochre as quiet editorial accents. */
:root {
    --bg-color: #FAF7F2;
    --text-color: #2A2824;
    --text-muted: #6B6358;
    --text-subtle: #A89F94;
    --nav-bg: rgba(250, 247, 242, 0.92);
    --nav-bg-scrolled: rgba(250, 247, 242, 0.97);
    --section-bg: #FAF7F2;
    --card-bg: #FAF7F2;
    --border-color: #E8E2D6;
    --border-soft: rgba(42, 40, 36, 0.06);
    --shadow-color: rgba(42, 40, 36, 0.04);

    /* Two editorial accents — sage primary, ochre secondary */
    --accent-primary: #3E4A3A;
    --accent-secondary: #CA8A25;
    --accent-soft: rgba(62, 74, 58, 0.08);
    --accent-line: #C89158;
}

/* Dark Mode Variables — warm dark complement */
body.dark-mode {
    --bg-color: #1A1815;
    --text-color: #EDE6D8;
    --text-muted: #A89F94;
    --text-subtle: #756B5F;
    --nav-bg: rgba(26, 24, 21, 0.92);
    --nav-bg-scrolled: rgba(26, 24, 21, 0.97);
    --section-bg: #1A1815;
    --card-bg: #1A1815;
    --border-color: #2E2A24;
    --border-soft: rgba(237, 230, 216, 0.06);
    --shadow-color: rgba(0, 0, 0, 0.35);

    --accent-primary: #7A8C76;
    --accent-secondary: #D4A055;
    --accent-soft: rgba(122, 140, 118, 0.10);
    --accent-line: #C89158;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: 0 4px 20px var(--shadow-color);
}

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dark-mode-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dark-mode-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.nav-logo h2 {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section - Space Theme */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at 50% 60%, #050507 0%, #020203 70%, #000000 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Animated stars background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: stars 20s linear infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 50px 60px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 120px 20px, #fff, transparent),
        radial-gradient(2px 2px at 180px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 220px 50px, #fff, transparent),
        radial-gradient(1px 1px at 270px 10px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 300px 150px;
    animation: stars 30s linear infinite reverse;
}

@keyframes stars {
    from { transform: translateX(0); }
    to { transform: translateX(-200px); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* Space Theme Elements */
.space-rocket {
    position: absolute;
    top: 15%;
    right: 10%;
    width: 60px;
    height: 120px;
    z-index: 5;
    animation: rocketBounce 5s ease-in-out infinite;
}

/* Rocket Body — off-white with cool slate shading + slate seam */
.space-rocket .rocket-body {
    position: absolute;
    width: 60px;
    height: 120px;
    background: linear-gradient(180deg, #dadada 0%, #b8b8b8 100%);
    border-top-left-radius: 100%;
    border-top-right-radius: 100%;
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    border-top: 5px solid #f5f5f5;
    box-shadow:
        inset -10px 0 20px rgba(0,0,0,0.2),
        inset 10px 0 20px rgba(255,255,255,0.3),
        0 0 30px rgba(218, 218, 218, 0.4);
}

.space-rocket .rocket-body::before {
    content: '';
    position: absolute;
    left: calc(50% - 12px);
    width: 24px;
    height: 7px;
    background-color: #554842;
    bottom: -7px;
    border-bottom-right-radius: 60%;
    border-bottom-left-radius: 60%;
}

/* Rocket Window */
.space-rocket .rocket-window {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    background: radial-gradient(circle at 30% 30%, #87ceeb, #4682b4);
    left: calc(50% - 20px);
    top: 20px;
    border: 5px solid #b4b2b2;
    box-shadow:
        inset 0 0 15px rgba(255,255,255,0.6),
        0 0 10px rgba(71, 130, 180, 0.5);
    overflow: hidden;
}

/* Rocket Fins */
.space-rocket .rocket-fin-left {
    position: absolute;
    left: -15px;
    top: calc(100% - 47px);
    height: 47px;
    width: 45px;
    background: linear-gradient(135deg, #a75248, #8b4238);
    border-top-left-radius: 80%;
    border-bottom-left-radius: 20%;
    z-index: -1;
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.3);
}

.space-rocket .rocket-fin-right {
    position: absolute;
    right: -15px;
    top: calc(100% - 47px);
    height: 47px;
    width: 45px;
    background: linear-gradient(45deg, #a75248, #8b4238);
    border-top-right-radius: 80%;
    border-bottom-right-radius: 20%;
    z-index: -1;
    box-shadow: inset 5px -5px 10px rgba(0,0,0,0.3);
}

/* Rocket Exhaust */
.space-rocket .rocket-exhaust {
    position: absolute;
    top: 100%;
    left: calc(50% - 14px);
    width: 28px;
    height: 80px;
    background: linear-gradient(180deg,
        rgba(255,100,100,0.9) 0%,
        rgba(255,150,50,0.8) 30%,
        rgba(255,200,100,0.6) 60%,
        transparent 100%);
    border-radius: 0 0 50% 50%;
    animation: rocketExhaust 0.3s ease-in-out infinite alternate;
    filter: blur(2px);
}

@keyframes rocketBounce {
    0%, 100% { 
        transform: translateY(0px) rotate(-2deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(2deg); 
    }
}

@keyframes rocketExhaust {
    0% {
        height: 80px;
        opacity: 0.9;
    }
    100% {
        height: 100px;
        opacity: 0.7;
    }
}

.space-earth {
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 200px;
    height: 200px;
    background-color: #3380B5;
    border-radius: 50%;
    z-index: 5;
    overflow: hidden;
    box-shadow:
        inset -70px 0px rgba(0, 0, 0, 0.3),
        0 0 0 25px rgba(20, 106, 221, 0.1),
        0 0 0 50px rgba(20, 106, 221, 0.08),
        0 0 0 75px rgba(20, 106, 221, 0.06),
        0 0 100px rgba(20, 106, 221, 0.4);
}

/* Land masses using the professional technique from your CSS */
.space-earth::before {
    content: "";
    position: absolute;
    background: #85C567;
    height: 30px;
    width: 75px;
    display: block;
    border-radius: 40px;
    animation: earthRotate linear 25s infinite;
    box-shadow: 
        0px 200px 0 5px #85C567,
        5px 35px 0 -3px #7CB05B,
        35px 125px 0 -9px #6B9B4F,
        120px -15px 0 -7px #85C567,
        135px -55px 0 -9px #7CB05B,
        150px 25px 0 7px #85C567,
        220px 70px 0 -2px #6B9B4F,
        235px -35px 0 -3px #85C567,
        280px 85px 0 3px #7CB05B,
        320px 30px 0 1px #85C567,
        400px 0 0 0 #6B9B4F,
        400px 75px 0 -5px #85C567,
        405px 35px 0 -3px #7CB05B,
        435px 125px 0 -9px #6B9B4F,
        520px -15px 0 -7px #85C567,
        535px -55px 0 -9px #7CB05B,
        550px 25px 0 7px #85C567,
        620px 70px 0 -2px #6B9B4F,
        635px -35px 0 -3px #85C567,
        680px 85px 0 3px #7CB05B,
        720px 30px 0 1px #85C567;
}

/* Cloud layer using professional technique */
.space-earth::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.80);
    height: 20px;
    width: 60px;
    display: block;
    border-radius: 40px;
    animation: earthClouds linear 15s infinite;
    box-shadow:
        10px 50px 0 3px rgba(255, 255, 255, 0.70),
        50px -15px 0 2px rgba(255, 255, 255, 0.60),
        70px 70px 0 -1px rgba(255, 255, 255, 0.80),
        100px 25px 0 1px rgba(255, 255, 255, 0.70),
        110px 105px 0 -4px rgba(255, 255, 255, 0.60),
        140px 75px 0 -3px rgba(255, 255, 255, 0.80),
        250px -25px 0 -1px rgba(255, 255, 255, 0.70),
        210px 50px 0 1px rgba(255, 255, 255, 0.60),
        340px 130px 0 1px rgba(255, 255, 255, 0.80),
        400px 0px 0 0 rgba(255, 255, 255, 0.70),
        410px 50px 0 3px rgba(255, 255, 255, 0.60),
        500px 25px 0 1px rgba(255, 255, 255, 0.80),
        450px -15px 0 2px rgba(255, 255, 255, 0.70),
        470px 70px 0 -1px rgba(255, 255, 255, 0.60),
        540px 75px 0 -3px rgba(255, 255, 255, 0.80),
        510px 105px 0 -4px rgba(255, 255, 255, 0.70),
        650px -25px 0 -1px rgba(255, 255, 255, 0.60),
        610px 50px 0 1px rgba(255, 255, 255, 0.80),
        740px 130px 0 1px rgba(255, 255, 255, 0.70);
}

@keyframes earthRotate {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-400px, 0);
    }
}

@keyframes earthClouds {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-400px, 0);
    }
}

.space-moon {
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 75px;
    height: 75px;
    background-color: #e8e8e8;
    border-radius: 50%;
    z-index: 6;
    overflow: hidden;
    transform-origin: 600px 0px;
    animation: moonOrbitWithDepth 30s linear infinite;
    box-shadow: 
        inset -40px 0px rgba(0, 0, 0, 0.3),
        0 0 0 15px rgba(232, 232, 232, 0.1),
        0 0 0 30px rgba(232, 232, 232, 0.08),
        0 0 60px rgba(232, 232, 232, 0.4);
}

/* Moon craters using the same technique as earth landmasses */
.space-moon::before {
    content: "";
    position: absolute;
    background: #c0c0c0;
    height: 8px;
    width: 13px;
    display: block;
    border-radius: 50%;
    top: 10px;
    left: 15px;
    box-shadow: 
        20px 5px 0 -2px #b8b8b8,
        8px 20px 0 -3px #c8c8c8,
        30px 23px 0 -4px #b0b0b0,
        10px 35px 0 -2px #c0c0c0,
        35px 13px 0 -1px #b8b8b8,
        23px 40px 0 -3px #c8c8c8,
        40px 30px 0 -2px #b0b0b0,
        5px 50px 0 -4px #c0c0c0,
        45px 18px 0 -1px #b8b8b8,
        33px 8px 0 -2px #c8c8c8,
        18px 55px 0 -3px #b0b0b0,
        50px 40px 0 -4px #c0c0c0,
        25px 25px 0 -2px #b8b8b8,
        43px 45px 0 -2px #c8c8c8,
        13px 13px 0 -1px #b0b0b0;
}

/* Moon surface details (smaller craters) */
.space-moon::after {
    content: "";
    position: absolute;
    background: #a8a8a8;
    height: 4px;
    width: 6px;
    display: block;
    border-radius: 50%;
    top: 18px;
    left: 23px;
    box-shadow: 
        13px 8px 0 -1px #a0a0a0,
        25px 15px 0 -2px #a8a8a8,
        5px 28px 0 -1px #a0a0a0,
        20px 33px 0 -1px #a8a8a8,
        33px 25px 0 -1px #a0a0a0,
        10px 43px 0 -2px #a8a8a8,
        28px 43px 0 -1px #a0a0a0,
        38px 35px 0 -1px #a8a8a8,
        15px 8px 0 -1px #a0a0a0,
        30px 5px 0 -1px #a8a8a8,
        40px 20px 0 -1px #a0a0a0,
        8px 13px 0 -1px #a8a8a8;
}

/* Moon orbital animation with 3D depth effect */
@keyframes moonOrbitWithDepth {
    0% {
        /* Front position - largest, in front of Earth */
        transform: rotate(0deg) translateX(600px) rotate(0deg) scale(1);
        z-index: 6;
        opacity: 1;
    }
    12.5% {
        /* Moving to the right - slightly smaller */
        transform: rotate(45deg) translateX(600px) rotate(-45deg) scale(0.95);
        z-index: 6;
        opacity: 1;
    }
    25% {
        /* Right side - smaller */
        transform: rotate(90deg) translateX(600px) rotate(-90deg) scale(0.8);
        z-index: 6;
        opacity: 0.9;
    }
    37.5% {
        /* Moving behind - getting smaller */
        transform: rotate(135deg) translateX(600px) rotate(-135deg) scale(0.65);
        z-index: 4;
        opacity: 0.7;
    }
    50% {
        /* Behind Earth - smallest, behind Earth */
        transform: rotate(180deg) translateX(600px) rotate(-180deg) scale(0.5);
        z-index: 4;
        opacity: 0.6;
    }
    62.5% {
        /* Coming from behind - getting larger */
        transform: rotate(225deg) translateX(600px) rotate(-225deg) scale(0.65);
        z-index: 4;
        opacity: 0.7;
    }
    75% {
        /* Left side - larger */
        transform: rotate(270deg) translateX(600px) rotate(-270deg) scale(0.8);
        z-index: 6;
        opacity: 0.9;
    }
    87.5% {
        /* Moving to front - almost full size */
        transform: rotate(315deg) translateX(600px) rotate(-315deg) scale(0.95);
        z-index: 6;
        opacity: 1;
    }
    100% {
        /* Back to front - full size */
        transform: rotate(360deg) translateX(600px) rotate(-360deg) scale(1);
        z-index: 6;
        opacity: 1;
    }
}

.space-motto {
    position: absolute;
    top: 20%;
    left: 5%;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    transform: rotate(-5deg);
    z-index: 5;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shooting stars */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, transparent);
    border-radius: 50%;
    animation: shooting 3s linear infinite;
}

.shooting-star:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shooting-star:nth-child(2) {
    top: 40%;
    left: 30%;
    animation-delay: 2s;
}

.shooting-star:nth-child(3) {
    top: 60%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes shooting {
    0% {
        transform: translateX(0) translateY(0) scale(0);
        opacity: 1;
    }
    10% {
        transform: translateX(20px) translateY(20px) scale(1);
        opacity: 1;
    }
    90% {
        transform: translateX(300px) translateY(300px) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translateX(400px) translateY(400px) scale(0);
        opacity: 0;
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.greeting {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.name {
    display: block;
    color: #E5C26B;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-shadow: none;
}

@keyframes glow {
    from { filter: none; }
    to   { filter: none; }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: transparent;
    color: #E5C26B;
    border-color: rgba(229, 194, 107, 0.55);
    box-shadow: none;
}

.btn-primary:hover {
    background: rgba(229, 194, 107, 0.08);
    color: #E5C26B;
    border-color: #E5C26B;
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: rgba(229, 194, 107, 0.85);
    border-color: rgba(229, 194, 107, 0.35);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(229, 194, 107, 0.06);
    color: #E5C26B;
    border-color: rgba(229, 194, 107, 0.7);
    transform: translateY(-1px);
    box-shadow: none;
}

.profile-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(100, 181, 246, 0.5);
    position: relative;
    z-index: 2;
    box-shadow:
        0 0 40px rgba(100, 181, 246, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.profile-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid rgba(100, 181, 246, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
    box-shadow: 0 0 30px rgba(100, 181, 246, 0.2);
}



.profile-decoration-inner {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rotate 30s linear infinite reverse;
}

.profile-decoration-third {
    position: absolute;
    top: -35px;
    left: -35px;
    right: -35px;
    bottom: -35px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: rotate 45s linear infinite;
    box-shadow: 0 0 25px rgba(139, 69, 19, 0.15);
}

/* Planets on orbital rings - Enhanced with realistic textures */
.planet {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mars-like planet (Red) - Matte finish */
.planet-outer {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: 
        radial-gradient(circle at 30% 20%, #cc6666 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, #b71c1c 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, #d84315 0%, transparent 30%),
        linear-gradient(135deg, #c62828, #b71c1c, #8d1e1e);
    box-shadow: 
        0 0 30px rgba(183, 28, 28, 0.4),
        0 0 60px rgba(229, 57, 53, 0.2),
        inset -4px -4px 8px rgba(0, 0, 0, 0.6),
        inset 1px 1px 3px rgba(255, 138, 128, 0.1);
}

/* Earth-like planet (Blue/Green) - Matte finish */
.planet-inner {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: 
        radial-gradient(circle at 25% 25%, #66bb6a 0%, transparent 35%),
        radial-gradient(circle at 75% 40%, #388e3c 0%, transparent 25%),
        radial-gradient(circle at 40% 75%, #1b5e20 0%, transparent 30%),
        radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 20%),
        linear-gradient(135deg, #1565c0, #0d47a1, #0a3768);
    box-shadow: 
        0 0 35px rgba(13, 71, 161, 0.3),
        0 0 70px rgba(25, 118, 210, 0.15),
        inset -4px -4px 8px rgba(0, 0, 0, 0.6),
        inset 1px 1px 3px rgba(129, 199, 132, 0.2);
}

/* Desert/Rocky planet (Brown/Orange) - Matte finish */
.planet-third {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: 
        radial-gradient(circle at 35% 30%, #d4942a 0%, transparent 40%),
        radial-gradient(circle at 65% 70%, #6d4c41 0%, transparent 35%),
        radial-gradient(circle at 20% 60%, #8d4e1b 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, #b8860b 0%, transparent 25%),
        linear-gradient(135deg, #6d4c41, #8d4e1b, #a0522d, #b8860b);
    box-shadow: 
        0 0 25px rgba(109, 76, 65, 0.4),
        0 0 50px rgba(139, 69, 19, 0.2),
        inset -4px -4px 8px rgba(0, 0, 0, 0.7),
        inset 1px 1px 3px rgba(212, 148, 42, 0.1);
}

/* Matte surface details for realistic planet appearance */
.planet::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow: 
        8px 3px 0 -2px rgba(255, 255, 255, 0.1),
        3px 8px 0 -3px rgba(255, 255, 255, 0.08),
        12px 6px 0 -4px rgba(255, 255, 255, 0.06);
}

/* Mars-like matte surface features */
.planet-outer::before {
    background: rgba(200, 120, 120, 0.2);
    box-shadow: 
        8px 3px 0 -2px rgba(180, 100, 100, 0.15),
        3px 8px 0 -3px rgba(160, 80, 80, 0.12),
        12px 6px 0 -4px rgba(200, 120, 120, 0.1),
        6px 12px 0 -3px rgba(140, 60, 60, 0.15);
}

/* Earth-like matte surface features with continents */
.planet-inner::before {
    background: rgba(150, 200, 150, 0.25);
    box-shadow: 
        8px 3px 0 -2px rgba(100, 160, 100, 0.2),
        3px 8px 0 -3px rgba(80, 140, 80, 0.18),
        12px 6px 0 -4px rgba(200, 255, 200, 0.12),
        15px 9px 0 -5px rgba(60, 120, 60, 0.15);
}

/* Desert planet matte surface features */
.planet-third::before {
    top: 2px;
    left: 2px;
    width: 5px;
    height: 5px;
    background: rgba(200, 160, 80, 0.25);
    box-shadow: 
        6px 2px 0 -2px rgba(180, 140, 60, 0.2),
        2px 6px 0 -2px rgba(140, 100, 40, 0.18),
        10px 4px 0 -3px rgba(200, 160, 80, 0.12),
        4px 10px 0 -3px rgba(120, 80, 40, 0.15);
}

/* Enhanced atmospheric effects */
.planet::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 50%, rgba(255, 255, 255, 0.15) 65%, rgba(255, 255, 255, 0.05) 80%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Mars thin atmospheric glow */
.planet-outer::after {
    background: radial-gradient(
        circle, 
        transparent 50%, 
        rgba(220, 100, 80, 0.3) 65%, 
        rgba(255, 140, 120, 0.15) 75%, 
        rgba(255, 160, 140, 0.08) 85%, 
        transparent 100%
    );
}

/* Earth thick atmospheric glow */
.planet-inner::after {
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(
        circle, 
        transparent 50%, 
        rgba(100, 180, 255, 0.4) 60%, 
        rgba(120, 200, 255, 0.25) 70%, 
        rgba(140, 220, 255, 0.15) 80%, 
        rgba(160, 240, 255, 0.08) 90%, 
        transparent 100%
    );
}

/* Desert planet dusty atmosphere */
.planet-third::after {
    background: radial-gradient(
        circle, 
        transparent 50%, 
        rgba(200, 150, 80, 0.25) 65%, 
        rgba(220, 170, 100, 0.12) 75%, 
        rgba(240, 190, 120, 0.06) 85%, 
        transparent 100%
    );
}



@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: var(--section-bg);
}

/* Beautiful About Section Links */
.about-description a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.about-description a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03));
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.about-description a:hover::before {
    opacity: 1;
    transform: scale(1.05);
}

.about-description a:hover {
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Different styling for external vs internal links */
.about-description a:not([target="_blank"])::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.about-description a:not([target="_blank"]):hover::after {
    width: 100%;
}

/* External link styling with icon */
.about-description a[target="_blank"] {
    position: relative;
    padding-right: 18px;
}

.about-description a[target="_blank"]::after {
    content: '↗';
    position: absolute;
    top: -2px;
    right: 2px;
    font-size: 0.8em;
    opacity: 0.7;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-description a[target="_blank"]:hover::after {
    opacity: 1;
    transform: translate(2px, -2px);
}

.about-description a[target="_blank"]::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.about-description a[target="_blank"]:hover::before {
    width: calc(100% - 18px);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.highlight-item i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    min-width: 24px;
}

.highlight-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.highlight-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-content: start;
    height: 100%;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

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

/* Coauthors Section */
.coauthors-section {
    grid-column: 1 / -1;
    margin-top: auto;
    margin-bottom: 0;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    align-self: end;
}

.coauthors-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.coauthors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
    line-height: 1.2;
}

.coauthor-item {
    background: transparent;
    color: var(--accent-secondary);
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--accent-secondary);
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.coauthor-item:hover {
    background: var(--accent-secondary);
    color: var(--bg-color);
    box-shadow: none;
}

.coauthor-item a {
    color: inherit !important;
    text-decoration: none !important;
    display: block;
    width: 100%;
    height: 100%;
}

.coauthor-loading {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    width: 100%;
}


/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Research cards — editorial sketch style */
.research-card {
    background: var(--bg-color);
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: border-color 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.research-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--text-muted);
}

.research-card .rc-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    min-height: 110px;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.research-sketch {
    width: 100%;
    max-width: 240px;
    height: auto;
    color: var(--accent-line);
    display: block;
}

.research-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    padding: 1.25rem 1.75rem 0.5rem;
}

.research-card p {
    color: var(--text-muted);
    margin: 0;
    padding: 0 1.75rem 1.25rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.research-tags {
    list-style: none;
    margin: 0;
    padding: 0 1.75rem 1.5rem;
    font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.research-tags li {
    display: inline;
}

.research-tags li:not(:last-child)::after {
    content: ' · ';
    color: var(--text-subtle);
    font-style: normal;
}

/* Legacy decorative icon — hidden in the sketch redesign */
.research-icon { display: none; }

/* GitHub Pages projects (API-driven carousel) */
.github-projects {
    padding: 5rem 0;
    background: var(--section-bg);
}

.github-projects-root {
    max-width: 900px;
    margin: 0 auto;
}

.github-projects-root > .github-projects-message {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem 1rem;
}

.github-projects-error {
    color: #b91c1c !important;
    font-style: normal !important;
}

/* GitHub Projects carousel — same editorial layout as Publications */

.github-projects-carousel {
    outline: none;
}

.github-projects-carousel:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-soft);
    border-radius: 12px;
}

.github-carousel-row {
    position: relative;
    margin-bottom: 1.25rem;
}

.github-projects-viewport {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    min-height: 360px;
}
.github-projects-viewport::-webkit-scrollbar { display: none; }

.github-projects-message {
    flex: 0 0 100%;
    text-align: center;
    color: var(--text-muted);
    padding: 4rem 1rem;
    font-size: 0.95rem;
    font-style: italic;
}

.github-project-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-sizing: border-box;
    padding: 2.5rem 4.5rem;
    display: grid;
    grid-template-columns: 1fr minmax(180px, 280px);
    gap: 2.5rem;
    align-items: center;
}

.github-project-slide-figure { order: 2; }
.github-project-slide-content { order: 1; }

.github-project-slide-figure {
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--border-color);
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.github-project-slide-figure-placeholder {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
}

.github-project-slide-name-acronym {
    font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.04em;
    line-height: 1.05;
}

.github-project-slide-figure-year {
    font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--accent-secondary);
}

/* Live preview iframe — sits on top of placeholder, scaled-down full-width render */
.github-project-slide-iframe-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #ffffff;
    pointer-events: none;
    z-index: 1;
}

.github-project-slide-iframe {
    /* Iframe renders at 4× the wrap dimensions so the site sees a desktop
       viewport, then shrinks to fit. transform-origin top-left keeps the
       hero anchored to the top-left of the figure box. */
    width: 400%;
    height: 400%;
    transform: scale(0.25);
    transform-origin: top left;
    border: 0;
    display: block;
    pointer-events: none;
    background: #ffffff;
}

.github-project-slide-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.github-project-slide-meta {
    font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--accent-secondary);
    margin: 0;
    letter-spacing: 0.01em;
}

.github-project-slide-title {
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.github-project-slide-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0.25rem 0 0;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.github-project-slide-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    margin: 0.25rem 0 0;
}

.github-project-slide-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    line-height: 1;
}

.github-project-slide-stat i {
    font-size: 0.95rem;
    color: var(--accent-secondary);
}

.github-project-slide-stat-value {
    color: var(--text-color);
    font-weight: 500;
}

.github-project-slide-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
}

.github-project-slide-topic {
    font-size: 0.78rem;
    line-height: 1;
    padding: 0.32rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-muted);
    background: transparent;
    letter-spacing: 0.01em;
}

.github-project-slide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.github-project-slide-repo-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

.github-project-slide-links {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Arrow buttons */
.github-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.github-carousel-btn:hover:not(:disabled) {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}
.github-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.github-carousel-prev { left: 12px; }
.github-carousel-next { right: 12px; }

/* Footer (dots + counter) */
.github-carousel-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.github-carousel-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}
.github-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.github-carousel-dot:hover {
    background: var(--text-subtle);
}
.github-carousel-dot-active {
    background: var(--accent-primary);
    transform: scale(1.2);
}
.github-carousel-counter {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin: 0;
}

.github-carousel-single .github-carousel-btn,
.github-carousel-single .github-carousel-dots {
    display: none;
}

@media (max-width: 820px) {
    .github-project-slide {
        grid-template-columns: 1fr;
        padding: 1.75rem 2.75rem;
        gap: 1.5rem;
    }
    .github-project-slide-figure {
        max-width: 280px;
        margin: 0 auto;
    }
    .github-carousel-btn {
        width: 36px;
        height: 36px;
    }
    .github-carousel-prev { left: 6px; }
    .github-carousel-next { right: 6px; }
}

@media (max-width: 480px) {
    .github-project-slide {
        padding: 1.5rem 1rem;
    }
    .github-project-slide-title {
        font-size: 1.2rem;
    }
}



/* Publications Section */
.publications-content {
    max-width: 900px;
    margin: 0 auto;
}

.publication-controls {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 20px;
    align-items: center;
}

.publication-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.publication-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 500;
}

.sort-dropdown {
    padding: 8px 15px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sort-dropdown:hover {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
}

.sort-dropdown option {
    background: var(--accent-primary);
    color: white;
}

.publication-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 10px 40px 10px 15px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
    width: 200px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.clear-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    color: white;
    background: rgba(255,255,255,0.2);
}

.results-counter {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.results-counter span {
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.filter-btn.active {
    background: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,1);
    color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(255,255,255,0.3);
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03));
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.pagination-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}

.pagination-btn:disabled {
    background: var(--text-subtle);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-info {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-primary);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Scrollable Publications Container */
.publications-container {
    max-height: 600px;
    overflow-y: auto;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

/* Custom Scrollbar */
.publications-container::-webkit-scrollbar {
    width: 8px;
}

.publications-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.publications-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
}

.publications-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.publication-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.publication-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.publication-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pub-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.publication-item:hover .pub-thumbnail {
    transform: scale(1.05);
}

.publication-content {
    flex: 1;
    min-width: 0; /* Allow content to shrink */
}

.publication-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.publication-authors {
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.publication-venue {
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.publication-abstract {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.publication-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--section-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pub-link:hover {
    background: var(--accent-primary);
    color: white;
}

/* Contact Section */
.contact {
    background: var(--bg-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h4 {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-muted);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--border-color);
    color: var(--text-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

#last-updated {
    color: var(--text-subtle);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    overflow: visible;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--text-color);
    transform: translateY(-2px) scale(1.1);
}

/* Mini Rocket for Back-to-Top */
.mini-rocket {
    position: relative;
    width: 20px;
    height: 40px;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.back-to-top:hover .mini-rocket {
    transform: scale(1.1);
    animation: miniRocketHover 0.6s ease;
}

.back-to-top.launching .mini-rocket {
    animation: rocketLaunch 2s ease-out forwards;
    z-index: 9999;
}

@keyframes miniRocketHover {
    0% { transform: scale(1.1) translateY(0px); }
    50% { transform: scale(1.1) translateY(-3px); }
    100% { transform: scale(1.1) translateY(0px); }
}

@keyframes rocketLaunch {
    0% { 
        transform: scale(1.1) translateY(0px);
        opacity: 1;
    }
    10% { 
        transform: scale(1.2) translateY(-20px);
        opacity: 1;
    }
    30% { 
        transform: scale(1.3) translateY(-100vh);
        opacity: 0.8;
    }
    70% { 
        transform: scale(1.4) translateY(-120vh);
        opacity: 0.5;
    }
    100% { 
        transform: scale(1.5) translateY(-150vh);
        opacity: 0;
    }
}

/* Mini Rocket Body */
.mini-rocket-body {
    position: absolute;
    width: 20px;
    height: 40px;
    background: linear-gradient(180deg, #dadada 0%, #b8b8b8 100%);
    border-top-left-radius: 100%;
    border-top-right-radius: 100%;
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    border-top: 2px solid #f5f5f5;
    box-shadow:
        inset -2px 0 4px rgba(0,0,0,0.1),
        0 0 8px rgba(0,0,0,0.2);
}

.mini-rocket-body::before {
    content: '';
    position: absolute;
    left: calc(50% - 4px);
    width: 8px;
    height: 2px;
    background-color: #554842;
    bottom: -2px;
    border-bottom-right-radius: 60%;
    border-bottom-left-radius: 60%;
}

/* Mini Rocket Window */
.mini-rocket-window {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 100%;
    background: radial-gradient(circle at 30% 30%, #87ceeb, #4682b4);
    left: calc(50% - 6px);
    top: 6px;
    border: 1px solid #b4b2b2;
    box-shadow:
        inset 0 0 4px rgba(255,255,255,0.6),
        0 0 2px rgba(0,0,0,0.2);
}

/* Mini Rocket Fins */
.mini-rocket-fin-left {
    position: absolute;
    left: -5px;
    top: calc(100% - 15px);
    height: 15px;
    width: 15px;
    background: linear-gradient(135deg, #a75248, #8b4238);
    border-top-left-radius: 80%;
    border-bottom-left-radius: 20%;
    z-index: -1;
    box-shadow: inset -2px -2px 3px rgba(0,0,0,0.3);
}

.mini-rocket-fin-right {
    position: absolute;
    right: -5px;
    top: calc(100% - 15px);
    height: 15px;
    width: 15px;
    background: linear-gradient(45deg, #a75248, #8b4238);
    border-top-right-radius: 80%;
    border-bottom-right-radius: 20%;
    z-index: -1;
    box-shadow: inset 2px -2px 3px rgba(0,0,0,0.3);
}

/* Mini Rocket Exhaust */
.mini-rocket-exhaust {
    position: absolute;
    top: 100%;
    left: calc(50% - 5px);
    width: 10px;
    height: 25px;
    background: linear-gradient(180deg,
        rgba(255,100,100,0.9) 0%,
        rgba(255,150,50,0.8) 30%,
        rgba(255,200,100,0.6) 60%,
        transparent 100%);
    border-radius: 0 0 50% 50%;
    animation: miniExhaust 0.3s ease-in-out infinite alternate;
    transition: all 0.3s ease;
}

.back-to-top.launching .mini-rocket-exhaust {
    animation: launchExhaust 2s ease-out forwards;
    z-index: 9998;
}

@keyframes miniExhaust {
    0% { height: 22px; opacity: 0.8; }
    100% { height: 28px; opacity: 1; }
}

@keyframes launchExhaust {
    0% { 
        height: 25px; 
        width: 10px;
        opacity: 0.9;
    }
    10% { 
        height: 50px; 
        width: 15px;
        opacity: 1;
    }
    30% { 
        height: 200px; 
        width: 20px;
        opacity: 0.9;
    }
    60% { 
        height: 400px; 
        width: 25px;
        opacity: 0.7;
    }
    80% { 
        height: 600px; 
        width: 30px;
        opacity: 0.5;
    }
    100% { 
        height: 800px; 
        width: 35px;
        opacity: 0.2;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.03);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Center dark mode button on mobile */
    .nav-container {
        position: relative;
    }

    .nav-controls {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .profile-img {
        width: 250px;
        height: 250px;
    }

    /* Hide complex space elements on mobile for better performance and clarity */
    .space-earth,
    .space-moon {
        display: none !important;
    }

    /* Adjust space motto positioning for mobile */
    .space-motto {
        top: 10%;
        left: 50%;
        transform: translateX(-50%) rotate(0deg);
        font-size: 1.5rem;
        text-align: center;
        width: 90%;
    }

    /* Make rocket smaller on mobile */
    .space-rocket {
        width: 45px;
        height: 90px;
        top: 18%;
        right: 8%;
    }

    .space-rocket .rocket-body {
        width: 45px;
        height: 90px;
    }

    .space-rocket .rocket-window {
        width: 30px;
        height: 30px;
        left: calc(50% - 15px);
        top: 15px;
    }

    .space-rocket .rocket-fin-left,
    .space-rocket .rocket-fin-right {
        height: 35px;
        width: 34px;
        top: calc(100% - 35px);
    }

    .space-rocket .rocket-fin-left {
        left: -11px;
    }

    .space-rocket .rocket-fin-right {
        right: -11px;
    }

    .space-rocket .rocket-exhaust {
        width: 21px;
        height: 60px;
        left: calc(50% - 10.5px);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Mobile responsive publication controls */
    .publication-controls {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .publication-filters {
        gap: 0.5rem;
        justify-content: center;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .publication-search {
        justify-content: center;
    }

    .search-input {
        width: 100%;
        max-width: 280px;
    }

    .publication-sort {
        justify-content: center;
    }

    .results-counter {
        text-align: center;
    }

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

    section {
        padding: 3rem 0;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }

    /* Further simplify space elements for very small screens */
    .space-rocket {
        width: 35px;
        height: 70px;
        top: 20%;
        right: 5%;
    }

    .space-rocket .rocket-body {
        width: 35px;
        height: 70px;
    }

    .space-rocket .rocket-window {
        width: 24px;
        height: 24px;
        left: calc(50% - 12px);
        top: 12px;
    }

    .space-rocket .rocket-fin-left,
    .space-rocket .rocket-fin-right {
        height: 28px;
        width: 26px;
        top: calc(100% - 28px);
    }

    .space-rocket .rocket-fin-left {
        left: -9px;
    }

    .space-rocket .rocket-fin-right {
        right: -9px;
    }

    .space-rocket .rocket-exhaust {
        width: 18px;
        height: 45px;
        left: calc(50% - 9px);
    }

    .space-motto {
        font-size: 1.2rem;
        letter-spacing: 1px;
        top: 8%;
    }

    /* Reduce shooting stars on very small screens */
    .shooting-star:nth-child(3) {
        display: none;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }



    .publication-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pub-link, .detail-toggle-btn {
        justify-content: center;
    }
}

/* Animation for elements coming into view */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Responsive Pagination Design */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    /* Responsive publication images */
    .publication-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .publication-image {
        align-self: center;
        width: 100px;
        height: 67px;
    }
    
    .publication-content {
        text-align: left;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .pagination-info {
        font-size: 14px;
        order: -1;
    }

    .publications-container {
        max-height: 500px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .pagination-controls {
        padding: 12px;
        gap: 12px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .pagination-info {
        font-size: 13px;
    }

    .publications-container {
        max-height: 400px;
        padding: 12px;
    }

    .publication-links {
        flex-direction: column;
        gap: 0.4rem;
    }

    .pub-link, .detail-toggle-btn {
        justify-content: center;
        padding: 0.6rem 1rem;
    }

    /* Extra small screen adjustments for publication controls */
    .publication-controls {
        padding: 15px;
        gap: 12px;
    }

    .search-input {
        max-width: 250px;
        font-size: 14px;
    }

    .filter-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.85rem;
    }

    .sort-dropdown {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Timeline Section - Interactive Design */
.timeline {
    background: var(--section-bg);
    color: var(--text-color);
    padding: 100px 0;
    position: relative;
}

/* Timeline Navigation */
.timeline-nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem auto 4rem auto;
    max-width: 800px;
    padding: 0 60px;
}

.timeline-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-primary) 100%);
    border-radius: 2px;
    z-index: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.timeline-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    min-height: 100px;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.timeline-nav-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.timeline-nav-btn.active {
    border-color: var(--accent-primary);
    /* background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03)); */
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.10);
    transform: scale(1.1);
}

.nav-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.3rem;
}

.nav-icon.industry {
    background: var(--text-color);
}

.nav-icon.academic {
    background: var(--text-muted);
}

.nav-text {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-color);
    text-align: center;
    line-height: 1.2;
}

.nav-year {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

/* Timeline Content */
.timeline-content-wrapper {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.timeline-content-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.timeline-content-item.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.timeline-main-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.timeline-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--section-bg);
}

.company-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.company-icon.industry {
    background: var(--text-color);
}

.company-icon.academic {
    background: var(--text-muted);
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.company-role {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.company-period {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-content {
    line-height: 1.6;
}

.company-description {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.company-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

.tag.industry {
    background: var(--text-color);
    color: white;
}

.tag.academic {
    background: var(--text-muted);
    color: white;
}



/* Responsive Design for Interactive Timeline */
@media (max-width: 768px) {
    .timeline {
        padding: 60px 0;
    }
    
    .timeline-nav {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 20px;
        max-width: 400px;
    }
    
    .timeline-nav::before {
        display: none;
    }
    
    .timeline-nav-btn {
        min-width: 80px;
        min-height: 80px;
        padding: 0.75rem;
    }
    
    .nav-icon {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .nav-text {
        font-size: 0.7rem;
    }
    
    .nav-year {
        font-size: 0.65rem;
    }
    
    .timeline-main-card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .company-name {
        font-size: 1.5rem;
    }
    
    .company-role {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .timeline {
        padding: 40px 0;
    }
    
    .timeline-nav {
        grid-template-columns: 1fr;
    }
    
    .timeline-main-card {
        padding: 1rem;
    }
    
    .company-name {
        font-size: 1.3rem;
    }
    
    .company-description {
        font-size: 0.9rem;
    }
    
    .company-tags {
        justify-content: center;
    }
    
    .control-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Smooth transitions for better UX */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}



/* Enhanced Publication Styles */
.publication-citations {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.publication-citations i {
    color: var(--accent-primary);
}

.publication-item .publication-authors strong {
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 1px solid var(--text-color);
}

/* Paper Details Styles (TL;DR and Abstract) */
.paper-details-section {
    margin: 1rem 0;
}

.detail-buttons {
    display: contents; /* This makes the buttons flow directly into the parent flex container */
}

.detail-toggle-btn {
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
}

.detail-toggle-btn:hover {
    transform: translateY(-2px);
}

.detail-toggle-btn i {
    font-size: 0.8rem;
}

/* TL;DR Button */
.tldr-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.tldr-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Abstract Button */
.abstract-btn {
    background: var(--text-color);
}

.abstract-btn:hover {
    box-shadow: none;
}

.detail-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    margin-top: 0.5rem;
}

.detail-content.show {
    max-height: 300px;
    opacity: 1;
}

.detail-text {
    background: transparent;
    border-left: 2px solid var(--border-color);
    padding: 1rem;
    border-radius: 0;
    line-height: 1.5;
    color: var(--text-color);
}

/* PDF Button */
.pdf-link {
    background: var(--text-color);
    color: white !important;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pdf-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: white !important;
}

/* Abstract specific styling */
.abstract-content .detail-text {
    background: transparent;
    border-left: 2px solid var(--border-color);
}

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

.abstract-content .detail-text strong {
    color: var(--text-color);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Dark Mode Specific Styles */
body.dark-mode .publication-item {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    box-shadow: 0 2px 10px var(--shadow-color);
}

body.dark-mode .publication-item h4 {
    color: #f0f0f0 !important;
}

body.dark-mode .publication-authors {
    color: #b3b3b3 !important;
}

body.dark-mode .publication-venue {
    color: var(--accent-primary) !important;
}

body.dark-mode .publication-citations {
    color: #a1a1aa !important;
}

body.dark-mode .stat-item {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    box-shadow: 0 2px 10px var(--shadow-color);
}

body.dark-mode .research-card {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    box-shadow: 0 2px 10px var(--shadow-color);
}

body.dark-mode .research-card h3 {
    color: #f0f0f0 !important;
}

/* Timeline Dark Mode Styles */
body.dark-mode .timeline {
    background: var(--section-bg) !important;
    color: var(--text-color) !important;
}

body.dark-mode .timeline-nav-btn {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

body.dark-mode .timeline-nav-btn:hover {
    border-color: var(--accent-primary) !important;
}

body.dark-mode .timeline-nav-btn.active {
    border-color: var(--accent-primary) !important;
    /* background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.1)) !important; */
}

body.dark-mode .nav-text {
    color: #f0f0f0 !important;
}

body.dark-mode .nav-year {
    color: #a1a1aa !important;
}

body.dark-mode .timeline-main-card {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

body.dark-mode .company-name {
    color: #f0f0f0 !important;
}

body.dark-mode .company-role {
    color: var(--accent-primary) !important;
}

body.dark-mode .company-period {
    color: #a1a1aa !important;
}

body.dark-mode .company-description {
    color: #b3b3b3 !important;
}


body.dark-mode .contact {
    background: var(--section-bg) !important;
    color: var(--text-color) !important;
}

body.dark-mode .contact-item {
    background: transparent !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
    border-radius: 12px !important;
}

body.dark-mode .contact-item h4 {
    color: #f0f0f0 !important;
}


body.dark-mode .footer {
    background: var(--section-bg) !important;
    color: var(--text-color) !important;
}

body.dark-mode .hero {
    background: var(--bg-color) !important;
    color: var(--text-color) !important;
}

body.dark-mode .hero-title .name {
    color: #f0f0f0 !important;
}

body.dark-mode .hero-description {
    color: #b3b3b3 !important;
}

body.dark-mode .research {
    background: var(--bg-color) !important;
    color: var(--text-color) !important;
}

body.dark-mode .github-projects {
    background: var(--section-bg) !important;
    color: var(--text-color) !important;
}

body.dark-mode .github-projects-viewport {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 4px 24px var(--shadow-color) !important;
}

body.dark-mode .github-project-slide-stat,
body.dark-mode .github-project-slide-topic {
    color: var(--text-muted) !important;
}

body.dark-mode .github-project-slide-stat i {
    color: var(--accent-secondary) !important;
}

body.dark-mode .github-project-slide-stat-value {
    color: var(--text-color) !important;
}

body.dark-mode .github-project-slide-topic {
    border-color: var(--border-color) !important;
}

body.dark-mode .github-carousel-btn {
    background: rgba(37, 43, 58, 0.95) !important;
    border-color: var(--border-color) !important;
    color: var(--accent-secondary) !important;
}

body.dark-mode .github-carousel-btn:hover:not(:disabled) {
    background: var(--card-bg) !important;
}

body.dark-mode .github-carousel-dot {
    background: var(--text-color) !important;
}

body.dark-mode .github-carousel-dot:hover {
    background: var(--text-muted) !important;
}

body.dark-mode .github-carousel-dot-active {
    background: var(--accent-primary) !important;
}

body.dark-mode .github-carousel-counter {
    color: #a1a1aa !important;
}

body.dark-mode .github-project-meta,
body.dark-mode .github-projects-root > .github-projects-message {
    color: #a1a1aa !important;
}

body.dark-mode .github-project-lang {
    color: var(--accent-secondary) !important;
}

body.dark-mode .github-project-card .btn-secondary {
    color: var(--border-color) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .github-project-card .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--bg-color) !important;
    border-color: var(--accent-primary) !important;
}

body.dark-mode .publications {
    background: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Dark mode publication container */
body.dark-mode .publications-container {
    background: linear-gradient(135deg, rgba(37, 43, 58, 0.9), rgba(26, 31, 46, 0.9)) !important;
}

body.dark-mode .section-title {
    color: #f0f0f0 !important;
}

body.dark-mode .section-subtitle {
    color: #b3b3b3 !important;
}

/* Form elements in dark mode */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #888 !important;
}

/* Filter buttons in dark mode */
body.dark-mode .filter-btn {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .filter-btn.active {
    background: var(--accent-primary) !important;
    color: white !important;
}

/* Navigation links in dark mode */
body.dark-mode .nav-link {
    color: var(--text-color) !important;
}

body.dark-mode .nav-logo h2 {
    color: var(--accent-primary) !important;
}

/* Coauthors section in dark mode */
body.dark-mode .coauthors-section {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
}

body.dark-mode .coauthors-title {
    color: #f0f0f0 !important;
}

body.dark-mode .coauthor-item {
    background: transparent !important;
    color: var(--accent-secondary) !important;
    border-color: var(--accent-secondary) !important;
}

body.dark-mode .coauthor-item:hover {
    background: var(--accent-secondary) !important;
    color: var(--bg-color) !important;
}

body.dark-mode .coauthor-item a {
    color: inherit !important;
}



/* Additional elements with white backgrounds */
body.dark-mode .highlight-item {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
}

body.dark-mode .highlight-item h4 {
    color: #f0f0f0 !important;
}

body.dark-mode .contact-form {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: var(--section-bg) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
}

/* About section descriptions */
body.dark-mode .about-description {
    color: #b3b3b3 !important;
}

/* Publication controls */
body.dark-mode .publication-controls {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%) !important;
}

/* Pagination controls */
body.dark-mode .pagination-controls {
    color: var(--text-color) !important;
}

body.dark-mode .pagination-btn {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .pagination-btn:disabled {
    background: var(--section-bg) !important;
    color: #666 !important;
}

/* Search input */
body.dark-mode .search-input {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* Sort dropdown */
body.dark-mode .sort-dropdown {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* Results counter */
body.dark-mode .results-counter {
    color: var(--text-color) !important;
}

/* Additional comprehensive dark mode fixes */
body.dark-mode .back-to-top {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}


/* Ensure all text elements are visible */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #f0f0f0 !important;
}

body.dark-mode p {
    color: var(--text-color) !important;
}

/* Footer content */
body.dark-mode .footer-content {
    color: var(--text-color) !important;
}

/* Any remaining white divs */
body.dark-mode div[style*="background: white"],
body.dark-mode div[style*="background-color: white"],
body.dark-mode div[style*="background:#ffffff"],
body.dark-mode div[style*="background-color:#ffffff"] {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
}

/* TL;DR and Abstract dark mode fixes */
body.dark-mode .detail-text {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.05)) !important;
    color: var(--text-color) !important;
    border-left: 3px solid var(--accent-primary) !important;
}

body.dark-mode .abstract-content .detail-text {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2)) !important;
    color: var(--text-color) !important;
    border-left: 3px solid var(--accent-primary) !important;
}

body.dark-mode .detail-text strong {
    color: var(--accent-primary) !important;
}

body.dark-mode .abstract-content .detail-text strong {
    color: var(--accent-primary) !important;
}


/* ================================================================
   TOPIC-SPECIFIC THEME ELEMENTS
   ================================================================ */

/* ---- 1. CARDIAC MRI — ECG heartbeat ---- */

.research-card-cardiac {
    position: relative;
    overflow: hidden;
    border-color: rgba(167, 82, 72, 0.3) !important;
}

.research-card-cardiac:hover {
    border-color: rgba(167, 82, 72, 0.55) !important;
    box-shadow: 0 20px 40px rgba(167, 82, 72, 0.12) !important;
}

/* ECG trace sweeping across the card bottom */
.cardiac-ecg-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
    pointer-events: none;
    opacity: 0.18;
}

.ecg-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 800px;
    height: 50px;
    animation: ecgScroll 1.2s linear infinite;
}

.ecg-path {
    stroke: #a75248; /* rocket-fin terracotta */
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes ecgScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-400px); }
}

/* Cardiac icon — red gradient + beating heart */
.cardiac-icon {
    background: var(--text-color) !important;
    overflow: visible !important;
    position: relative;
}

.cardiac-heart-beat {
    animation: heartBeat 1.2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    14%       { transform: scale(1.35); }
    28%       { transform: scale(1.05); }
    42%       { transform: scale(1.2); }
    70%       { transform: scale(1); }
}

/* Expanding pulse rings synced to the heartbeat */
.heart-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    pointer-events: none;
}

.heart-pulse-ring.r1 { animation: heartRing 1.2s ease-out infinite; }
.heart-pulse-ring.r2 { animation: heartRing 1.2s ease-out 0.6s infinite; }

@keyframes heartRing {
    0%   { transform: scale(1);   opacity: 0.75; }
    100% { transform: scale(2.6); opacity: 0; }
}

body.dark-mode .cardiac-ecg-bg { opacity: 0.28; }

/* ---- 2. GENERATIVE AI — Neural Network ---- */

.genai-icon {
    background: var(--text-color) !important;
    overflow: visible !important;
}

.neural-net-svg {
    width: 42px;
    height: 42px;
}

.nn-conn {
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 1.2;
    fill: none;
    stroke-dasharray: 3 2;
    animation: nnConnFlow 1.8s linear infinite;
}

.nc1 { animation-delay: 0.0s; }
.nc2 { animation-delay: 0.2s; }
.nc3 { animation-delay: 0.4s; }
.nc4 { animation-delay: 0.6s; }
.nc5 { animation-delay: 0.8s; }
.nc6 { animation-delay: 1.0s; }
.nc7 { animation-delay: 0.3s; }
.nc8 { animation-delay: 0.7s; }
.nc9 { animation-delay: 1.1s; }

@keyframes nnConnFlow {
    0%   { stroke-dashoffset: 0;   opacity: 0.35; }
    50%  {                          opacity: 0.9; }
    100% { stroke-dashoffset: -15; opacity: 0.35; }
}

.nn-node {
    fill: rgba(255, 255, 255, 0.9);
    animation: nnNodeGlow 1.8s ease-in-out infinite;
}

.nni1 { animation-delay: 0.0s; }
.nni2 { animation-delay: 0.3s; }
.nnh1 { animation-delay: 0.6s; }
.nnh2 { animation-delay: 0.9s; }
.nnh3 { animation-delay: 1.2s; }
.nno1 { animation-delay: 1.5s; }

@keyframes nnNodeGlow {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* Speed up on card hover */
.research-card-genai:hover .nn-conn { animation-duration: 0.9s; }
.research-card-genai:hover .nn-node { animation-duration: 0.9s; }

/* ---- 3. TOKENIZATION — Data compression ---- */

.token-icon {
    background: var(--text-color) !important;
}

.token-svg {
    width: 42px;
    height: 42px;
}

/* Input blocks pulse in sequence like data streaming in */
.tok-blk { fill: rgba(255, 255, 255, 0.88); }

.tb1 { animation: tokFlow 2s ease-in-out 0.0s infinite; }
.tb2 { animation: tokFlow 2s ease-in-out 0.2s infinite; }
.tb3 { animation: tokFlow 2s ease-in-out 0.4s infinite; }
.tb4 { animation: tokFlow 2s ease-in-out 0.6s infinite; }

@keyframes tokFlow {
    0%, 100% { opacity: 0.45; }
    30%       { opacity: 1; }
    60%       { opacity: 0.7; }
}

/* Arrow flashes when data "compresses" */
.tok-arrow {
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: tokArrowPulse 2s ease-in-out 0.8s infinite;
}

@keyframes tokArrowPulse {
    0%, 100% { opacity: 0.45; }
    50%       { opacity: 1; }
}

/* Output blocks — outline style, glow when filled */
.tok-out {
    fill: none;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.5;
}

.to1 { animation: tokOutPulse 2s ease-in-out 1.1s infinite; }
.to2 { animation: tokOutPulse 2s ease-in-out 1.4s infinite; }

@keyframes tokOutPulse {
    0%, 100% { opacity: 0.35; stroke-width: 1;   }
    55%       { opacity: 1;    stroke-width: 2;   }
}

/* ---- 4. HIGH-OCTANE MOTORSPORTS — Formula Student Car ---- */

/* ---- SVG Formula 1 Car ---- */

.fc-icon-wrap {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-nav-wrap {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG sizing */
.fc-car-svg {
    display: block;
    overflow: visible;
}

.fc-car-large {
    width: 66px;
    height: 44px;
}

.fc-car-mini {
    width: 33px;
    height: 22px;
}

/* SVG shape fills */
.fc-white  { fill: rgba(255, 255, 255, 0.92); }
.fc-dark   { fill: rgba(0,   0,   0,   0.30); }
.fc-accent { fill: rgba(255, 255, 255, 0.70); }

/* Halo — stroke only */
.fc-halo {
    fill: none;
    stroke: rgba(255, 255, 255, 0.80);
    stroke-width: 2.2;
    stroke-linecap: round;
}

/* Wheels — exposed open-wheel look */
.fc-wheel {
    fill: rgba(255, 255, 255, 0.12);
    stroke: rgba(255, 255, 255, 0.90);
    stroke-width: 2.2;
}

/* Hub centre */
.fc-hub {
    fill: rgba(255, 255, 255, 0.55);
}

/* Speed / motion blur lines */
.fc-speed-line {
    stroke: rgba(255, 255, 255, 0.80);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0;
    animation: fcSpeedLine 0.85s linear infinite;
}

.sl1 { animation-delay: 0.00s; }
.sl2 { animation-delay: 0.22s; }
.sl3 { animation-delay: 0.44s; }

@keyframes fcSpeedLine {
    0%   { transform: translateX(0);    opacity: 0; }
    15%  { opacity: 1; }
    80%  { opacity: 0.75; }
    100% { transform: translateX(72px); opacity: 0; }
}

/* ---- 5. TUM.ai — AI Constellation ---- */

/* Company icon (70 × 70 circle) */
.cn-icon-wrap {
    position: relative;
}

/* SVG connection lines overlay */
.cn-svg {
    position: absolute;
    top: 0; left: 0;
    width: 70px; height: 70px;
    pointer-events: none;
}

.cn-line {
    stroke: rgba(255, 255, 255, 0.42);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 3 2;
    animation: cnLinePulse 2.5s linear infinite;
}

.cnl1 { animation-delay: 0.00s; }
.cnl2 { animation-delay: 0.36s; }
.cnl3 { animation-delay: 0.72s; }
.cnl4 { animation-delay: 1.08s; }
.cnl5 { animation-delay: 1.44s; }
.cnl6 { animation-delay: 1.80s; }
.cnl7 { animation-delay: 2.16s; }

@keyframes cnLinePulse {
    0%   { stroke-dashoffset: 0;   opacity: 0.3; }
    50%  {                          opacity: 0.85; }
    100% { stroke-dashoffset: -20; opacity: 0.3; }
}

/* Star-nodes — pulse like actual stars */
.cn-node {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
    animation: cnNodeTwinkle 2.5s ease-in-out infinite;
}

.cn1 { width: 8px;  height: 8px;  left: 14px; top: 22px; animation-delay: 0.0s; }
.cn2 { width: 8px;  height: 8px;  left: 14px; top: 48px; animation-delay: 0.5s; }
.cn3 { width: 7px;  height: 7px;  left: 35px; top: 14px; animation-delay: 1.0s; }
.cn4 { width: 10px; height: 10px; left: 35px; top: 35px; animation-delay: 1.5s; }
.cn5 { width: 7px;  height: 7px;  left: 35px; top: 56px; animation-delay: 2.0s; }
.cn6 { width: 10px; height: 10px; left: 56px; top: 35px; animation-delay: 2.5s; }

@keyframes cnNodeTwinkle {
    0%, 100% { opacity: 0.55; box-shadow: 0 0 0   0   rgba(255,255,255,0); }
    50%       { opacity: 1;   box-shadow: 0 0 8px 3px rgba(255,255,255,0.45); }
}

/* Nav button mini constellation (35 × 35 circle) */
.cn-nav-wrap {
    position: relative;
}

.cn-nav-svg {
    position: absolute;
    top: 0; left: 0;
    width: 35px; height: 35px;
    pointer-events: none;
}

.cn-nav-line {
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 2 2;
    animation: cnLinePulse 2s linear infinite;
}

.cn-nav-node {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
    animation: cnNodeTwinkle 2s ease-in-out infinite;
}

.cnn1 { width: 5px; height: 5px; left: 8px;  top: 10px; animation-delay: 0.0s; }
.cnn2 { width: 5px; height: 5px; left: 8px;  top: 26px; animation-delay: 0.5s; }
.cnn3 { width: 6px; height: 6px; left: 18px; top: 18px; animation-delay: 1.0s; }
.cnn4 { width: 5px; height: 5px; left: 28px; top: 18px; animation-delay: 0.3s; }

/* ================================================================
   FULL-WIDTH CARD HEADERS WITH 3D POLYGON ILLUSTRATIONS
   ================================================================ */

/* Legacy decorative-header rules kept neutral; sketch headers use the
   plain transparent .rc-header above. */
.rc-header-cardiac,
.rc-header-genai,
.rc-header-token { background: transparent; }

/* ---- Polygonal 3D Heart ---- */

.poly-heart-wrap {
    position: relative;
    z-index: 2;
    animation: polyHeartBeat 4s ease-in-out infinite;
}

.poly-heart-svg {
    width: 155px;
    height: 135px;
    display: block;
}

/* Combined heartbeat pulse + gentle 3-D rock */
@keyframes polyHeartBeat {
    0%         { transform: perspective(600px) rotateY(-18deg) rotateX(8deg)  scale(1);    }
    8%         { transform: perspective(600px) rotateY(-14deg) rotateX(10deg) scale(1.10); }
    16%        { transform: perspective(600px) rotateY(-16deg) rotateX(8deg)  scale(1.02); }
    24%        { transform: perspective(600px) rotateY(-12deg) rotateX(9deg)  scale(1.07); }
    48%        { transform: perspective(600px) rotateY(10deg)  rotateX(-5deg) scale(1.01); }
    100%       { transform: perspective(600px) rotateY(-18deg) rotateX(8deg)  scale(1);    }
}

/* ECG trace sits at the bottom of the cardiac header */
.rc-header-cardiac .cardiac-ecg-bg {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50px;
    overflow: hidden;
    opacity: 0.25;
    pointer-events: none;
}

/* ---- Polygonal 3D Neural Network ---- */

.poly-nn-wrap {
    position: relative;
    z-index: 2;
    animation: polyNNFloat 7s ease-in-out infinite;
}

.poly-nn-svg {
    width: 220px;
    height: 180px;
    display: block;
}

@keyframes polyNNFloat {
    0%, 100% { transform: perspective(600px) rotateY(-14deg) rotateX(6deg); }
    50%       { transform: perspective(600px) rotateY(14deg)  rotateX(-6deg); }
}

/* Connection lines — animated signal flow, earth-ocean blue tint */
.nn3d-conn {
    stroke: rgba(51, 128, 181, 0.45);
    stroke-width: 1;
    stroke-dasharray: 5 4;
    animation: nn3dSignal 2.4s linear infinite;
}

.nc1  { animation-delay: 0.0s; } .nc2  { animation-delay: 0.2s; }
.nc3  { animation-delay: 0.4s; } .nc4  { animation-delay: 0.6s; }
.nc5  { animation-delay: 0.8s; } .nc6  { animation-delay: 1.0s; }
.nc7  { animation-delay: 1.2s; } .nc8  { animation-delay: 1.4s; }
.nc9  { animation-delay: 1.6s; } .nc10 { animation-delay: 0.3s; }
.nc11 { animation-delay: 0.9s; } .nc12 { animation-delay: 1.5s; }

@keyframes nn3dSignal {
    0%   { stroke-dashoffset: 0;   opacity: 0.3; }
    50%  {                          opacity: 0.85; }
    100% { stroke-dashoffset: -18; opacity: 0.3; }
}

/* Diamond polygon faces — top half lighter, bottom half darker */
.nn3d-top { animation: nn3dNodeGlow 2.4s ease-in-out infinite; }
.nn3d-bot { animation: nn3dNodeGlow 2.4s ease-in-out infinite; opacity: 0.85; }

@keyframes nn3dNodeGlow {
    0%, 100% { opacity: 0.65; }
    50%       { opacity: 1; }
}

/* ---- Isometric 3D Tokenization Cubes ---- */

.poly-token-wrap {
    position: relative;
    z-index: 2;
    animation: polyTokenRock 8s ease-in-out infinite;
}

.poly-token-svg {
    width: 260px;
    height: 145px;
    display: block;
}

@keyframes polyTokenRock {
    0%, 100% { transform: perspective(600px) rotateX(10deg) rotateY(-10deg); }
    50%       { transform: perspective(600px) rotateX(5deg)  rotateY(6deg); }
}

/* Input cubes — sequential pulse (data streaming in) */
.tok3d-input   { animation: tok3dIn 2.5s ease-in-out infinite; }
.tok3d-input-1 { animation-delay: 0.0s; }
.tok3d-input-2 { animation-delay: 0.35s; }
.tok3d-input-3 { animation-delay: 0.7s; }

@keyframes tok3dIn {
    0%, 100% { opacity: 0.45; }
    25%       { opacity: 1; }
    50%       { opacity: 0.65; }
}

/* Arrow beam pulses as data compresses */
.tok3d-arrow { animation: tok3dArrow 2.5s ease-in-out 1.0s infinite; }

@keyframes tok3dArrow {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 1; }
}

/* Output cube glows brighter after compression */
.tok3d-output { animation: tok3dOut 2.5s ease-in-out 1.4s infinite; }

@keyframes tok3dOut {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 1; }
}

/* ---- Dark mode tweaks for headers ---- */
body.dark-mode .rc-header-cardiac,
body.dark-mode .rc-header-genai,
body.dark-mode .rc-header-token { background: transparent; }

/* Research card text spacing in new layout */
.research-card-cardiac h3,
.research-card-genai   h3,
.research-card-token   h3 {
    margin-top: 0;
}

/* ============================================================
   Earthrise Minimalism — final overrides
   Drop card shadows, flatten elevation, hairline borders only.
   ============================================================ */

.navbar,
.navbar.scrolled {
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
}

.highlight-item,
.education-item,
.awards-item,
.timeline-item,
.publication-item,
.publication-card,
.coauthor-item,
.research-card,
.project-card,
.github-project-card,
.industry-card,
.experience-card {
    box-shadow: none !important;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
}

.highlight-item:hover,
.education-item:hover,
.awards-item:hover,
.timeline-item:hover,
.publication-item:hover,
.publication-card:hover,
.research-card:hover,
.project-card:hover,
.github-project-card:hover,
.industry-card:hover,
.experience-card:hover {
    box-shadow: none !important;
    border-color: var(--text-muted);
    transform: none;
}

/* Section spacing in place of background bands */
section + section {
    border-top: 1px solid var(--border-color);
}

/* (Hero btn-primary/btn-secondary keep their white-on-dark styles set above) */

/* ============================================================
   Publications Slideshow
   ============================================================ */

.publications-carousel {
    outline: none;
}

.publications-carousel:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-soft);
    border-radius: 12px;
}

.publications-carousel-row {
    position: relative;
    margin-bottom: 1.25rem;
}

.publications-viewport {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    min-height: 360px;
}
.publications-viewport::-webkit-scrollbar { display: none; }

.publications-loading {
    flex: 0 0 100%;
    text-align: center;
    color: var(--text-muted);
    padding: 4rem 1rem;
    font-size: 0.95rem;
    font-style: italic;
}

.publication-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-sizing: border-box;
    padding: 2.5rem 4.5rem;
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 2.5rem;
    align-items: center;
}

.publication-slide-figure {
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--border-color);
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.publication-slide-figure-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
}

.publication-slide-venue-acronym {
    font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.04em;
    line-height: 1.05;
}

.publication-slide-figure-year {
    font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--accent-secondary);
}

.publication-slide-figure-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top;
    display: block;
    background: #ffffff;
}

/* Native browser PDF iframe — first-page preview */
.publication-slide-figure-pdf-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #ffffff;
    pointer-events: none;
}

.publication-slide-figure-pdf {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + 20px);
    height: calc(100% + 48px);
    border: 0;
    display: block;
    pointer-events: none;
}

.publication-slide-figure-failed .publication-slide-figure-placeholder {
    display: flex;
}

.publication-slide-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.publication-slide-meta {
    font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--accent-secondary);
    margin: 0;
    letter-spacing: 0.01em;
}

.publication-slide-title {
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.publication-slide-authors {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.publication-slide-authors strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.publication-slide-tldr {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0.25rem 0 0;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    min-height: 2em;
}

.publication-slide-tldr-loading {
    color: var(--text-subtle);
    font-style: italic;
    font-size: 0.9rem;
}

.publication-slide-tldr-empty {
    display: none;
}

.publication-slide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.publication-slide-citations {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.publication-slide-links {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-slide-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.pub-slide-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.pub-slide-link-primary {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Arrow buttons */
.publications-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.publications-carousel-btn:hover:not(:disabled) {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}
.publications-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.publications-carousel-prev { left: 12px; }
.publications-carousel-next { right: 12px; }

/* Footer (dots + counter) */
.publications-carousel-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.publications-carousel-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}
.publications-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.publications-carousel-dot:hover {
    background: var(--text-subtle);
}
.publications-carousel-dot-active {
    background: var(--accent-primary);
    transform: scale(1.2);
}
.publications-carousel-counter {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin: 0;
}

.publications-carousel-single .publications-carousel-btn,
.publications-carousel-single .publications-carousel-dots {
    display: none;
}

@media (max-width: 820px) {
    .publication-slide {
        grid-template-columns: 1fr;
        padding: 1.75rem 2.75rem;
        gap: 1.5rem;
    }
    .publication-slide-figure {
        max-width: 280px;
        margin: 0 auto;
    }
    .publications-carousel-btn {
        width: 36px;
        height: 36px;
    }
    .publications-carousel-prev { left: 6px; }
    .publications-carousel-next { right: 6px; }
}

@media (max-width: 480px) {
    .publication-slide {
        padding: 1.5rem 1rem;
    }
    .publication-slide-title {
        font-size: 1.2rem;
    }
}

/* Static publication list baked in by scripts/build_publications.py.
   Visible before JS runs (and to crawlers); scholar-integration.js clears the
   viewport and replaces it with the interactive carousel for real visitors. */
.publications-static {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    width: 100%;
}

.publication-static-item {
    padding: 1rem 1.25rem;
    border-left: 3px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 8px 8px 0;
}

.publication-static-title {
    display: block;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    text-decoration: none;
    color: inherit;
}

.publication-static-title:hover,
.publication-static-title:focus-visible {
    text-decoration: underline;
}

.publication-static-authors,
.publication-static-meta {
    display: block;
    font-size: 0.9rem;
    opacity: 0.78;
    line-height: 1.4;
}

.publication-static-meta {
    margin-top: 0.2rem;
    opacity: 0.62;
}
