@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700&family=Inter:wght@300;400;500;600&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #FAFBFC;
    --text-color: #0B1117;
    --text-secondary: #424A53;
    --accent-color: #0969DA;
    --accent-light: #D6E6FF;
    --accent-dark: #033D8B;
    --accent-purple: #7C3AED;
    --accent-purple-light: #EDE9FE;
    --accent-cyan: #06B6D4;
    --accent-cyan-light: #CFFAFE;
    --accent-rose: #D1242F;
    --accent-rose-light: #FCD5D0;
    --border-color: #D0D7DE;
    --border-light: #EAEEF2;
    --shadow: 0 3px 12px rgba(11, 17, 23, 0.08);
    --shadow-md: 0 8px 24px rgba(11, 17, 23, 0.12);
    --shadow-lg: 0 16px 48px rgba(11, 17, 23, 0.14);
    --shadow-xl: 0 20px 60px rgba(11, 17, 23, 0.16);
    --mouse-x: 0.5;
    --mouse-y: 0.5;
}

html[data-theme="dark"] {
    --bg-color: #0D1117;
    --text-color: #F0F6FC;
    --text-secondary: #C9D1D9;
    --border-color: #30363D;
    --border-light: #21262D;
    --accent-color: #58A6FF;
    --accent-light: #79C0FF;
    --accent-dark: #1F6FEB;
    --accent-purple: #BC8CDB;
    --accent-cyan: #56D4DD;
    --accent-rose: #F85149;
}

html {
    scroll-behavior: smooth;
}

/* --- Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(9, 105, 218, 0.25), 0 0 40px rgba(9, 105, 218, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(9, 105, 218, 0.4), 0 0 60px rgba(9, 105, 218, 0.15);
    }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes slide-in-left {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-right {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes underline-expand {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes dot-bounce {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes metric-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(9, 105, 218, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(9, 105, 218, 0); }
}

@keyframes cursor-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(9, 105, 218, 0.4); }
    50% { box-shadow: 0 0 25px rgba(124, 58, 237, 0.6); }
}

/* --- Progress Bar --- */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple), var(--accent-cyan));
    width: 0%;
    z-index: 2000;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

/* --- Scroll Progress Bar (Enhanced) --- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple), var(--accent-cyan), var(--accent-color));
    background-size: 200% 100%;
    width: 0%;
    z-index: 2000;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 15px rgba(9, 105, 218, 0.5), 0 0 30px rgba(124, 58, 237, 0.3);
    animation: gradient-shift 3s ease-in-out infinite;
}

/* --- Custom Cursor --- */
.custom-cursor {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 8px rgba(9, 105, 218, 0.8);
}

html[data-theme="dark"] .custom-cursor {
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.9);
}

.cursor-follower {
    position: fixed;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: inset 0 0 10px rgba(9, 105, 218, 0.2);
}

html[data-theme="dark"] .cursor-follower {
    border-color: var(--accent-color);
    box-shadow: inset 0 0 10px rgba(88, 166, 255, 0.3);
}

/* --- Page Loading Indicator --- */
.page-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* New Sleek Loader */
.loader {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.2;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.loader::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.2;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    animation-delay: 0.5s;
}

.loader-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    z-index: 2;
    background: var(--accent-color);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(9, 105, 218, 0.4);
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* --- Loading Screen --- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0969da 0%, #764ba2 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-screen.active {
    opacity: 1;
    pointer-events: all;
}

/* --- Dark Mode Toggle --- */
.dark-mode-toggle {
    position: static;
    width: auto;
    height: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(9, 105, 218, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: auto;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: none;
    font-weight: 600;
    backdrop-filter: blur(12px) saturate(180%);
    padding: 0.6rem 1.2rem;
    margin-left: auto;
}

html[data-theme="dark"] .dark-mode-toggle {
    background: rgba(30, 40, 60, 0.6);
    border-color: rgba(88, 166, 255, 0.4);
}

.dark-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.15);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(9, 105, 218, 0.5);
}

html[data-theme="dark"] .dark-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.15);
    background: rgba(30, 40, 60, 0.8);
    border-color: rgba(88, 166, 255, 0.6);
}

.dark-mode-toggle:active {
    transform: scale(0.98);
}

.mode-icon {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark-mode-toggle:hover .mode-icon {
    transform: rotate(25deg);
}

/* --- Performance Metrics --- */
.perf-metrics {
    position: fixed;
    bottom: 7rem;
    right: 2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF6B6B;
    z-index: 999;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: help;
    display: none;
}

.perf-metrics[data-loaded="true"] {
    animation: metric-pulse 2s infinite;
}

.perf-metrics[data-fast="true"] {
    background: #51CF66;
}

.perf-metrics[data-fast="false"] {
    background: #FFC107;
}

/* --- Visibility Animation --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll.visible {
    animation: fade-in 0.8s ease-out forwards;
}

.interest-card.visible {
    animation-delay: 0.1s;
}

.debate-item.visible {
    animation-delay: var(--delay, 0.1s);
}

.project-card.visible {
    animation-delay: 0.15s;
}

/* --- Ripple Effect --- */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-effect 0.6s ease-out;
    pointer-events: none;
}

/* --- Base & Typography --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 70px; /* This new line pushes all content down */
    counter-reset: debate-item;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(9, 105, 218, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Header & Navigation --- */
.main-header {
    display: none;
}

.logo { 
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Space Grotesk', sans-serif; 
    font-size: 1.4rem; 
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    letter-spacing: -0.02em;
}

.site-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.logo span {
    display: inline-block;
    line-height: 1;
}

.logo:hover {
    transform: scale(1.1);
    letter-spacing: 0.05em;
}

nav {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    letter-spacing: -0.01em;
    border-radius: 8px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 1px;
}

nav a:hover {
    color: var(--accent-color);
    background: rgba(9, 105, 218, 0.06);
}

nav a:hover::after, nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

nav a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* --- Breadcrumb Navigation --- */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
}

.breadcrumb a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.breadcrumb a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.breadcrumb a:hover::after {
    width: 100%;
}

.breadcrumb span {
    color: var(--text-secondary);
    font-weight: 400;
}

.breadcrumb .current {
    color: var(--text-color);
    font-weight: 600;
    pointer-events: none;
}

/* --- Site Map / Page Selector --- */
.page-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 1rem 2rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.04), rgba(124, 58, 237, 0.02));
    border: 1px solid var(--border-light);
    border-radius: 0;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 400;
    margin: 0;
    height: 70px;
}

.page-selector a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.page-selector a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-light), rgba(219, 234, 254, 0.6));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: -1;
}

.page-selector a:hover::before {
    transform: scaleX(1);
}

.page-selector a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(9, 105, 218, 0.12);
}

.page-selector a.active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.2);
}

.page-selector a.resources-link {
    background: linear-gradient(135deg, #0969da 0%, #764ba2 100%);
    color: #ffffff;
    border: 1.5px solid #0969da;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s ease-in-out infinite;
}

html[data-theme="dark"] .page-selector a.resources-link {
    background: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    border-color: #58a6ff;
    color: #0d1117;
}

.page-selector a.resources-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(9, 105, 218, 0.4);
}

html[data-theme="dark"] .page-selector a.resources-link:hover {
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.4);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(9, 105, 218, 0.2); }
    50% { box-shadow: 0 0 20px rgba(9, 105, 218, 0.4); }
}

html[data-theme="dark"] .page-selector a.resources-link {
    animation: pulse-glow-dark 2s ease-in-out infinite;
}

@keyframes pulse-glow-dark {
    0%, 100% { box-shadow: 0 0 10px rgba(88, 166, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(88, 166, 255, 0.4); }
}

/* Dark mode for breadcrumb & page selector */
html[data-theme="dark"] .breadcrumb a {
    color: var(--accent-color);
}

html[data-theme="dark"] .page-selector {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.06), rgba(124, 58, 237, 0.03));
    border-color: rgba(230, 237, 243, 0.12);
}

html[data-theme="dark"] .page-selector a {
    background: rgba(30, 40, 60, 0.6);
    border-color: rgba(230, 237, 243, 0.15);
    color: rgba(240, 246, 252, 0.9);
    font-weight: 600;
}

html[data-theme="dark"] .page-selector a:hover {
    border-color: var(--accent-color);
    color: #F0F6FC;
    background: rgba(30, 40, 60, 0.9);
    box-shadow: 0 8px 24px rgba(88, 166, 255, 0.12);
}

html[data-theme="dark"] .page-selector a.active {
    background: linear-gradient(135deg, var(--accent-color), #79C0FF);
    color: #0D1117;
    border-color: var(--accent-color);
    font-weight: 700;
}


/* --- General Layout --- */
.container { 
    padding: 4rem 2rem; 
    max-width: 1400px; 
    margin: 0 auto; 
    border-radius: 24px;
}

.page-container {
    padding-top: 3rem;
    position: relative;
    border-radius: 24px;
}

.page-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(9, 105, 218, 0.3), transparent);
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 3.5rem 0;
    position: relative;
    padding-bottom: 2rem;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--accent-color) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.page-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple));
    border-radius: 2px;
}

/* --- Achievement Sections --- */
.achievement-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(9, 105, 218, 0.1);
}

.achievement-section:last-child {
    border-bottom: none;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple));
    border-radius: 2px;
}

/* --- Home Page --- */
.home-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
    background-position: 0 0;
    border-radius: 24px;
}

.home-container::before {
    content: '';
    position: absolute;
    top: 15%;
    right: calc(-100px + (var(--mouse-x) * 100px));
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(9, 105, 218, 0.15), transparent);
    opacity: 1;
    border-radius: 50%;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
    filter: blur(40px);
    transition: right 0.1s ease-out;
}

.home-container::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: calc(-100px + (var(--mouse-x) * 100px));
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent);
    opacity: 1;
    border-radius: 50%;
    pointer-events: none;
    animation: float-delay 12s ease-in-out infinite;
    filter: blur(40px);
    transition: left 0.1s ease-out;
}

.banner-section {
    position: relative;
    background-image: url('banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 4rem 0;
    margin: -2rem calc(-50vw + 50%) 2rem calc(-50vw + 50%);
    border-radius: 32px;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
}

.banner-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    z-index: 0;
    pointer-events: none;
}

html[data-theme="dark"] .banner-section::before {
    background: rgba(13, 17, 23, 0.65);
}

.banner-section .main-heading {
    position: relative;
    z-index: 1;
}

.main-heading { 
    font-family: 'Space Grotesk', sans-serif; 
    font-size: 7.5vw; 
    line-height: 1.05;
    font-weight: 700;
    margin: 0;
    margin-top: 0;
    letter-spacing: -0.04em;
    position: relative;
    z-index: 1;
    color: #1a1a1a;
}

html[data-theme="dark"] .main-heading {
    color: #f0f0f0;
}

.main-heading::before {
    content: '';
    display: none;
}

.main-heading .line { 
    display: block; 
    overflow: hidden; 
    margin: 0.1em 0;
}

.main-heading .line span {
    display: block;
    animation: slide-up 0.9s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
    animation-delay: var(--delay);
    transform: translateY(100%);
    will-change: transform;
    background: linear-gradient(90deg, var(--text-color) 0%, var(--accent-color) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-text {
    font-size: 1.5rem;
    max-width: 700px;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in 0.9s forwards ease;
    animation-delay: 0.3s;
    will-change: opacity, transform;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-top: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.intro-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-purple));
    border-radius: 2px;
    animation: glow-pulse 3s ease-in-out infinite;
}

/* --- About Page --- */
.about-content p { 
    font-size: 1.25rem; 
    max-width: 820px; 
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.005em;
}

.about-content strong { 
    color: var(--accent-color); 
    font-weight: 600;
}

.interests-section {
    margin-top: 6rem;
    position: relative;
    padding-top: 3.5rem;
}

.interests-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(9, 105, 218, 0.4), transparent);
    border-radius: 2px;
}

.interests-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.interests-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple));
    border-radius: 2px;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.interest-card {
    border: 1px solid var(--border-light);
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 2px 8px rgba(11, 17, 23, 0.06);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.interest-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15), transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.interest-card:hover::after {
    transform: translateX(100%);
}

.interest-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.4), rgba(237, 233, 254, 0.2));
    border-color: rgba(9, 105, 218, 0.15);
}

.interest-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(207, 250, 254, 0.4), rgba(252, 231, 243, 0.2));
    border-color: rgba(6, 182, 212, 0.15);
}

.interest-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 12px 32px rgba(9, 105, 218, 0.12);
    transform: translateY(-6px);
}

.interest-card:nth-child(1):hover {
    background: linear-gradient(135deg, var(--accent-light), rgba(124, 58, 237, 0.12));
    border-color: var(--accent-color);
    box-shadow: 0 20px 50px rgba(9, 105, 218, 0.15);
}

.interest-card:nth-child(2):hover {
    background: linear-gradient(135deg, var(--accent-cyan-light), var(--accent-rose-light));
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.15);
}

.interest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.interest-card:nth-child(1)::before {
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

.interest-card:nth-child(2)::before {
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

.interest-card:hover::before {
    opacity: 1;
}

.interest-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-color);
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.interest-card:nth-child(1) h3 {
    color: var(--accent-color);
}

.interest-card:nth-child(2) h3 {
    color: var(--accent-cyan);
}

.interest-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
    font-weight: 400;
}

/* --- Debate Page --- */
.debate-list { 
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    position: relative;
}

.debate-list::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-purple), transparent);
    opacity: 0.25;
    pointer-events: none;
}

.debate-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in 0.8s forwards ease;
    animation-delay: var(--delay);
    will-change: opacity, transform;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    margin-left: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 6px rgba(11, 17, 23, 0.04);
}

.debate-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
    border-radius: 16px;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.debate-item:hover::after {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.debate-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.08), rgba(124, 58, 237, 0.06));
    border-color: rgba(124, 58, 237, 0.15);
}

.debate-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(9, 105, 218, 0.06));
    border-color: rgba(6, 182, 212, 0.15);
}

.debate-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(209, 36, 47, 0.08), rgba(209, 36, 47, 0.05));
    border-color: rgba(209, 36, 47, 0.15);
}

.debate-item::before {
    content: '▸';
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 1.5rem;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.debate-item:nth-child(1)::before {
    color: var(--accent-purple);
}

.debate-item:nth-child(2)::before {
    color: var(--accent-cyan);
}

.debate-item:nth-child(3)::before {
    color: var(--accent-rose);
}

.debate-item:hover {
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.12), rgba(9, 105, 218, 0.08));
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(9, 105, 218, 0.1);
    transform: translateY(-4px);
}

.debate-item:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(9, 105, 218, 0.08));
    border-color: var(--accent-purple);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.12);
}

.debate-item:nth-child(1):hover::before {
    transform: translateY(-50%) scale(1.4);
    opacity: 1;
}

.debate-item:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(9, 105, 218, 0.08));
    border-color: var(--accent-cyan);
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.12);
}

.debate-item:nth-child(2):hover::before {
    transform: translateY(-50%) scale(1.4);
    opacity: 1;
}

.debate-item:nth-child(3):hover {
    background: linear-gradient(135deg, rgba(209, 36, 47, 0.12), rgba(209, 36, 47, 0.08));
    border-color: var(--accent-rose);
    box-shadow: 0 12px 32px rgba(209, 36, 47, 0.12);
}

.debate-item:nth-child(3):hover::before {
    transform: translateY(-50%) scale(1.4);
    opacity: 1;
}

.debate-item h3 { 
    font-size: 1.4rem; 
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.debate-item:nth-child(1) h3 {
    color: var(--accent-purple);
}

.debate-item:nth-child(2) h3 {
    color: var(--accent-cyan);
}

.debate-item:nth-child(3) h3 {
    color: var(--accent-rose);
}

.debate-item p { 
    margin: 0; 
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.05rem;
}

.debate-item span { 
    font-weight: 700; 
    text-align: right;
    color: var(--accent-color);
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.debate-item:nth-child(1) span {
    color: var(--accent-purple);
}

.debate-item:nth-child(2) span {
    color: var(--accent-cyan);
}

.debate-item:nth-child(3) span {
    color: var(--accent-rose);
}

/* --- Projects Page --- */
.projects-grid {
    display: grid;
    /* 280px ensures it fits on small iPhones (which are usually 320px-390px wide) */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2.5rem;
    position: relative;
}

.project-card {
    border: 1px solid var(--border-light);
    padding: 2.75rem;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    border-left: 5px solid var(--accent-purple);
    backdrop-filter: blur(20px);
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-purple), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
    mix-blend-mode: overlay;
}

.project-card:hover { 
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-12px);
}

.project-card:hover::after {
    opacity: 0.06;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-purple), transparent);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 0.8;
}

.project-card h3 { 
    font-family: 'Space Grotesk', sans-serif; 
    font-size: 1.75rem; 
    margin: 0 0 1rem 0;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--text-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-card p { 
    font-size: 1.1rem; 
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-icon {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 700;
    opacity: 0.85;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-light), rgba(219, 234, 254, 0.6));
    border-radius: 10px;
    border: 1px solid rgba(9, 105, 218, 0.2);
}

.project-card:hover .project-icon {
    transform: rotate(12deg) scale(1.15);
    opacity: 1;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.2);
}

.project-description {
    margin-bottom: 1.5rem !important;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 400;
}

.project-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.project-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-light), rgba(219, 234, 254, 0.7));
    color: var(--accent-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(9, 105, 218, 0.2);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
}

.project-card:hover .project-tag {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.2);
}

/* --- Blog Page --- */
.blog-intro {
    font-size: 1.4rem;
    max-width: 800px;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    line-height: 1.7;
}

/* --- Timeline Page --- */
.timeline-intro {
    font-size: 1.4rem;
    max-width: 800px;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    line-height: 1.7;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 6rem;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-purple), transparent);
    border-radius: 2px;
}

.timeline-event {
    margin-left: 3rem;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in 0.8s forwards ease;
    animation-delay: var(--delay);
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 2.5rem;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-purple));
    border: 3px solid var(--bg-color);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 0 0 rgba(9, 105, 218, 0.2);
}

.timeline-event:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.timeline-event:hover::before {
    box-shadow: 0 0 0 8px rgba(9, 105, 218, 0.15);
    transform: scale(1.3);
}

.timeline-date {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-light), rgba(219, 234, 254, 0.7));
    color: var(--accent-color);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid rgba(9, 105, 218, 0.2);
}

.timeline-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    margin: 0 0 1.25rem 0;
    color: var(--text-color);
    font-weight: 700;
}

.timeline-format,
.timeline-topic {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.timeline-tags {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.timeline-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-light), rgba(219, 234, 254, 0.7));
    color: var(--accent-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(9, 105, 218, 0.2);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
}

.timeline-event:hover .timeline-tag {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.2);
}

/* --- Blog Page Continued --- */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.blog-card-link {
    text-decoration: none;
    /* make the whole card clickable and prevent mobile auto-zoom */
    display: block;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Box sizing and defensive rules so clicking/pressing doesn't change layout */
.blog-card,
.blog-card *,
.blog-card-link {
    box-sizing: border-box;
}

/* Prevent any accidental press/active styles from changing scale, padding or font-size */
.blog-card:active,
.blog-card:focus,
.blog-card-link:active,
.blog-card-link:focus,
.blog-card:focus-within {
    transform: none !important;
    outline: none;
}

.blog-card {
    border: 1px solid var(--border-color);
    padding: 3.5rem 3rem;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.3), rgba(237, 233, 254, 0.2));
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fade-in 0.8s forwards ease;
}

html[data-theme="dark"] .blog-card {
    background: linear-gradient(135deg, rgba(45, 55, 75, 0.4), rgba(60, 50, 90, 0.3));
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple), var(--accent-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-color);
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    gap: 1rem;
}

.blog-category {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, var(--accent-light), rgba(219, 234, 254, 0.8));
    color: var(--accent-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--accent-light);
    flex-shrink: 0;
}

html[data-theme="dark"] .blog-category {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.3), rgba(88, 166, 255, 0.15));
    color: #79C0FF;
    border-color: rgba(88, 166, 255, 0.4);
}

.blog-category:nth-of-type(1) {
    background: linear-gradient(135deg, var(--accent-purple-light), rgba(124, 58, 237, 0.2));
    color: var(--accent-purple);
    border-color: var(--accent-purple-light);
}

.blog-date {
    font-size: 0.9rem;
    color: rgba(15, 20, 25, 0.6);
    font-weight: 500;
    white-space: nowrap;
}

html[data-theme="dark"] .blog-date {
    color: rgba(201, 209, 217, 0.7);
}

.blog-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    color: var(--text-color);
    /* give the title more vertical breathing room so it doesn't feel cramped */
    line-height: 1.5;
}

.blog-excerpt {
    color: rgba(15, 20, 25, 0.75);
    /* increase line-height & spacing for comfortable reading */
    line-height: 1.9;
    margin-bottom: 2rem;
    flex-grow: 1;
    font-size: 1rem;
}

html[data-theme="dark"] .blog-excerpt {
    color: rgba(201, 209, 217, 0.85);
}

.blog-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

html[data-theme="dark"] .blog-meta {
    border-bottom: 1px solid rgba(88, 166, 255, 0.15);
}

.read-time {
    font-size: 0.85rem;
    color: rgba(15, 20, 25, 0.6);
    font-weight: 500;
}

html[data-theme="dark"] .read-time {
    color: rgba(201, 209, 217, 0.6);
}

.blog-card-link .blog-link {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
}

.blog-card-link .blog-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.blog-card:hover .blog-link::after {
    width: 100%;
}

.blog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.2), rgba(237, 233, 254, 0.15));
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.blog-empty::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05), transparent 70%);
    pointer-events: none;
}

.blog-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    animation: float 4s ease-in-out infinite;
}

.blog-empty h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-weight: 700;
}

.blog-empty p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.7;
    margin: 0;
}

/* --- Buttons & Links --- */
.link-container { 
    text-align: center; 
    margin-top: 4rem; 
}

.button, .button-secondary {
    font-family: 'Space Grotesk', sans-serif;
    text-decoration: none;
    border: 2px solid var(--accent-color);
    padding: 1.15rem 2.75rem;
    font-size: 0.95rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(9, 105, 218, 0.08);
}

.button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: -1;
}

.button { 
    background-color: var(--accent-color); 
    color: white; 
    box-shadow: 0 4px 16px rgba(9, 105, 218, 0.2);
}

.button:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(9, 105, 218, 0.3);
    letter-spacing: 0.02em;
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(9, 105, 218, 0.15);
}

.button-secondary { 
    color: var(--accent-color);
    background-color: transparent;
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(9, 105, 218, 0.08);
}

.button-secondary:hover { 
    background-color: rgba(9, 105, 218, 0.08); 
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 105, 218, 0.12);
    color: var(--accent-color);
}

.button-secondary:active {
    transform: translateY(0);
}

/* --- Page Navigation --- */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-top: 8rem;
    padding-top: 3.5rem;
    border-top: 1px solid rgba(9, 105, 218, 0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.04), rgba(124, 58, 237, 0.02));
    border: 1px solid var(--border-light);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(11, 17, 23, 0.04);
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-link:hover::before {
    transform: translateX(100%);
}

.nav-link:hover {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, var(--accent-light), rgba(124, 58, 237, 0.08));
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.1);
    transform: translateY(-3px);
}

.nav-link.prev {
    margin-right: auto;
}

.nav-link.next {
    margin-left: auto;
}

.nav-link-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    font-weight: 500;
}

.nav-link-title {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in 0.8s forwards ease;
    animation-delay: var(--delay);
}

@keyframes fade-in { 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

@keyframes slide-up { 
    to { 
        transform: translateY(0); 
    } 
}

/* --- Parallax & Scroll Effects --- */
[class*="float"] {
    will-change: transform;
}

.copyright-link:hover::after {
    width: 100%;
}

/* --- Dark Mode Styles --- */
html[data-theme="dark"] body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(188, 140, 219, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(86, 212, 221, 0.05) 0%, transparent 50%);
}

html[data-theme="dark"] .main-header {
    background-color: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid rgba(230, 237, 243, 0.12);
}

html[data-theme="dark"] .main-header nav a {
    color: var(--text-secondary);
}

html[data-theme="dark"] .main-header nav a:hover {
    color: var(--accent-color);
}

html[data-theme="dark"] .logo {
    background: linear-gradient(135deg, #F0F6FC 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="dark"] footer {
    background: linear-gradient(135deg, #0D1117 0%, #161B22 40%, #3D2645 100%);
}

html[data-theme="dark"] .interest-card,
html[data-theme="dark"] .debate-item,
html[data-theme="dark"] .project-card {
    background: rgba(30, 40, 60, 0.8);
    border-color: rgba(88, 166, 255, 0.25);
    backdrop-filter: blur(20px);
    border-left: 5px solid var(--accent-color);
    box-shadow: inset 0 0 20px rgba(88, 166, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .interest-card:hover,
html[data-theme="dark"] .debate-item:hover,
html[data-theme="dark"] .project-card:hover {
    background: rgba(30, 40, 60, 0.9);
    border-color: var(--accent-color);
}

html[data-theme="dark"] .nav-link {
    background: rgba(30, 40, 60, 0.6);
    border-color: rgba(230, 237, 243, 0.12);
    color: var(--text-secondary);
}

html[data-theme="dark"] .nav-link:hover {
    background: rgba(30, 40, 60, 0.9);
    border-color: var(--accent-color);
    color: var(--text-color);
}

html[data-theme="dark"] .page-title {
    background: linear-gradient(135deg, #F0F6FC 0%, var(--accent-color) 50%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="dark"] .button {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #0D1117;
}

html[data-theme="dark"] .button:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: 0 12px 40px rgba(88, 166, 255, 0.25);
}

html[data-theme="dark"] .button-secondary {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

html[data-theme="dark"] .button-secondary:hover {
    background-color: rgba(88, 166, 255, 0.15);
    color: var(--accent-light);
}

html[data-theme="dark"] .project-tag {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
    color: var(--accent-light);
    border-color: rgba(88, 166, 255, 0.3);
}

html[data-theme="dark"] .project-card:hover .project-tag {
    background: linear-gradient(135deg, var(--accent-color), #79C0FF);
    color: #0D1117;
    border-color: var(--accent-color);
}

html[data-theme="dark"] .project-icon {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
    border-color: rgba(88, 166, 255, 0.4);
    color: var(--accent-light);
}

html[data-theme="dark"] .project-card:hover .project-icon {
    background: linear-gradient(135deg, var(--accent-color), #79C0FF);
    color: #0D1117;
}

html[data-theme="dark"] .timeline-event {
    background: rgba(30, 40, 60, 0.6);
    border-color: rgba(230, 237, 243, 0.12);
}

html[data-theme="dark"] .timeline-event:hover {
    background: rgba(30, 40, 60, 0.9);
    border-color: var(--accent-color);
}

html[data-theme="dark"] .timeline-date {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
    color: var(--accent-light);
    border-color: rgba(88, 166, 255, 0.3);
}

html[data-theme="dark"] .timeline-tag {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
    color: var(--accent-light);
    border-color: rgba(88, 166, 255, 0.3);
}

html[data-theme="dark"] .timeline-event:hover .timeline-tag {
    background: linear-gradient(135deg, var(--accent-color), #79C0FF);
    color: #0D1117;
    border-color: var(--accent-color);
}

/* --- Large Screen Optimization --- */
@media (min-width: 1600px) {
    .container, .main-header {
        max-width: 1400px;
    }
    
    .main-heading {
        font-size: 7.5vw;
    }
    
    .page-title {
        font-size: 5rem;
    }
    
    .about-content p {
        font-size: 1.5rem;
    }
    
    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3.5rem;
    }
    
    .interest-card {
        padding: 3.5rem;
    }
    
    .interest-card p {
        font-size: 1.15rem;
    }
    
    .debate-item {
        padding: 3rem;
        font-size: 1.5rem;
    }
    
    .debate-item h3 {
        font-size: 1.85rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3.5rem;
    }
    
    .project-card {
        padding: 3.5rem;
    }
    
    .project-card h3 {
        font-size: 2.25rem;
    }
    
    .project-card p {
        font-size: 1.25rem;
    }
    
    .footer-content {
        gap: 5rem;
    }
}

/* --- Footer --- */
footer {
    background: linear-gradient(135deg, #F5F5F5 0%, #F9F9FB 40%, #F5F1FA 100%);
    color: #424A53;
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
    border-top: 1px solid rgba(232, 234, 237, 0.1);
    position: relative;
}

/* --- Blog Post Styles --- */
.blog-post-container {
    max-width: 1100px;
    padding: clamp(3rem, 8vw, 5rem) clamp(3rem, 10vw, 4.5rem);
    margin: 0 auto;
}

.blog-post {
    position: relative;
}

.blog-post-header {
    margin-bottom: 5rem;
    padding-bottom: 4rem;
    border-bottom: 2px solid var(--border-light);
}

.blog-post-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    font-weight: 700;
    margin: 0 0 2.5rem 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.blog-post-meta {
    display: flex;
    gap: 2rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 500;
}

.blog-post-meta time {
    font-style: italic;
}

.blog-post-content {
    font-size: 1.3rem;
    line-height: 2.1;
    color: var(--text-color);
    margin-bottom: 5rem;
    letter-spacing: 0.3px;
}

.blog-post-content p {
    margin-bottom: 3.5rem;
}

.blog-post-content p:last-child {
    margin-bottom: 0;
}

.blog-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.blog-link:hover {
    color: var(--accent-dark);
}

.blog-post-footer {
    padding-top: 4rem;
    border-top: 1px solid var(--border-light);
    margin-top: 5rem;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 1.05rem;
}

.blog-back-link:hover {
    transform: translateX(-4px);
    color: var(--accent-dark);
}

html[data-theme="dark"] .blog-post-content {
    color: var(--text-color);
}

html[data-theme="dark"] .blog-link {
    color: var(--accent-light);
}

html[data-theme="dark"] .blog-link:hover {
    color: #79C0FF;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(9, 105, 218, 0.3), transparent);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-color);
}

.footer-section p {
    line-height: 1.8;
    margin: 0.9rem 0;
    opacity: 0.85;
    font-weight: 400;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin: 1rem 0;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    padding-bottom: 3px;
    font-weight: 500;
    letter-spacing: -0.005em;
}

html[data-theme="dark"] .footer-links a {
    color: #79C0FF;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple));
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 1px;
}

.footer-links a:hover {
    opacity: 0.9;
    color: var(--accent-light);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(232, 234, 237, 0.08);
    font-size: 0.9rem;
    opacity: 1;
    font-weight: 400;
}

.copyright-link {
    color: #0B1117 !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    padding-bottom: 2px;
    cursor: pointer;
}

html[data-theme="dark"] .copyright-link {
    color: #F0F6FC !important;
}

.copyright-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple));
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.copyright-link:hover {
    opacity: 1;
    color: var(--accent-light);
}

.copyright-link:hover::after {
    width: 100%;
}

.copyright-content {
    max-width: 900px;
    margin: 2rem auto;
}

.copyright-section {
    background: var(--accent-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
}

html[data-theme="dark"] .copyright-section {
    background: rgba(45, 55, 75, 0.2);
    border-color: rgba(88, 166, 255, 0.2);
}

.copyright-details {
    margin-bottom: 2.5rem;
}

.copyright-details h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.copyright-details p,
.copyright-details li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

html[data-theme="dark"] .copyright-details p,
html[data-theme="dark"] .copyright-details li {
    color: rgba(201, 209, 217, 0.9);
}

.copyright-details ul {
    list-style-position: inside;
    margin-left: 0;
}

.copyright-details ul li {
    margin-bottom: 0.8rem;
}

.copyright-details a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

html[data-theme="dark"] .copyright-details a {
    color: #79C0FF;
}

.copyright-details a:hover {
    color: var(--accent-light);
}

.copyright-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    /* --- 1. Fix Global Spacing --- */
    body {
        padding-top: 60px;
        padding-bottom: 80px; /* Add space at bottom so Floating Toggle doesn't cover text */
    }

    .container {
        padding: 2rem 1.25rem;
    }

    /* --- 2. Fix Navigation (Instagram Style Scroll) --- */
    .page-selector {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        align-items: center;
        padding: 0 1rem;
        gap: 0.75rem;
        height: 60px;
        -webkit-overflow-scrolling: touch;
        /* Remove the weird box look on mobile, make it clean */
        background: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        top: 0;
    }
    
    html[data-theme="dark"] .page-selector {
        background: rgba(13, 17, 23, 0.95);
    }

    .page-selector::-webkit-scrollbar {
        display: none; /* Hide scrollbar */
    }

    .page-selector a {
        flex: 0 0 auto;
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
        margin: 0;
        white-space: nowrap;
    }

    /* --- 3. THEME TOGGLE FIX (Floating Button) --- */
    /* This rips the button out of the nav and floats it bottom-right */
    .dark-mode-toggle {
        position: fixed;
        bottom: 25px;
        right: 25px;
        top: auto;
        left: auto;
        margin: 0;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .dark-mode-toggle .mode-icon {
        font-size: 1.5rem;
        line-height: 1;
    }

    /* --- 4. Typography & Layout Fixes --- */
    .page-title {
        font-size: 2.25rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        word-wrap: break-word;
    }
    
    .main-heading {
        font-size: 3rem;
    }

    .intro-text {
        font-size: 1.1rem;
    }

    /* Force grids to be 1 column so they don't squash */
    .interests-grid,
    .projects-grid,
    .stats-grid,
    .blog-grid,
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Fix padding inside cards */
    .project-card, 
    .interest-card, 
    .debate-item,
    .blog-card,
    .timeline-event,
    .resource-preview-card {
        padding: 1.5rem;
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Timeline specific alignment */
    .timeline-container::before { left: 10px; }
    .timeline-event { margin-left: 1.5rem; }
    .timeline-event::before { left: -1.5rem; top: 1.5rem; }

    /* Hide heavy animations on mobile */
    .home-container::before, 
    .home-container::after { display: none; }
    
    /* Fix Footer alignment */
    .footer-content { text-align: left; }
}

/* --- Timeline v2 Overhaul (stacked responsive timeline) --- */
.timeline-v2 {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    padding: 2.5rem 0 4rem;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-date-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-purple));
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.12);
}

.timeline-card {
    position: relative;
    padding: 1.6rem;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(11,17,23,0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

html[data-theme="dark"] .timeline-card {
    background: rgba(30,40,60,0.85);
    border-color: rgba(88,166,255,0.1);
}

.timeline-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-purple));
    opacity: 0.9;
}

.timeline-card-title {
    margin: 0 0 0.25rem 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.timeline-card-sub {
    margin: 0 0 0.6rem 0;
    color: var(--text-secondary);
    font-weight: 600;
}

.timeline-card-body {
    margin: 0 0 0.6rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-tag {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    background: linear-gradient(135deg, var(--accent-light), rgba(219,234,254,0.6));
    color: var(--accent-color);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(9,105,218,0.12);
}

.timeline-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(11,17,23,0.14);
}

/* Tournament Record Table Styles */
.tournament-record {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(9, 105, 218, 0.03);
    border-radius: 12px;
    border-left: 4px solid #0969da;
}

.record-intro {
    font-size: 0.95rem;
    color: #57606a;
    margin-bottom: 1.5rem;
}

html[data-theme="dark"] .tournament-record {
    background: rgba(9, 105, 218, 0.08);
}

html[data-theme="dark"] .record-intro {
    color: #adbac7;
}

.tournament-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tournament-table thead {
    background: rgba(9, 105, 218, 0.08);
}

html[data-theme="dark"] .tournament-table thead {
    background: rgba(9, 105, 218, 0.12);
}

.tournament-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #0969da;
    border-bottom: 2px solid #0969da;
}

html[data-theme="dark"] .tournament-table th {
    color: #58a6ff;
    border-bottom-color: #58a6ff;
}

.tournament-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #24292f;
}

html[data-theme="dark"] .tournament-table td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #adbac7;
}

.tournament-table tbody tr:hover {
    background: rgba(9, 105, 218, 0.04);
}

html[data-theme="dark"] .tournament-table tbody tr:hover {
    background: rgba(88, 166, 255, 0.08);
}

.total-row {
    background: rgba(9, 105, 218, 0.06);
    font-weight: 600;
}

html[data-theme="dark"] .total-row {
    background: rgba(88, 166, 255, 0.1);
}

@media (max-width: 900px) {
    .timeline-card::before { display: none; }
    .timeline-date-badge { font-size: 0.85rem; }
    .timeline-card { padding: 1.25rem; }
    
    .tournament-record {
        padding: 1.5rem;
    }
    
    .tournament-table {
        font-size: 0.8rem;
    }
    
    .tournament-table th,
    .tournament-table td {
        padding: 0.5rem;
    }
}

/* ==================== ACHIEVEMENT CARDS & SECTION ENHANCEMENTS ==================== */

.achievement-section {
    margin: 3rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #24292f;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

html[data-theme="dark"] .section-title {
    color: #e6edf3;
}

.section-intro {
    font-size: 1rem;
    color: #57606a;
    margin-bottom: 2rem;
    line-height: 1.6;
}

html[data-theme="dark"] .section-intro {
    color: #adbac7;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.achievement-card {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    padding: 1.75rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

html[data-theme="dark"] .achievement-card {
    background: #0d1117;
    border-color: #30363d;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0969da, #1f6feb);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievement-card:hover::before {
    opacity: 1;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(11, 17, 23, 0.12);
    border-color: #0969da;
}

html[data-theme="dark"] .achievement-card:hover {
    box-shadow: 0 16px 40px rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0969da, #1f6feb);
    border-radius: 50%;
    margin-bottom: 1rem;
    color: white;
    font-weight: 700;
}

.badge-number {
    font-size: 1.75rem;
    line-height: 1;
}

.badge-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.achievement-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #24292f;
    margin: 0.5rem 0;
}

html[data-theme="dark"] .achievement-card h3 {
    color: #e6edf3;
}

.achievement-meta {
    font-size: 0.9rem;
    color: #57606a;
    margin: 0.5rem 0;
    line-height: 1.4;
}

html[data-theme="dark"] .achievement-meta {
    color: #8b949e;
}

.achievement-desc {
    font-size: 0.95rem;
    color: #424a51;
    margin-top: 1rem;
    line-height: 1.6;
}

html[data-theme="dark"] .achievement-desc {
    color: #adbac7;
}

.link-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.button, .button-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.button {
    background: linear-gradient(135deg, #0969da, #1f6feb);
    color: white;
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(9, 105, 218, 0.4);
}

.button-secondary {
    background: #f6f8fa;
    color: #0969da;
    border: 1.5px solid #d0d7de;
}

html[data-theme="dark"] .button-secondary {
    background: transparent;
    color: #58a6ff;
    border-color: #30363d;
}

.button-secondary:hover {
    background: #eaeef2;
    border-color: #0969da;
}

html[data-theme="dark"] .button-secondary:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
}

@media (max-width: 768px) {
    .achievement-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .button, .button-secondary {
        width: 100%;
        text-align: center;
    }
}

/* ==================== INTERACTIVE TIMELINE STYLES ==================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0 3rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #f6f8fa, #ffffff);
    border: 1px solid #d0d7de;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] .stat-card {
    background: linear-gradient(135deg, #0d1117, #161b22);
    border-color: #30363d;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #0969da;
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.15);
}

html[data-theme="dark"] .stat-card:hover {
    border-color: #58a6ff;
    box-shadow: 0 8px 24px rgba(88, 166, 255, 0.15);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0969da;
    margin-bottom: 0.25rem;
}

html[data-theme="dark"] .stat-number {
    color: #58a6ff;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #57606a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html[data-theme="dark"] .stat-label {
    color: #8b949e;
}

.stat-detail {
    font-size: 0.8rem;
    color: #424a51;
    margin-top: 0.5rem;
}

html[data-theme="dark"] .stat-detail {
    color: #adbac7;
}

/* Interactive Tournament List */
.tournament-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tournament-compact {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

html[data-theme="dark"] .tournament-compact {
    background: #0d1117;
    border-color: #30363d;
}

.tournament-compact:hover {
    border-color: #0969da;
    box-shadow: 0 4px 16px rgba(9, 105, 218, 0.1);
}

html[data-theme="dark"] .tournament-compact:hover {
    border-color: #58a6ff;
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.1);
}

.tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    user-select: none;
}

.tournament-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.tournament-date {
    font-weight: 700;
    color: #0969da;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

html[data-theme="dark"] .tournament-date {
    color: #58a6ff;
}

.tournament-details {
    flex: 1;
    min-width: 0;
}

.tournament-details h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: #24292f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-theme="dark"] .tournament-details h3 {
    color: #e6edf3;
}

.tournament-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
}

.tournament-badge.novice {
    background: rgba(31, 111, 235, 0.15);
    color: #1f6feb;
}

html[data-theme="dark"] .tournament-badge.novice {
    background: rgba(88, 166, 255, 0.2);
    color: #79c0ff;
}

.tournament-badge.middle {
    background: rgba(177, 86, 215, 0.15);
    color: #b156d7;
}

html[data-theme="dark"] .tournament-badge.middle {
    background: rgba(188, 126, 221, 0.2);
    color: #d0a3f7;
}

.tournament-badge.open {
    background: rgba(52, 168, 83, 0.15);
    color: #34a853;
}

html[data-theme="dark"] .tournament-badge.open {
    background: rgba(63, 185, 98, 0.2);
    color: #7ee787;
}

.tournament-result {
    font-size: 0.85rem;
    font-weight: 600;
    color: #57606a;
}

html[data-theme="dark"] .tournament-result {
    color: #8b949e;
}

.tournament-result.champion {
    color: #fd7e14;
    font-weight: 700;
}

html[data-theme="dark"] .tournament-result.champion {
    color: #ffa657;
}

.expand-toggle {
    font-size: 1.2rem;
    color: #57606a;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

html[data-theme="dark"] .expand-toggle {
    color: #8b949e;
}

.tournament-compact.expanded .expand-toggle {
    transform: rotate(180deg);
}

.tournament-content {
    display: none;
    padding: 0 1.25rem 1.25rem 1.25rem;
    border-top: 1px solid #d0d7de;
    font-size: 0.9rem;
    color: #424a51;
    line-height: 1.6;
}

html[data-theme="dark"] .tournament-content {
    border-top-color: #30363d;
    color: #adbac7;
}

.tournament-compact.expanded .tournament-content {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tournament-content p {
    margin: 0.5rem 0;
}

.tournament-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: rgba(9, 105, 218, 0.08);
    color: #0969da;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

html[data-theme="dark"] .tag {
    background: rgba(88, 166, 255, 0.12);
    color: #79c0ff;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .tournament-details h3 {
        font-size: 0.95rem;
    }
    
    .tournament-info {
        gap: 0.75rem;
    }
}

/* ==================== BLOG PAGE STYLES ==================== */

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #24292f;
    margin-bottom: 0.5rem;
}

html[data-theme="dark"] .blog-title {
    color: #e6edf3;
}

.blog-tagline {
    font-size: 1.1rem;
    color: #57606a;
    line-height: 1.6;
}

html[data-theme="dark"] .blog-tagline {
    color: #adbac7;
}

/* Blog Categories Filter */
.blog-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.category-btn {
    padding: 0.6rem 1.25rem;
    border: 1.5px solid #d0d7de;
    border-radius: 20px;
    background: white;
    color: #24292f;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] .category-btn {
    border-color: #30363d;
    background: transparent;
    color: #adbac7;
}

.category-btn:hover {
    border-color: #0969da;
    color: #0969da;
}

html[data-theme="dark"] .category-btn:hover {
    border-color: #58a6ff;
    color: #58a6ff;
}

.category-btn.active {
    background: linear-gradient(135deg, #0969da, #1f6feb);
    color: white;
    border-color: #0969da;
}

html[data-theme="dark"] .category-btn.active {
    border-color: #58a6ff;
}

/* Blog Container (Main + Sidebar) */
.blog-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Blog Feed */
.blog-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Blog Post Card */
.blog-post {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] .blog-post {
    background: #0d1117;
    border-color: #30363d;
}

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(9, 105, 218, 0.12);
    border-color: #0969da;
}

html[data-theme="dark"] .blog-post:hover {
    box-shadow: 0 12px 32px rgba(88, 166, 255, 0.12);
    border-color: #58a6ff;
}

.post-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    overflow: hidden;
}

html[data-theme="dark"] .post-image-placeholder {
    background: linear-gradient(135deg, #161b22, #0d1117);
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 1.75rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.post-date {
    color: #57606a;
    font-weight: 500;
}

html[data-theme="dark"] .post-date {
    color: #8b949e;
}

.post-category {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.post-category.debate {
    background: rgba(31, 111, 235, 0.15);
    color: #1f6feb;
}

html[data-theme="dark"] .post-category.debate {
    background: rgba(88, 166, 255, 0.2);
    color: #79c0ff;
}

.post-category.tech {
    background: rgba(29, 170, 216, 0.15);
    color: #1daaed;
}

html[data-theme="dark"] .post-category.tech {
    background: rgba(79, 195, 247, 0.2);
    color: #79c0ff;
}

.post-category.philosophy {
    background: rgba(177, 86, 215, 0.15);
    color: #b156d7;
}

html[data-theme="dark"] .post-category.philosophy {
    background: rgba(188, 126, 221, 0.2);
    color: #d0a3f7;
}

.post-category.strategy {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

html[data-theme="dark"] .post-category.strategy {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #24292f;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

html[data-theme="dark"] .post-title {
    color: #e6edf3;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #424a51;
    line-height: 1.6;
    margin-bottom: 1rem;
}

html[data-theme="dark"] .post-excerpt {
    color: #adbac7;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #d0d7de;
    padding-top: 1rem;
    margin-top: 1rem;
}

html[data-theme="dark"] .post-footer {
    border-top-color: #30363d;
}

.read-more {
    color: #0969da;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

html[data-theme="dark"] .read-more {
    color: #58a6ff;
}

.read-more:hover {
    color: #1f6feb;
}

html[data-theme="dark"] .read-more:hover {
    color: #79c0ff;
}

.post-comments {
    font-size: 0.85rem;
    color: #57606a;
    font-weight: 600;
}

html[data-theme="dark"] .post-comments {
    color: #8b949e;
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    padding: 1.5rem;
}

html[data-theme="dark"] .sidebar-widget {
    background: #0d1117;
    border-color: #30363d;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #24292f;
    margin-bottom: 1rem;
}

html[data-theme="dark"] .widget-title {
    color: #e6edf3;
}

.widget-content {
    font-size: 0.9rem;
}

.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #d0d7de;
    counter-increment: item;
}

html[data-theme="dark"] .popular-list li {
    border-bottom-color: #30363d;
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-list li::before {
    content: counter(item);
    display: inline-block;
    width: 1.5rem;
    font-weight: 700;
    color: #0969da;
    margin-right: 0.5rem;
}

html[data-theme="dark"] .popular-list li::before {
    color: #58a6ff;
}

.popular-list a {
    color: #24292f;
    text-decoration: none;
    font-weight: 500;
}

html[data-theme="dark"] .popular-list a {
    color: #adbac7;
}

.popular-list a:hover {
    color: #0969da;
}

html[data-theme="dark"] .popular-list a:hover {
    color: #58a6ff;
}

.popular-count {
    float: right;
    color: #57606a;
    font-size: 0.85rem;
}

html[data-theme="dark"] .popular-count {
    color: #8b949e;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    padding: 0.6rem 0;
}

.category-list a {
    color: #0969da;
    text-decoration: none;
    font-weight: 500;
}

html[data-theme="dark"] .category-list a {
    color: #58a6ff;
}

.category-list a:hover {
    text-decoration: underline;
}

.count {
    color: #57606a;
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

html[data-theme="dark"] .count {
    color: #8b949e;
}

.sidebar-widget p {
    color: #424a51;
    line-height: 1.6;
    margin: 0;
}

html[data-theme="dark"] .sidebar-widget p {
    color: #adbac7;
}

/* Subscribe Widget */
.subscribe-widget {
    background: linear-gradient(135deg, #f6f8fa, #ffffff);
    border: 1.5px solid #0969da;
}

html[data-theme="dark"] .subscribe-widget {
    background: linear-gradient(135deg, #0d1117, #161b22);
    border-color: #58a6ff;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.subscribe-form input {
    padding: 0.6rem;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #24292f;
}

html[data-theme="dark"] .subscribe-form input {
    border-color: #30363d;
    background: #0d1117;
    color: #adbac7;
}

.subscribe-form input::placeholder {
    color: #57606a;
}

html[data-theme="dark"] .subscribe-form input::placeholder {
    color: #8b949e;
}

.subscribe-btn {
    padding: 0.6rem;
    background: linear-gradient(135deg, #0969da, #1f6feb);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
}

/* Load More Button */
.load-more-container {
    text-align: center;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    border: 1.5px solid #d0d7de;
    background: white;
    color: #24292f;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] .load-more-btn {
    border-color: #30363d;
    background: transparent;
    color: #adbac7;
}

.load-more-btn:hover {
    border-color: #0969da;
    color: #0969da;
    transform: translateY(-2px);
}

html[data-theme="dark"] .load-more-btn:hover {
    border-color: #58a6ff;
    color: #58a6ff;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-container {
        grid-template-columns: 1fr 250px;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        flex-direction: row;
        gap: 1rem;
    }
    
    .sidebar-widget {
        flex: 1;
        min-width: 0;
    }
    
    .blog-categories {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* ==================== QUICK LINKS SECTION ==================== */

.quick-links {
    margin: 3rem 0;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: #f6f8fa;
    border: 1.5px solid #d0d7de;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] .quick-link-card {
    background: #0d1117;
    border-color: #30363d;
}

.quick-link-card:hover {
    transform: translateY(-6px);
    border-color: #0969da;
    box-shadow: 0 12px 32px rgba(9, 105, 218, 0.15);
}

html[data-theme="dark"] .quick-link-card:hover {
    border-color: #58a6ff;
    box-shadow: 0 12px 32px rgba(88, 166, 255, 0.15);
}

.quick-link-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.quick-link-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #24292f;
}

html[data-theme="dark"] .quick-link-card h3 {
    color: #e6edf3;
}

.quick-link-card p {
    font-size: 0.9rem;
    color: #57606a;
    margin: 0;
    line-height: 1.4;
}

html[data-theme="dark"] .quick-link-card p {
    color: #8b949e;
}

/* ==================== FEATURED RESOURCES SECTION ==================== */
.resources-featured {
    margin: 3rem 0 0;
    padding: 2rem 2.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
    overflow: visible;
}

html[data-theme="dark"] .resources-featured {
    background: transparent;
    border-color: transparent;
}

.resources-featured::before {
    display: none;
}

.resources-header {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.resources-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0969da;
    margin: 0 0 0.5rem 0;
}

html[data-theme="dark"] .resources-header h2 {
    color: #58a6ff;
}

.resources-header p {
    color: #57606a;
    margin: 0;
    font-size: 0.95rem;
}

html[data-theme="dark"] .resources-header p {
    color: #8b949e;
}

.resources-preview {
    position: relative;
    z-index: 1;
}

.resource-preview-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

html[data-theme="dark"] .resource-preview-card {
    background: #0d1117;
    border-color: #30363d;
}

html[data-theme="dark"] .resource-preview-card-link:hover .resource-preview-card {
    border-color: #58a6ff;
    box-shadow: 0 12px 32px rgba(88, 166, 255, 0.15);
}

.resource-preview-card {
    background: #ffffff;
    border: 1.5px solid #d0d7de;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.resource-preview-card-link:hover .resource-preview-card {
    transform: translateY(-6px);
    border-color: #0969da;
    box-shadow: 0 12px 32px rgba(9, 105, 218, 0.15);
}

.resource-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #0969da;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html[data-theme="dark"] .resource-badge {
    background: #58a6ff;
    color: #0d1117;
}

.resource-preview-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.resource-preview-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #24292f;
    margin: 0 0 0.75rem 0;
}

html[data-theme="dark"] .resource-preview-card h3 {
    color: #ffffff;
}

.resource-preview-card p {
    color: #57606a;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

html[data-theme="dark"] .resource-preview-card p {
    color: #8b949e;
}

.resource-preview-actions {
    display: flex;
    gap: 1rem;
}

.btn-resources-primary {
    padding: 0.75rem 1.5rem;
    background: #0969da;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-resources-primary:hover {
    background: #0860ca;
    transform: scale(1.02);
}

html[data-theme="dark"] .btn-resources-primary {
    background: #58a6ff;
    color: #0d1117;
}

html[data-theme="dark"] .btn-resources-primary:hover {
    background: #79b8ff;
}

@media (max-width: 768px) {
    .resources-featured {
        padding: 1.5rem 0;
        margin: 2rem 0 0;
    }

    .resources-header h2 {
        font-size: 1.3rem;
    }

    .resource-preview-card {
        padding: 1.5rem;
    }
}

footer {
    background: linear-gradient(to bottom, #f6f8fa 0%, #ffffff 100%);
    border-top: 1px solid #d0d7de;
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    position: relative;
    color: #0B1117;
}

html[data-theme="dark"] footer {
    background: linear-gradient(to bottom, #0d1117 0%, #161b22 100%);
    border-top-color: #30363d;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #24292f;
    margin-bottom: 1rem;
}

html[data-theme="dark"] .footer-section h3 {
    color: #ffffff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #0969da;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    font-weight: 500;
}

html[data-theme="dark"] .footer-links a {
    color: #58a6ff;
}

.footer-links a:hover {
    color: #0969da;
    text-decoration: underline;
    transform: translateX(2px);
}

html[data-theme="dark"] .footer-links a:hover {
    color: #58a6ff;
    text-decoration: underline;
    transform: translateX(2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #d0d7de;
    position: relative;
    z-index: 1;
}

html[data-theme="dark"] .footer-bottom {
    border-top-color: #30363d;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

html[data-theme="dark"] .footer-bottom p {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.copyright-link {
    color: inherit;
    text-decoration: none;
}

.copyright-link:hover {
    color: #0969da;
}

@media (max-width: 768px) {
    footer {
        padding: 2rem 0 1rem;
        margin-top: 2.5rem;
    }
    
    .footer-content {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* ======================= RESOURCES PAGE ======================= */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.resource-card {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .resource-card {
    background: #0d1117;
    border-color: #30363d;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.15);
    border-color: #0969da;
}

html[data-theme="dark"] .resource-card:hover {
    box-shadow: 0 8px 24px rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.resource-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.resource-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #24292f;
    margin: 0;
}

html[data-theme="dark"] .resource-title {
    color: #ffffff;
}

.resource-preview {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f6f8fa;
    border-radius: 8px;
    text-align: center;
}

html[data-theme="dark"] .resource-preview {
    background: #161b22;
}

.pptx-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.pptx-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.pptx-preview p {
    margin: 0;
    color: #57606a;
    font-weight: 500;
}

html[data-theme="dark"] .pptx-preview p {
    color: #8b949e;
}

.resource-info {
    margin: 1.5rem 0;
}

.resource-description {
    color: #57606a;
    line-height: 1.6;
    font-size: 0.95rem;
}

html[data-theme="dark"] .resource-description {
    color: #8b949e;
}

.resource-details {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.detail-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #f0f6fc;
    border: 1px solid #d1e7fd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0969da;
}

html[data-theme="dark"] .detail-badge {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.2);
    color: #58a6ff;
}

.resource-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-download,
.btn-preview {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-download {
    background: #0969da;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-download:hover {
    background: #0860ca;
    transform: scale(1.02);
}

.btn-download:active {
    transform: scale(0.98);
}

.btn-preview {
    background: #f0f6fc;
    color: #0969da;
    border: 1px solid #d1e7fd;
}

.btn-preview:hover {
    background: #e8f0f8;
    border-color: #0969da;
}

html[data-theme="dark"] .btn-download {
    background: #238636;
}

html[data-theme="dark"] .btn-download:hover {
    background: #2ea043;
}

html[data-theme="dark"] .btn-preview {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border-color: rgba(88, 166, 255, 0.3);
}

html[data-theme="dark"] .btn-preview:hover {
    background: rgba(88, 166, 255, 0.25);
    border-color: #58a6ff;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 1rem;
    animation: fade-in 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="dark"] .modal-content {
    background: #0d1117;
}

@keyframes slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #d0d7de;
}

html[data-theme="dark"] .modal-header {
    border-bottom-color: #30363d;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #24292f;
}

html[data-theme="dark"] .modal-header h2 {
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #57606a;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #24292f;
    background: #f0f6fc;
    border-radius: 6px;
}

html[data-theme="dark"] .modal-close:hover {
    color: #ffffff;
    background: rgba(88, 166, 255, 0.15);
}

.modal-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* PPTX iframe embed styles */
.pptx-embed {
    width: 100%;
}

.pptx-iframe {
    width: 100%;
    height: 520px;
    border: none;
    border-radius: 8px;
    background: #ffffff;
}

html[data-theme="dark"] .pptx-iframe {
    background: #0d1117;
}

.slide-viewer {
    background: #f6f8fa;
    border-radius: 8px;
    padding: 2rem;
    min-height: 400px;
}

html[data-theme="dark"] .slide-viewer {
    background: #161b22;
}

.slide-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    margin-bottom: 1.5rem;
}

.slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 350px;
    animation: fade-in 0.3s ease;
}

.slide-content {
    text-align: center;
    padding: 2rem;
}

.slide-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0969da;
    margin: 0 0 1rem 0;
}

html[data-theme="dark"] .slide-title {
    color: #58a6ff;
}

.slide-subtitle {
    font-size: 1.1rem;
    color: #57606a;
    margin: 0;
}

html[data-theme="dark"] .slide-subtitle {
    color: #8b949e;
}

.slide-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #24292f;
    margin: 0 0 1.5rem 0;
}

html[data-theme="dark"] .slide-heading {
    color: #ffffff;
}

.slide-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: inline-block;
}

.slide-list li {
    font-size: 1rem;
    color: #24292f;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

html[data-theme="dark"] .slide-list li {
    color: #e6edf3;
}

.slide-list li:before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #0969da;
    font-weight: bold;
}

html[data-theme="dark"] .slide-list li:before {
    color: #58a6ff;
}

.slide-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

.slide-nav-btn {
    padding: 0.5rem 1rem;
    background: #0969da;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slide-nav-btn:hover {
    background: #0860ca;
}

html[data-theme="dark"] .slide-nav-btn {
    background: #58a6ff;
    color: #0d1117;
}

html[data-theme="dark"] .slide-nav-btn:hover {
    background: #79b8ff;
}

.slide-counter {
    color: #57606a;
    font-weight: 600;
    white-space: nowrap;
}

html[data-theme="dark"] .slide-counter {
    color: #8b949e;
}

.preview-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #d0d7de;
}

html[data-theme="dark"] .preview-footer {
    border-top-color: #30363d;
}

.preview-footer p {
    color: #57606a;
    margin: 0 0 1rem 0;
}

html[data-theme="dark"] .preview-footer p {
    color: #8b949e;
}

.btn-download-large {
    padding: 1rem 2rem;
    background: #0969da;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
}

.btn-download-large:hover {
    background: #0860ca;
    transform: scale(1.02);
}

html[data-theme="dark"] .btn-download-large {
    background: #58a6ff;
    color: #0d1117;
}

html[data-theme="dark"] .btn-download-large:hover {
    background: #79b8ff;
}

/* ==================== CONFETTI ANIMATION ==================== */
.confetti {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* --- REPLACE THE EXISTING @media (max-width: 768px) BLOCK WITH THIS --- */

@media (max-width: 768px) {
    /* 1. Global Spacing Fixes */
    body {
        padding-top: 60px; /* Shrink top offset */
    }

    .container {
        padding: 2rem 1.25rem; /* Drastically reduce side padding */
    }

    .page-container {
        padding-top: 1rem;
    }

    /* 2. Navigation - Horizontal Scroll Fix (Instagram Style) */
    /* This stops the buttons from stacking and taking up half the screen */
    .page-selector {
        display: flex; /* Switch from grid to flex */
        flex-wrap: nowrap;
        overflow-x: auto; /* Enable horizontal scrolling */
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
        height: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    
    .page-selector::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari */
    }

    .page-selector a {
        flex: 0 0 auto; /* Prevent shrinking */
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap; /* Keep text on one line */
        margin: 0;
    }

    /* Fix the dark mode toggle position */
    .dark-mode-toggle {
        position: fixed;
        bottom: 1.5rem; /* Move to bottom right on mobile */
        right: 1.5rem;
        top: auto; 
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        background: var(--bg-color);
        border: 1px solid var(--border-color);
    }

    /* 3. Typography Scaling */
    .page-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        word-wrap: break-word; /* Prevent long words breaking layout */
    }
    
    .main-heading {
        font-size: 3.5rem; /* Fixed size instead of VW to prevent tiny text */
    }

    .intro-text {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    /* 4. Grid & Card Fixes */
    .interests-grid,
    .projects-grid,
    .stats-grid,
    .blog-grid,
    .footer-content {
        /* Force single column */
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Fix the specific issue where cards force horizontal scrolling */
    .project-card, 
    .interest-card, 
    .debate-item,
    .blog-card,
    .timeline-event,
    .resource-preview-card {
        padding: 1.5rem; /* Reduce internal padding by half */
        width: auto;
        margin: 0; /* Remove negative margins */
        min-width: 0; /* Allow flex items to shrink below content size */
    }

    /* 5. Timeline Specifics */
    .timeline-container::before {
        left: 10px; /* Move line closer to edge */
    }

    .timeline-event {
        margin-left: 1.5rem; /* Pull events closer to the line */
        width: auto;
    }

    .timeline-event::before {
        left: -1.5rem; /* Re-align dot */
        width: 12px;
        height: 12px;
        top: 2rem;
    }

    /* 6. Footer & Animations */
    .footer-content {
        text-align: left;
    }

    /* Disable complex hover transforms on touch devices */
    .interest-card:hover, 
    .project-card:hover,
    .debate-item:hover {
        transform: none !important; 
    }
    
    /* Hide decorative elements that cause overflow */
    .home-container::before, 
    .home-container::after {
        display: none;
    }
}