:root {
    /* Default Light Mode (Slate Premium) */
    --bg-color: #f8fafc;
    --bg-secondary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-color: #191970;
    --accent-secondary: #2563eb;
    --pill-bg: #e2e8f0;

    /* Card Styling */
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-hover-bg: rgba(255, 255, 255, 1);
    --card-border: 1px solid rgba(226, 232, 240, 0.8);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --card-radius: 20px;

    /* Spacing & Layout */
    --max-width: 1100px;
    --nav-height: 70px;
    --section-spacing: 120px;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-header: 'Inter', sans-serif;
}

/* Dark Mode Overrides (Midnight Premium) */
/* Dark Mode Overrides (Midnight Premium) */
[data-theme='dark'] {
    --bg-color: #0b0f1a;
    --bg-secondary: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-color: #38bdf8;
    --accent-secondary: #60a5fa;
    --pill-bg: #1e293b;

    --card-bg: #161c2d;
    /* Solid for navbar/card base in dark mode */
    --card-hover-bg: #1e293b;
    --card-border: 1px solid rgba(255, 255, 255, 0.1);
    --nav-border: 1px solid rgba(56, 189, 248, 0.4);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-header);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(48px, 8vw, 84px);
    line-height: 1.05;
    margin-bottom: 24px;
}

h2.section-title {
    font-size: 32px;
    margin-bottom: 60px;
    text-align: center;
    display: table;
    margin: 0 auto 60px auto;
    background: transparent;
    color: var(--text-primary);
    padding: 12px 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    position: relative;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-secondary);
    border-radius: 4px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navigation */
/* Navigation */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--max-width);
    height: 70px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: var(--nav-border, var(--card-border));
    border-radius: 100px;
    z-index: 1000;
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.2, 0, 0, 1);
}

.navbar.navbar-scrolled {
    background: var(--bg-color);
    /* Slightly more opaque or themed background on scroll */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    top: 15px;
    /* Subtle lift */
}

[data-theme='dark'] .navbar.navbar-scrolled {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.nav-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo-group {
    display: flex;
    align-items: center;
}

.logo {
    font-weight: 900;
    font-size: 24px;
    color: var(--accent-color);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 16px;
    list-style: none;
    align-items: center;
    padding: 0 10px;
}

.nav-links li {
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), margin 0.25s ease;
    display: flex;
    align-items: center;
}

.nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
}

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

.btn-contact {
    font-weight: 700 !important;
    color: var(--accent-secondary) !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 24px 80px;
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
}

.hero-content {
    z-index: 2;
    max-width: 900px;
}

.subtitle {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 32px;
    font-weight: 700;
}

.intro-text {
    max-width: 700px;
    margin: 0 auto 48px;
    font-size: 20px;
    color: var(--text-secondary);
}

.cta-group {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.btn {
    padding: 16px 36px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: #fff !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.5);
    filter: brightness(1.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary) !important;
    border: var(--card-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    transform: translateY(-5px) scale(1.03);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary) !important;
}

/* Background Elements */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    top: -100px;
    right: -100px;
    animation: float 12s infinite ease-in-out;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: var(--accent-color);
    bottom: -50px;
    left: -50px;
    animation: float 15s infinite ease-in-out reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #cbd5e1;
    top: 30%;
    left: 40%;
    animation: float 18s infinite ease-in-out 2s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 30px);
    }

    100% {
        transform: translate(0, 0);
    }
}



.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Sections */
.section {
    padding: var(--section-spacing) 0;
}



/* Cards */
.glass-card {
    display: block;
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--card-radius);
    padding: 40px;
    box-shadow: var(--card-shadow);
    transition: transform 0.15s ease-out, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Spotlight Glow Effect (Aceternity Style) */
.glass-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
            rgba(37, 99, 235, 0.08),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 3;
}

.glass-card:hover::after {
    opacity: 1;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-15px) rotateX(2deg) rotateY(1deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), 0 0 20px rgba(37, 99, 235, 0.1);
    background: var(--card-hover-bg);
}

.glass-card:hover::before {
    opacity: 1;
}

/* Academic Journey Section */
.edu-journey-section {
    padding: 120px 20px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.edu-journey-section .container {
    max-width: 1024px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.journey-header {
    text-align: center;
    margin-bottom: 80px;
}

.journey-header h2 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 20px;
}

.journey-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.journey-grid {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 100px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* SVG Line Overlay */
.spiral-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
}

.spiral-path {
    stroke: var(--text-primary);
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 10 5;
    opacity: 0.6;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.arrowhead {
    fill: var(--text-primary);
    opacity: 0.8;
}

/* Education Cards Custom Positioning */
.edu-row {
    display: flex;
    width: 100%;
}

.edu-row.right {
    justify-content: flex-end;
}

.edu-row.left {
    justify-content: flex-start;
}

.edu-journey-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border-radius: 20px;
    background: var(--card-bg);
    border: var(--card-border);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.edu-journey-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover-bg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.edu-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--accent-color), transparent 70%);
    opacity: 0.05;
    filter: blur(20px);
    z-index: 0;
}

.edu-row.right .edu-glow {
    top: -20px;
    right: -20px;
}

.edu-row.left .edu-glow {
    bottom: -20px;
    left: -20px;
}

.edu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.edu-card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.edu-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.edu-icon-badge {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-secondary);
}

.edu-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    margin: 15px 0;
}

.edu-degree {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.edu-minor {
    color: var(--accent-secondary);
    font-style: italic;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 15px;
}

.edu-tags-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.edu-journey-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.edu-journey-tags span {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--pill-bg);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.edu-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.edu-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.edu-badge.period {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-secondary);
}

.edu-badge.achievement {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(25, 25, 112, 0.2);
}

@media (max-width: 768px) {
    .spiral-container {
        display: none;
    }

    .edu-journey-card {
        max-width: 100%;
    }

    .edu-row.right,
    .edu-row.left {
        justify-content: center;
    }
}

.school {
    font-weight: 600;
    color: var(--text-primary);
    margin: 5px 0;
}

.edu-content {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gpa {
    display: block;
    font-size: 14px;
    color: var(--accent-secondary);
    font-weight: 700;
    margin-bottom: 15px;
}

.coursework {
    margin-top: 15px;
}

.coursework h5 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.course-tags span {
    font-size: 11px;
    background: var(--pill-bg);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 600;
    color: var(--text-secondary);
}

.year {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: 8px;
}

/* Timeline */

/* Focus Carousel - Main Spotlight Style */

/* =============================================
   PROJECT CARDS - Vertical Accordion (Top to Bottom)
   ============================================= */
.gallery-wrapper {
    width: 100%;
}

.projects-gallery {
    display: flex;
    flex-direction: column;
    /* VERTICAL stack */
    gap: 8px;
    width: 100%;
}

/* Each project card */
.pc {
    min-height: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    height: 70px;
    transition: height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    /* dark fallback */
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* On hover, this card expands downward */
.pc:hover {
    height: 340px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* --- Background Image always covers the full card --- */
.pc-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.5s ease;
}

/* Darken image on hover so text pops */
.pc:hover .pc-image img {
    filter: brightness(0.4);
}

/* Always-visible overlay: dark gradient + title strip */
.pc-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.15) 100%);
    transition: opacity 0.4s ease;
    gap: 16px;
    z-index: 2;
}

/* Hide the overlay when expanded (details take over) */
.pc:hover .pc-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Category badge in the collapsed bar */
.pc-overlay .pc-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.12);
    padding: 3px 8px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    display: block;
}

/* Title in the collapsed bar */
.pc-overlay h3 {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

/* --- Details Panel (fades in when hovered) --- */
.pc-details {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 32px;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    z-index: 3;
}

.pc:hover .pc-details {
    opacity: 1;
    pointer-events: all;
}

.pc-details-inner {
    color: white;
    display: flex;
    flex-direction: column;
    /* stack vertically */
    gap: 0;
}

/* No more two-column layout */

.pc-details-inner .pc-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    display: block;
}

.pc-details-inner h3 {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.pc-details-inner p {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pc-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.pc-tech span {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.pc-github {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: var(--accent-secondary);
    padding: 9px 18px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    align-self: flex-start;
    /* don't stretch full width */
    margin-top: 4px;
}

.pc-github:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Responsive: same layout on mobile, just tighter */
@media (max-width: 768px) {
    .pc {
        height: 60px;
    }

    .pc:hover {
        height: 320px;
    }

    .pc-details-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
}

.project-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 20px;
    margin: 16px 0 8px;
    color: var(--text-primary);
}

.project-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: auto;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tech-stack span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-secondary);
    background: var(--pill-bg);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-secondary);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .bento-wide {
        grid-column: span 1;
    }
}



.tech-stack span {
    font-size: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* Skills - Master Bento Overhaul */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 25px;
}

.skill-category {
    background: var(--card-bg);
    border: var(--card-border);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 35px;
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.05), transparent 50%);
    pointer-events: none;
}

/* Staggered Master Layout */
.skill-category:nth-child(1) {
    grid-column: span 4;
}

.skill-category:nth-child(2) {
    grid-column: span 8;
}

.skill-category:nth-child(3) {
    grid-column: span 7;
}

.skill-category:nth-child(4) {
    grid-column: span 5;
}

@media (max-width: 1000px) {
    .skill-category:nth-child(n) {
        grid-column: span 12 !important;
    }
}

.skill-category:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.skill-category h3 {
    font-size: 22px;
    margin-bottom: 25px;
    text-align: left;
    color: var(--text-primary);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
}

.skill-category svg {
    color: var(--accent-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.skill-tags span {
    background: var(--pill-bg);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tags span:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: scale(1.05);
}

/* Contact/Footer */
.footer-section {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto 60px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.contact-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-primary);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-icon-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 20px rgba(25, 25, 112, 0.15);
    color: #fff;
    background: var(--accent-color);
    border-color: var(--accent-color);
}

footer {
    color: var(--text-secondary);
    font-size: 14px;
    padding-top: 40px;
    font-weight: 600;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Skills - Scroll Stack System */
.scroll-stack-section {
    padding-bottom: 300px !important;
    /* Extra space for stacking depth */
}

.scroll-stack-section .skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: 850px;
    margin: 50px auto 0;
    position: relative;
}

.scroll-stack-card {
    position: relative;
    width: 100%;
    transform-origin: center top;
    will-change: transform;
    z-index: 1;
}

.scroll-stack-end {
    height: 100px;
    width: 100%;
}

/* Ensure individual category spans are reset in stack mode */
.scroll-stack-section .skill-category {
    grid-column: span 12 !important;
}

@media (max-width: 768px) {
    .scroll-stack-section {
        padding-bottom: 80px !important;
    }

    .scroll-stack-section .skills-wrapper {
        gap: 25px;
    }

    h1 {
        font-size: 40px;
    }

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

    .nav-links {
        display: none;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-marker {
        left: -28px;
    }

    .navbar {
        width: 95%;
    }
}

/* Loading Screen Styles */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-btn {
    height: 4em;
    width: 12em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0px solid black;
    cursor: default;
    font-family: var(--font-main);
    font-weight: bold;
}

.loader-flower-wrapper {
    height: 2em;
    width: 8em;
    position: relative;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-text {
    font-size: 17px;
    z-index: 1;
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    transition: none 0.5s;
}

.loader-flower {
    display: grid;
    grid-template-columns: 1.5em 1.5em;
    /* Expanded by default for animation */
    position: absolute;
    transition: none 0.5s;
}

.loader-flower1 {
    top: -12px;
    left: -13px;
    animation: 15s linear 0s normal none infinite running loader-flower1;
}

@keyframes loader-flower1 {
    0% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(365deg);
    }
}

.loader-flower2 {
    bottom: -5px;
    left: 8px;
    animation: 13s linear 1s normal none infinite running loader-flower2;
}

@keyframes loader-flower2 {
    0% {
        transform: rotate(35deg);
    }

    100% {
        transform: rotate(-325deg);
    }
}

.loader-flower3 {
    bottom: -15px;
    animation: 16s linear 1s normal none infinite running loader-flower3;
}

@keyframes loader-flower3 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-flower4 {
    top: -14px;
    animation: 17s linear 1s normal none infinite running loader-flower4;
}

@keyframes loader-flower4 {
    0% {
        transform: rotate(15deg);
    }

    100% {
        transform: rotate(375deg);
    }
}

.loader-flower5 {
    right: 11px;
    top: -3px;
    animation: 20s linear 1s normal none infinite running loader-flower5;
}

@keyframes loader-flower5 {
    0% {
        transform: rotate(25deg);
    }

    100% {
        transform: rotate(-335deg);
    }
}

.loader-flower6 {
    right: -15px;
    bottom: -15px;
    animation: 15s linear 1s normal none infinite running loader-flower6;
}

@keyframes loader-flower6 {
    0% {
        transform: rotate(30deg);
    }

    100% {
        transform: rotate(390deg);
    }
}

.loader-petal {
    height: 1.5em;
    width: 1.5em;
    border-radius: 40% 70% / 7% 90%;
    background: var(--accent-secondary);
    border: 0.5px solid var(--accent-color);
    z-index: 0;
}

.loader-petal.two {
    transform: rotate(90deg);
}

.loader-petal.three {
    transform: rotate(270deg);
}

.loader-petal.four {
    transform: rotate(180deg);
}

/* Experience & Research Section */
.split-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 1024px) {
    .split-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content .date {
    display: inline-block;
    padding: 3px 12px;
    background: var(--pill-bg);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.timeline-content h3 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.timeline-content .company {
    display: block;
    font-size: 16px;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline-list {
    list-style: none;
    padding: 0;
}

.timeline-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Research Card Override */
.research-col .research-card {
    padding: 30px;
}

.research-col .journal {
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 14px;
}

.coursework {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--pill-bg);
}

.coursework h5 {
    font-size: 14px;
    margin-bottom: 12px;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.course-tags span {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--pill-bg);
    border-radius: 6px;
    color: var(--text-secondary);
}


/* Uiverse Theme Switch Styles */
.theme-switch {
    --toggle-size: 14px;
    /* Scaled for nav */
    --container-width: 5.625em;
    --container-height: 2.5em;
    --container-radius: 6.25em;
    --container-light-bg: #3D7EAE;
    --container-night-bg: #1D1F2C;
    --circle-container-diameter: 3.375em;
    --sun-moon-diameter: 2.125em;
    --sun-bg: #ECCA2F;
    --moon-bg: #C4C9D1;
    --spot-color: #959DB1;
    --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
    --stars-color: #fff;
    --clouds-color: #F3FDFF;
    --back-clouds-color: #AACADF;
    --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
    --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
}

.theme-switch,
.theme-switch *,
.theme-switch *::before,
.theme-switch *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: var(--toggle-size);
}

.theme-switch__container {
    width: var(--container-width);
    height: var(--container-height);
    background-color: var(--container-light-bg);
    border-radius: var(--container-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
    transition: var(--transition);
    position: relative;
}

.theme-switch__container::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
    border-radius: var(--container-radius)
}

.theme-switch__checkbox {
    display: none;
}

.theme-switch__circle-container {
    width: var(--circle-container-diameter);
    height: var(--circle-container-diameter);
    background-color: rgba(255, 255, 255, 0.1);
    position: absolute;
    left: var(--circle-container-offset);
    top: var(--circle-container-offset);
    border-radius: var(--container-radius);
    box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
    display: flex;
    transition: var(--circle-transition);
    pointer-events: none;
}

.theme-switch__sun-moon-container {
    pointer-events: auto;
    position: relative;
    z-index: 2;
    width: var(--sun-moon-diameter);
    height: var(--sun-moon-diameter);
    margin: auto;
    border-radius: var(--container-radius);
    background-color: var(--sun-bg);
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
    filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
    overflow: hidden;
    transition: var(--transition);
}

.theme-switch__moon {
    transform: translateX(100%);
    width: 100%;
    height: 100%;
    background-color: var(--moon-bg);
    border-radius: inherit;
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
    transition: var(--transition);
    position: relative;
}

.theme-switch__spot {
    position: absolute;
    top: 0.75em;
    left: 0.312em;
    width: 0.75em;
    height: 0.75em;
    border-radius: var(--container-radius);
    background-color: var(--spot-color);
    box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}

.theme-switch__spot:nth-of-type(2) {
    width: 0.375em;
    height: 0.375em;
    top: 0.937em;
    left: 1.375em;
}

.theme-switch__spot:nth-last-of-type(3) {
    width: 0.25em;
    height: 0.25em;
    top: 0.312em;
    left: 0.812em;
}

.theme-switch__clouds {
    width: 1.25em;
    height: 1.25em;
    background-color: var(--clouds-color);
    border-radius: var(--container-radius);
    position: absolute;
    bottom: -0.625em;
    left: 0.312em;
    box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--clouds-color);
    transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}

.theme-switch__stars-container {
    position: absolute;
    color: var(--stars-color);
    top: -100%;
    left: 0.312em;
    width: 2.75em;
    height: auto;
    transition: var(--transition);
}

.theme-switch__checkbox:checked+.theme-switch__container {
    background-color: var(--container-night-bg);
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__circle-container {
    left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__moon {
    transform: translate(0);
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__clouds {
    bottom: -4.062em;
}

.theme-switch__checkbox:checked+.theme-switch__container .theme-switch__stars-container {
    top: 50%;
    transform: translateY(-50%);
}

footer {
    position: relative;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.page-views-text {
    position: absolute;
    right: 0;
    bottom: 20px; /* Aligns with the padding of the footer */
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: right;
}

#view-count {
    font-weight: 700;
    color: var(--accent-secondary);
}

@media (max-width: 768px) {
    .page-views-text {
        position: static;
        text-align: center;
        margin-top: 15px;
    }
}