:root {
    /* Light Mode (Default) */
    --bg-color: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.65);
    --border-color: rgba(255, 255, 255, 0.4);
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --accent-color: #18181b;
    --hover-bg: rgba(255, 255, 255, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    --radius: 24px;
    --timeline-line: rgba(0, 0, 0, 0.1);
    --timeline-dot: #18181b;
    --gradient-start: #3b82f6;
    --gradient-end: #f43f5e;
    --blur: 20px;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #0f0f11;
    --card-bg: rgba(20, 20, 25, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #ffffff;
    --hover-bg: rgba(255, 255, 255, 0.05);
    --timeline-line: rgba(255, 255, 255, 0.1);
    --timeline-dot: #ffffff;
    --gradient-start: #4f46e5;
    --gradient-end: #ec4899;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Background Noise */
.background-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.blob-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(244, 63, 94, 0.15), transparent 25%);
}

[data-theme="dark"] .blob-bg {
    background:
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
}

/* Layout */
.bento-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* Sidebar */
.bento-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-img-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-block h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(to right,
            #18181b 0%,
            #52525b 20%,
            #18181b 40%,
            #71717a 60%,
            #18181b 80%,
            #52525b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: shine-flow 4s linear infinite;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .gradient-text {
    background: linear-gradient(to right,
            #ffffff 0%,
            #a1a1aa 20%,
            #ffffff 40%,
            #71717a 60%,
            #ffffff 80%,
            #a1a1aa 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

@keyframes shine-flow {
    to {
        background-position: 200% center;
    }
}

.nickname {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.6em;
    vertical-align: middle;
    margin-left: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    opacity: 0.8;
}

.role {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* Navigation */
.bento-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Main Content */
.bento-main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding-top: 1rem;
}

.bento-section {
    scroll-margin-top: 4rem;
}

.section-header {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-icon {
    margin-right: 0.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Cards */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.bento-grid-wide {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.date-badge-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.badge,
.valedictorian-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    white-space: nowrap;
}

.valedictorian-badge {
    font-weight: 700;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 165, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0);
    }
}

.bento-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.large-card {
    grid-column: 1 / -1;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.card-content strong {
    color: var(--text-primary);
}

.card-header {
    margin-bottom: 1rem;
}

.card-header .date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.bento-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-family: var(--font-heading);
}

.bento-card h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.bento-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.8rem;
}

.highlight {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* Publications List */
.publications-list-bento {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pub-item-bento {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pub-item-bento:hover {
    border-color: var(--text-secondary);
    background: var(--hover-bg);
}

.venue-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bg-color);
    background: var(--text-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

.pub-item-bento h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    line-height: 1.4;
}

.pub-item-bento p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pub-item-bento strong {
    color: var(--text-primary);
}

/* Honors List */
.honors-list-bento {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.honor-row {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    align-items: baseline;
}

.honor-row:last-child {
    border-bottom: none;
}

.honor-row .year {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 50px;
}

.honor-details h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.honor-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Timeline */
.timeline-container {
    position: relative;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--timeline-line);
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--timeline-dot);
    z-index: 1;
}



/* Education Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.education-card {
    height: 100%;
}

/* Cyber Tech Particle */
.tech-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #ff7b00;
    box-shadow: 0 0 8px #ff7b00, 0 0 15px #ff4d00;
    pointer-events: none;
    z-index: 9999;
    animation: tech-drop 0.8s ease-out forwards;
    border-radius: 1px;
}

@keyframes tech-drop {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(30px) scale(0);
        opacity: 0;
    }
}

.venue-tag,
.date,
.year {
    font-family: var(--font-mono);
}

/* Floating Theme Toggle */
.theme-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    border-color: var(--text-primary);
}

/* Responsive */
@media (max-width: 900px) {
    .bento-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .bento-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .bento-nav {
        display: none;
    }

    .timeline-container {
        padding-left: 1.5rem;
    }

    .timeline-container::before {
        left: 0;
    }

    .timeline-dot {
        left: -1.95rem;
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr;
    }
}