/* CSS Variables for Light/Dark Mode & LSU Theme */
:root {
    --primary-color: #461D7C; /* LSU Purple */
    --accent-color: #FDD023; /* LSU Gold */
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --section-bg: #ffffff;
    --hero-bg: #f8f9fa;
    --footer-bg: #f1f1f1;
    --footer-text: #6c757d;
    --link-hover: var(--accent-color);
    --code-bg: #f6f8fa;
    --border-color: #dee2e6;
    --content-block-bg: #f8f9fa; /* Slight grey for boxes */
}

body.dark-mode {
    --primary-color: #461D7C;
    --accent-color: #FDD023;
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --section-bg: #1e1e1e;
    --hero-bg: #252525;
    --footer-bg: #1a1a1a;
    --footer-text: #a0a0a0;
    --link-hover: #ffe066;
    --code-bg: #2d2d2d;
    --border-color: #333333;
    --content-block-bg: #252525;
}

/* Smooth scrolling & Transitions */
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-color);
}

/* Custom scrollbar — WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), #5a2a9a);
    border-radius: 999px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a2a9a, var(--primary-color));
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-color), #d9a800);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d9a800, var(--accent-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease; /* THIS IS THE SLIDE ANIMATION */
}

header.hidden {
    transform: translateY(-100%);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 10px;
    /* --- NEW: Prevents shrinking on mobile --- */
    flex-shrink: 0;
}

/* Rule for the clickable logo */
.lsu-logo-link {
    display: inline-block;
    line-height: 0; /* Prevents extra space */
}

.header-img {
    width: 50px;
    height: auto;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    margin: 0;
}

/* This is the perfect DESKTOP layout */
nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
    color: var(--link-hover);
}

nav a:hover::after {
    width: 100%;
}

.hamburger {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001; /* Make sure it's on top */
}

#dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    position: relative;
    margin: 0 10px;
}

.sun-icon, .moon-icon {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s;
    stroke: #fff;
}

body.dark-mode .sun-icon {
    opacity: 1;
}

body.dark-mode .moon-icon {
    opacity: 0;
}

.sun-icon {
    opacity: 0;
}

.moon-icon {
    opacity: 1;
}

/* Main */
main {
    padding-top: 80px; /* THIS IS BASED ON THE HEADER PADDING */
    counter-reset: section-counter;
}

main > section {
    counter-increment: section-counter;
}

/* Section numbers (01, 02, 03...) as a gold pill before each h2 */
main > section h2::before {
    content: counter(section-counter, decimal-leading-zero);
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), #ffeb7a);
    color: var(--primary-color);
    font-size: 0.42em;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    margin-right: 14px;
    vertical-align: middle;
    letter-spacing: 0.12em;
    box-shadow: 0 2px 8px rgba(253, 208, 35, 0.3);
    transform: translateY(-4px);
    font-family: 'Inter', sans-serif;
}

body.dark-mode main > section h2::before {
    background: linear-gradient(135deg, var(--primary-color), #5a2a9a);
    color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(70, 29, 124, 0.45);
}

/* Announcement Banner (promotes vexel.wtf) */
.announcement-banner {
    display: block;
    background: linear-gradient(90deg, #FDD023, #ffdc4a, #FDD023);
    color: #461D7C;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(70, 29, 124, 0.15);
    border-bottom: 2px solid #461D7C;
    position: relative;
    overflow: hidden;
    animation: bannerSlideIn 0.6s ease-out;
}

.announcement-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: bannerShimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bannerShimmer {
    0%, 100% { left: -60%; }
    50% { left: 130%; }
}

.announcement-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.announcement-text {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.announcement-badge {
    background-color: #461D7C;
    color: #FDD023;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 10px;
    margin-right: 8px;
    letter-spacing: 1px;
    display: inline-block;
    vertical-align: middle;
}

.announcement-text a {
    color: #461D7C;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.announcement-text a:hover {
    color: #2a0f4d;
}

@keyframes bannerSlideIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Status chip — "Currently..." pill in hero */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 12px;
    background-color: rgba(70, 29, 124, 0.06);
    border: 1px solid rgba(70, 29, 124, 0.2);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

body.dark-mode .status-chip {
    background-color: rgba(253, 208, 35, 0.07);
    border-color: rgba(253, 208, 35, 0.25);
}

.status-dot {
    position: relative;
    display: inline-block;
    width: 9px;
    height: 9px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    flex-shrink: 0;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #22c55e;
    border-radius: 50%;
    animation: statusPing 2s ease infinite;
}

@keyframes statusPing {
    0% { transform: scale(1); opacity: 0.75; }
    75%, 100% { transform: scale(2.8); opacity: 0; }
}

/* Skill chips (Skills section + Project tech stacks) */
.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-category {
    text-align: left;
    padding: 22px;
}

.skill-category-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(253, 208, 35, 0.45);
    letter-spacing: -0.01em;
}

body.dark-mode .skill-category-title {
    color: #e0d4f5;
    border-bottom-color: rgba(253, 208, 35, 0.4);
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-chip {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(70, 29, 124, 0.08);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid rgba(70, 29, 124, 0.2);
    transition: background-color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    cursor: default;
}

.skill-chip:hover {
    background-color: rgba(70, 29, 124, 0.15);
    border-color: rgba(70, 29, 124, 0.35);
    transform: translateY(-1px);
}

body.dark-mode .skill-chip {
    background-color: rgba(253, 208, 35, 0.08);
    color: var(--accent-color);
    border-color: rgba(253, 208, 35, 0.25);
}

body.dark-mode .skill-chip:hover {
    background-color: rgba(253, 208, 35, 0.15);
    border-color: rgba(253, 208, 35, 0.4);
}

/* Project cards */
.project-card {
    position: relative;
    text-align: left;
    padding: 28px;
}

.project-card h3 {
    margin-top: 4px;
    margin-bottom: 12px;
}

.project-card p {
    text-align: left;
    max-width: none;
    margin: 0 0 16px;
}

.project-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(253, 208, 35, 0.2);
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    margin-bottom: 6px;
}

body.dark-mode .project-tag {
    background-color: rgba(253, 208, 35, 0.15);
    color: var(--accent-color);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.project-card .btn-cta {
    align-self: flex-start;
}

/* Hero CTA buttons (View Resume / Get in Touch) */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 28px 0 8px;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px rgba(70, 29, 124, 0.25);
    transition: background-color 0.3s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-cta:hover {
    background-color: #38165f;
    border-color: #38165f;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(70, 29, 124, 0.4);
}

.btn-cta.btn-cta-outline {
    background-color: transparent;
    color: var(--primary-color);
    box-shadow: none;
}

.btn-cta.btn-cta-outline:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 22px rgba(70, 29, 124, 0.35);
}

body.dark-mode .btn-cta.btn-cta-outline {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

body.dark-mode .btn-cta.btn-cta-outline:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: 0 8px 22px rgba(253, 208, 35, 0.3);
}

/* Inline link style for the Blog/Updates vexel.wtf link */
.inline-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.inline-link:hover {
    color: var(--link-hover);
}

body.dark-mode .inline-link {
    color: var(--accent-color);
}

/* Sections with Fade-In Animation and Even Spacing */
section {
    padding: 80px 20px;
    text-align: center;
    background-color: var(--section-bg);
    transition: background-color 0.3s ease;

    /* Subtle flowing accent — slow and non-distracting */
    background:
        linear-gradient(270deg, var(--section-bg) 0%, rgba(253, 208, 35, 0.05) 30%, rgba(70, 29, 124, 0.07) 70%, var(--section-bg) 100%);
    background-size: 300% 300%;
    animation: flowAnimation 45s ease-in-out infinite;
}

main section:last-of-type {
    padding-bottom: 40px;
}


section.hero {
    background-color: var(--hero-bg);
    background:
        radial-gradient(circle at 15% 20%, rgba(70, 29, 124, 0.09), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(253, 208, 35, 0.11), transparent 45%),
        var(--hero-bg);
    animation: none;
    position: relative;
}

.content {
    max-width: 1100px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 14px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

body.dark-mode h2 {
    color: #e0d4f5;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 20px;
}

.profile-img {
    display: block;
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow:
        0 0 0 4px rgba(253, 208, 35, 0.4),
        0 0 0 8px rgba(70, 29, 124, 0.12),
        0 10px 28px rgba(70, 29, 124, 0.2);
    margin: 0 auto 24px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.profile-img:hover {
    transform: scale(1.03);
    box-shadow:
        0 0 0 5px rgba(253, 208, 35, 0.55),
        0 0 0 10px rgba(70, 29, 124, 0.18),
        0 14px 36px rgba(70, 29, 124, 0.28);
}

button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(70, 29, 124, 0.22);
    transition: background-color 0.3s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

button:hover {
    background-color: #38165f;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(70, 29, 124, 0.38);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(70, 29, 124, 0.25);
}

/* Don't apply the filled-button hover to icon/utility buttons */
.hamburger:hover,
.hamburger:active {
    background: transparent;
    box-shadow: none;
    transform: none;
}

#dark-mode-toggle:hover,
#dark-mode-toggle:active {
    background: transparent;
    box-shadow: none;
    transform: none;
}

#fun-fact-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px dashed rgba(70, 29, 124, 0.35);
    box-shadow: none;
    font-size: 0.9rem;
    padding: 8px 18px;
    margin-top: 8px;
}

#fun-fact-btn:hover {
    background: rgba(70, 29, 124, 0.08);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: none;
    transform: translateY(-1px);
}

body.dark-mode #fun-fact-btn {
    color: var(--accent-color);
    border-color: rgba(253, 208, 35, 0.35);
}

body.dark-mode #fun-fact-btn:hover {
    background: rgba(253, 208, 35, 0.08);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#fun-fact:not(.hidden) {
    display: block;
    opacity: 1;
    margin-top: 20px;
}

#fun-fact {
    text-align: center;
}

#fun-fact p {
    margin-bottom: 0;
}

/* Reusable .card class for DRY principle */
.card {
    background-color: var(--content-block-bg);
    padding: 22px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(70, 29, 124, 0.14), 0 4px 10px rgba(0, 0, 0, 0.04);
    border-color: rgba(70, 29, 124, 0.25);
}

body.dark-mode .card:hover {
    box-shadow: 0 14px 30px rgba(253, 208, 35, 0.08), 0 4px 10px rgba(0, 0, 0, 0.35);
    border-color: rgba(253, 208, 35, 0.25);
}

/* Simplified .content-block */
.content-block {
    margin: 0 auto 10px;
    max-width: 800px;
    text-align: center; /* Center text in boxes */
}

/* UPDATED: New style for Certifications divider */
.section-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    opacity: 0.5;
    margin: 20px auto;
    width: 80%;
}

/* UPDATED: New styles for interactive course grid */
.coursework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 20px auto 0;
}

.course-card {
    background-color: var(--bg-color); /* Use a slightly different bg */
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px 15px;
    text-align: center;
    cursor: default;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-height: 60px; /* Prevents layout jump on hover */
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.course-description {
    font-size: 0.9rem;
    text-align: left;
    margin: 0; /* Clear default margins */
    padding: 0;
    line-height: 1.4;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease-out;
}

.course-card:hover .course-description {
    margin-top: 15px; /* Add space when it appears */
    max-height: 200px; /* Set to a height taller than it will ever be */
    opacity: 1;
}


/* Skills & Resources & Social (List-Based Blocks) */
.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    list-style: none;
    text-align: center; /* Center text in list items */
    max-width: 800px;
    margin: 0 auto;
}

.skills-list li {
    padding: 15px; /* Kept specific padding */
}

.social-list li {
    display: flex;
    align-items: center;
    justify-content: center; /* Center content horizontally */
    gap: 10px;
    flex-wrap: wrap; /* Wrap on small screens */
}

/* === NEW: Styles for Clickable Cards (Resources/Social) === */

/* 1. Add this to the <li> (the card) to remove padding */
.card.clickable {
    padding: 0;
}

/* 2. This is the new <a> tag that fills the card */
.clickable-card-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px; /* This was the padding on the card */
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 5px; /* Match the card's border-radius */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 3. Add a subtle hover effect to the link itself */
.clickable-card-link:hover {
    background-color: rgba(0,0,0,0.03); /* Faint dark hover */
    color: var(--text-color); /* Override default link hover */
}
body.dark-mode .clickable-card-link:hover {
    background-color: rgba(255,255,255,0.05); /* Faint light hover */
    color: var(--text-color);
}

/* 4. Styles for the new resource icons */
.resource-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

/* 5. Styles for the text next to the icon */
.resource-text {
    text-align: left;
    flex-grow: 1;
}

/* 6. This is the new class for the social media text */
.social-text {
    font-weight: 600;
}
/* === END of new styles === */


/* Password Strength Analyzer */
.demo-warning {
    font-size: 0.9rem;
    background-color: rgba(253, 208, 35, 0.15);
    border-left: 3px solid var(--accent-color);
    padding: 10px 14px;
    border-radius: 4px;
    margin: 0 auto 16px;
    max-width: 600px;
    text-align: left;
}

body.dark-mode .demo-warning {
    background-color: rgba(253, 208, 35, 0.08);
}

#password-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: var(--section-bg);
    color: var(--text-color);
}

#strength-bar-container {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

#strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.5s ease, background-color 0.5s ease;
}

.strength-text {
    font-weight: 600;
    text-align: center;
}

/* Social Icons */
.social-icon {
    width: 30px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.social-list li:hover .social-icon {
    transform: scale(1.1);
}

/* === THIS ENTIRE BLOCK IS UPDATED === */
/* GitHub Link in Publications */
.github-link {
    display: flex;
    flex-direction: column; /* Stack text and button */
    align-items: center;
    justify-content: center;
    gap: 20px; /* Space between text and button */
}

.github-link p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0; /* Remove default p margins */
    max-width: 600px; /* Ensure text wraps nicely */
}

.github-button {
    /* Borrowing from 'button' style */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.github-button:hover {
    background-color: #38165f;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.github-button .github-icon {
    width: 24px;
    height: 24px;
    filter: invert(1); /* Assumes black logo, turns it white */
}
/* === END OF UPDATED BLOCK === */


/* Contact Form Styles (Clean, Minimal Vibes) */
#contact form {
    max-width: 600px;
    margin: 0 auto 40px; 
    text-align: left;
}

#contact label {
    display: block;
    margin-top: 20px; 
    font-weight: 500; 
    color: var(--text-color);
}

#contact input, #contact textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 25px; 
    border: 1px solid var(--border-color);
    border-radius: 8px; 
    background-color: var(--section-bg);
    color: var(--text-color);
    box-shadow: none; 
    transition: border-color 0.3s ease;
}

#contact input:focus, #contact textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(70, 29, 124, 0.12);
}

/* Keyboard-visible focus ring for all interactive elements */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 4px;
}

#contact button {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 1.1rem; 
}

.cf-turnstile {
    margin: 0 auto 25px; 
    text-align: center; 
    display: block; 
}

/* Clean Email Links (No Boxes, Simple List) */
.contact-list {
    list-style: none;
    padding: 0;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-list li {
    margin-bottom: 20px; 
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.contact-list li strong {
    font-weight: 500; 
    margin-right: 10px;
    color: var(--text-color);
}

.contact-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-list a:hover {
    color: var(--link-hover);
}

/* Inline Form Message Styles (Cute with rounded corners) */
.form-message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 0;
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease;
    font-size: 1.1rem;
}

.form-message.success {
    background-color: #d4edda;
    color: green;
}

.form-message.error {
    background-color: #f8d7da;
    color: red;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.footer-links li {
    transition: transform 0.3s ease;
}

.footer-links li:hover {
    transform: translateY(-5px);
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--link-hover);
}

.resume-link {
    display: block;
    margin-top: 20px;
    color: var(--link-hover);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.resume-link:hover {
    color: #38165f;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, var(--primary-color), #5a2a9a);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(70, 29, 124, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    z-index: 1000;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(70, 29, 124, 0.5);
    background: linear-gradient(135deg, #5a2a9a, var(--primary-color));
}

/* Keyframes for Flowing Background */
@keyframes flowAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Classes for Scroll-In Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger only grid/list items — not every nested card */
.fade-in-section .coursework-grid > .course-card,
.fade-in-section .skills-list > li,
.fade-in-section .skills-categories > .skill-category {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-section.is-visible .coursework-grid > .course-card,
.fade-in-section.is-visible .skills-list > li,
.fade-in-section.is-visible .skills-categories > .skill-category {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-section.is-visible .coursework-grid > .course-card:nth-child(1),
.fade-in-section.is-visible .skills-list > li:nth-child(1),
.fade-in-section.is-visible .skills-categories > .skill-category:nth-child(1) { transition-delay: 0.08s; }
.fade-in-section.is-visible .coursework-grid > .course-card:nth-child(2),
.fade-in-section.is-visible .skills-list > li:nth-child(2),
.fade-in-section.is-visible .skills-categories > .skill-category:nth-child(2) { transition-delay: 0.16s; }
.fade-in-section.is-visible .coursework-grid > .course-card:nth-child(3),
.fade-in-section.is-visible .skills-list > li:nth-child(3),
.fade-in-section.is-visible .skills-categories > .skill-category:nth-child(3) { transition-delay: 0.24s; }
.fade-in-section.is-visible .coursework-grid > .course-card:nth-child(4),
.fade-in-section.is-visible .skills-list > li:nth-child(4),
.fade-in-section.is-visible .skills-categories > .skill-category:nth-child(4) { transition-delay: 0.32s; }
.fade-in-section.is-visible .coursework-grid > .course-card:nth-child(5),
.fade-in-section.is-visible .skills-list > li:nth-child(5),
.fade-in-section.is-visible .skills-categories > .skill-category:nth-child(5) { transition-delay: 0.4s; }
.fade-in-section.is-visible .coursework-grid > .course-card:nth-child(6),
.fade-in-section.is-visible .skills-list > li:nth-child(6),
.fade-in-section.is-visible .skills-categories > .skill-category:nth-child(6) { transition-delay: 0.48s; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in-section,
    .fade-in-section .coursework-grid > .course-card,
    .fade-in-section .skills-list > li,
    .fade-in-section .skills-categories > .skill-category,
    .status-dot::after {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }
    section,
    .announcement-banner::before {
        animation: none;
    }
}


/* === ALL MOBILE FIXES ARE IN THIS MEDIA QUERY === */
@media (max-width: 768px) {
    
    /* 1. Prevent "Colin Lee" from wrapping */
    .header-content h1 {
        white-space: nowrap;
        font-size: 1.5rem; /* Shrink to fit */
    }
    .header-content .header-img {
        width: 40px; /* Shrink logo to help */
    }

    /* 2. Reposition the main dropdown menu */
    nav ul {
        display: none; /* Hide links by default */
        flex-direction: column;
        gap: 10px;
        width: 100%;
        position: absolute;
        top: 100%; /* Place it right below the header */
        left: 0;
        background-color: var(--primary-color);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        padding: 10px 20px; /* Add left/right padding */
    }

    nav ul.active {
        display: flex; /* Show the dropdown */
    }

    /* 3. Show the hamburger menu */
    .hamburger {
        display: block;
        /* It's grouped with the nav, so it appears on the right */
    }

    /* 4. Group the toggle button with the hamburger */
    #dark-mode-toggle {
        margin: 0 0 0 10px; /* Add space between ham/toggle */
    }

    /* 5. Fix page content overlap */
    main {
        padding-top: 80px; /* Was 120px, now matches new header */
    }

    /* --- Other mobile styles (unchanged) --- */
    section {
        padding: 40px 15px; 
    }
    
    main section:last-of-type {
        padding-bottom: 20px; 
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1rem;
    }

    .content-block,
    .skills-list,
    .coursework-grid { 
        grid-template-columns: 1fr; 
    }
    
    .coursework-grid {
        max-width: 100%; 
    }

    .social-list li {
        justify-content: center; 
    }

    /* NEW: Make clickable card links stack vertically on mobile */
    .clickable-card-link {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .resource-text {
        text-align: center;
    }
    /* END NEW */

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    #back-to-top {
        padding: 8px 12px;
        bottom: 10px;
        right: 10px;
    }

    /* Announcement banner on mobile */
    .announcement-banner {
        padding: 10px 14px;
    }
    .announcement-content {
        gap: 8px;
    }
    .announcement-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    .announcement-badge {
        font-size: 0.65rem;
        padding: 2px 7px;
    }
}
/* === END OF MOBILE FIXES === */


@media (min-width: 769px) {
    header.hidden {
        transform: none; 
    }
}

@media (hover: none) {
    .card:hover,
    .social-links li:hover,
    .contact-list li:hover,
    .footer-links li:hover,
    .course-card:hover { 
        transform: none;
    }

    .course-description {
        margin-top: 15px; 
        max-height: 200px; 
        opacity: 1;
    }
}
