:root {
    --bg: #F0F0EB;
    --text: #121212;
    --accent: #008080;
    --navy: #000080;
    --gold: #FFD700;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body.dark-mode {
    --bg: #000000;
    --text: #FFFFFF;
    --accent: #008080;
    --navy: #4169E1;
    --gold: #FFD700;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === DARK MODE TOGGLE (from Uiverse.io) === */
.theme-switch {
    --toggle-size: 8px;
    --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);
    z-index: 1000;
    flex-shrink: 0;
}

/* Theme switch in nav bar */
.nav-theme-container {
    display: flex;
    align-items: center;
    padding: 0 1rem 0.4rem 0;
}

/* Theme switch in dropdown */
.dropdown-theme-container {
    display: flex;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0.25rem;
}

.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
    -webkit-box-sizing: border-box;
    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;
    -webkit-box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
    box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
    position: relative;
}

.theme-switch__container::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    -webkit-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;
    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);
    -webkit-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);
    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: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-transition: var(--circle-transition);
    -o-transition: var(--circle-transition);
    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);
    -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
    -webkit-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));
    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;
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    transition: var(--transition);
}

.theme-switch__moon {
    -webkit-transform: translateX(100%);
    -ms-transform: translateX(100%);
    transform: translateX(100%);
    width: 100%;
    height: 100%;
    background-color: var(--moon-bg);
    border-radius: inherit;
    -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    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);
    -webkit-box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
    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;
    -webkit-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(--back-clouds-color);
    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(--back-clouds-color);
    -webkit-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
    -o-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
    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;
    -webkit-transition: var(--transition);
    -o-transition: var(--transition);
    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__circle-container:hover {
    left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em)
}

.theme-switch__circle-container:hover {
    left: calc(var(--circle-container-offset) + 0.187em);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
    -webkit-transform: translate(0);
    -ms-transform: translate(0);
    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%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

/* --- LAYER ARCHITECTURE (Simulated/Adapted) --- */
.layer-base {
    position: relative;
    z-index: 1;
}
.layer-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none; /* Let scroll pass through if needed, but we need mouse events for grid */
}

#grid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background: var(--bg);
}

.cross {
    position: absolute;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px; /* Large crosses */
    font-weight: 300;
    color: var(--accent); /* TEAL crosses */
    user-select: none;
    pointer-events: none; /* Let mouse pass through to body for coordinates */
    will-change: transform;
}

/* --- PART 1: HERO --- */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Allow clicking through to potential grid interactions if needed, mainly for scroll */
}

@media (max-width: 768px) {
    #hero {
        min-height: 85vh;
    }
}

h1.fluid {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-align: center;
    color: var(--text);
    pointer-events: auto;
    mix-blend-mode: multiply; /* Nice effect with the grid */
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.5;
    transition: opacity 0.5s ease;
    pointer-events: auto;
    cursor: pointer;
}

.scroll-indicator:hover {
    opacity: 0.8;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-weight: 500;
}

.scroll-arrow {
    font-size: 1rem;
    color: var(--accent);
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    z-index: 50;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    opacity: 0.8;
}

.back-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-weight: 500;
}

.back-arrow {
    font-size: 1rem;
    color: var(--accent);
    animation: blink 1.5s ease-in-out infinite;
}



/* === DARK MODE SPECIFIC ADJUSTMENTS === */
body.dark-mode .role-title {
    color: #FFFFFF;
}

body.dark-mode .experience-content {
    color: #E0E0E0;
}

body.dark-mode .company-logo {
    filter: brightness(0) invert(1) sepia(1) hue-rotate(130deg) saturate(5) brightness(0.5);
}

body.dark-mode .edu-card .front-content .logo {
    filter: brightness(0) invert(1) sepia(1) hue-rotate(130deg) saturate(5) brightness(0.5);
}

body.dark-mode .bio-subhead {
    color: #aaa;
}

/* --- PART 2: PORTFOLIO --- */
#portfolio {
    position: relative;
    z-index: 2;
    background-color: var(--bg);
    padding-bottom: 4rem;
}

#portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--navy), var(--gold), var(--accent));
    background-size: 300% 100%;
    animation: color-chase 6s linear infinite;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--navy), var(--gold), var(--accent));
    background-size: 300% 100%;
    animation: color-chase 6s linear infinite;
}

@keyframes color-chase {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Section Expand/Collapse */
.section-collapsible {
    cursor: pointer;
    user-select: none;
}

.section-toggle {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-right: 0.5rem;
    font-size: 1.4em;
    color: #008080;
    font-weight: 700;
}

.section-collapsible.expanded .section-toggle {
    transform: rotate(90deg);
}

.section-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

/* MAIN NAVIGATION */
.main-nav {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1000;
    margin-bottom: 3rem;
}

.nav-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: #008080;
    height: 40px;
    width: 100%;
    position: relative;
}

.nav-links-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.nav-links {
    display: flex;
    gap: 5rem;
    padding: 0 1.5rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.nav-logo {
    position: fixed;
    left: 20px;
    top: 20px;
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    padding: 0.2em 0.2em 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 0.75;
    cursor: pointer;
    z-index: 1001;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.4s ease-in-out;
    pointer-events: none;
}

.nav-logo.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.nav-links a:hover {
    opacity: 0.7;
}

/* Dropdown menu when logo is clicked */
.nav-dropdown {
    position: fixed;
    left: 20px;
    top: 52px;
    background-color: #008080;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.nav-dropdown.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.nav-dropdown a:hover {
    opacity: 0.7;
}

/* Mobile: Start with logo visible */
@media (max-width: 768px) {
    .nav-bar {
        display: none;
    }

    .nav-logo {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}

/* BIO */
.bio {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 6rem;
    max-width: 900px;
    font-weight: 500;
}

/* BIO HEADER (New Layout) */
.bio-header {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.profile-pic-container {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    perspective: 1000px;
}

.profile-coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out;
    cursor: pointer;
}

/* Hover flip only on devices with hover capability (desktop) */
@media (hover: hover) {
    .profile-pic-container:hover .profile-coin {
        transform: rotateY(180deg);
    }
}

/* Tap/click flip for all devices */
.profile-coin.flipped {
    transform: rotateY(180deg);
}

.coin-front, .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--accent);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.coin-front {
    z-index: 2;
}

.coin-back {
    transform: rotateY(180deg);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    image-rendering: smooth;
}

.bio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.bio-greeting {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem 0;
}

.bio-headline {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: var(--accent);
}

.bio-subhead {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
}

.social-links {
    display: flex;
    gap: 1.25rem;
}

.social-link {
    color: var(--text);
    font-size: 1.5rem; /* Icon size */
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Responsive adjust */
@media (max-width: 768px) {
    .bio-header { flex-direction: column; text-align: center; align-items: center; }
    .bio-content { align-items: center; } /* Center content on mobile */
    .profile-pic-container { width: 160px; height: 160px; }
    .bio-greeting { font-size: clamp(1.5rem, 5vw, 2rem); }
    .social-links { justify-content: center; }

    /* Experience section mobile spacing */
    .experience-item {
        padding: 2rem 0;
    }
    .company-logo {
        height: 18px;
        max-width: 80px;
        flex-shrink: 0;
    }
    .experience-header {
        gap: 0.5rem;
    }
    .experience-left {
        gap: 0.5rem;
        align-items: flex-start;
    }
    .expand-icon {
        width: 16px;
        min-width: 16px;
        font-size: 1rem;
        margin-top: 2px;
    }
    .role-title {
        font-size: 0.85rem;
        white-space: normal;
        line-height: 1.3;
    }
}

/* EXPERIENCE LIST */
.experience-list {
    margin-bottom: 6rem;
}

.experience-item {
    border-top: 1px solid var(--text);
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

.experience-item:last-child {
    border-bottom: 1px solid var(--text);
}

.experience-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding-top: 0.25rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    width: 100%;
    text-align: left;
}

.experience-header:hover {
    background-color: rgba(0, 128, 128, 0.05);
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0 -1rem;
}

.experience-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.expand-icon {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    transition: transform 0.3s ease;
    width: 20px;
    text-align: center;
}

.experience-item.expanded .expand-icon {
    transform: rotate(90deg);
}

.role-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.company-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    max-width: 120px;
    margin-right: 1rem;
}

/* Specific logo adjustments */
.company-logo[alt="Plug and Play"] { height: 18px; }
.company-logo[alt="Amazon"] { height: 22px; }
.company-logo[alt="Snap Inc"] { height: 22px; }
.company-logo[alt="Grid110"] { height: 20px; }
.company-logo[alt="Propper Daley"] { height: 40px; }
.company-logo[alt="White House"] { height: 45px; }
.company-logo[alt="Coro"] { height: 55px; }

.experience-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 0 0 2.5rem;
}

.experience-item.expanded .experience-details {
    max-height: 1000px;
    padding: 1.5rem 0 0 2.5rem;
}

.experience-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}
.experience-content .impact {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--accent);
}
.experience-content ul {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    padding-left: 1.25rem;
    margin: 0;
}
.experience-content ul li {
    margin-bottom: 0.5rem;
}
.experience-content .micro-story {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--accent);
    margin-top: 1rem;
    line-height: 1.4;
}
body.dark-mode .experience-content {
    color: #fff;
}
body.dark-mode .experience-content ul {
    color: rgba(255, 255, 255, 0.85);
}
body.dark-mode .experience-content .micro-story {
    color: var(--accent);
}
@media (max-width: 768px) {
    .experience-content .impact { font-size: 0.95rem; }
    .experience-content ul { font-size: 0.85rem; }
    .experience-content .micro-story { font-size: 0.8rem; }
}

/* EDUCATION FLIP CARDS */
.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.edu-card {
    overflow: visible;
    height: 196px;
    perspective: 1000px;
    cursor: pointer;
}

.edu-card .content {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 500ms ease;
    border-radius: 5px;
}

.edu-card .front, .edu-card .back {
    background-color: var(--text);
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 5px;
    overflow: hidden;
}

.edu-card .back {
    justify-content: center;
    display: flex;
    align-items: center;
    transform: rotateY(180deg);
    background-color: #121212;
    border: 2px solid #121212;
    overflow: visible;
}

.edu-card .back-content {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #121212;
    border-radius: 3px;
    color: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.edu-card .back-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #008080;
    margin-bottom: 0.25rem;
}

.edu-card .back-content p {
    font-size: 0.75rem;
    line-height: 1.3;
    color: #008080;
    margin: 0.15rem 0;
}

.edu-card .back-content .edu-micro-story {
    font-size: 0.65rem;
    line-height: 1.3;
    color: #FFFFFF;
    margin-top: 0.25rem;
    font-style: italic;
}

.edu-card .back-content .fellowship-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.edu-card .back-content .fellowship-links .col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.edu-card .back-content .fellowship-links a {
    color: var(--accent);
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 100;
    padding: 0.25rem 0;
    display: block;
}

.edu-card .back-content .fellowship-links a:hover {
    opacity: 0.7;
}

.edu-card.flipped .content {
    transform: rotateY(180deg);
}

/* Disable pointer events on front when flipped */
.edu-card.flipped .front {
    pointer-events: none;
}

/* Hide corner fold when card is flipped */
.edu-card.flipped .corner-peel {
    visibility: hidden;
}

/* Fellowship links - always clickable */
.fellowship-links a {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 9999 !important;
}



.edu-card .front {
    color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg);
    border: 2px solid var(--text);
    position: relative;
    overflow: hidden;
}

/* Corner peel container */
.corner-peel {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    z-index: 10;
    backface-visibility: hidden;
}

/* Teal reveal underneath */
.corner-peel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 60px 60px 0;
    border-color: transparent var(--accent) transparent transparent;
}

/* Static paper corner */
.corner-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    transform-origin: top right;
    z-index: 1;
    backface-visibility: hidden;
}

.corner-fold::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 60px 60px 0;
    border-color: transparent var(--bg) transparent transparent;
}

/* Flip Hint - All Education Cards */
.edu-card .corner-peel .flip-hint {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 0;
    z-index: 20;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--accent);
}

.flip-hint span {
    opacity: 0;
    animation: buildIn 4s ease-in-out infinite;
}

.flip-hint span:nth-child(1) { animation-delay: 0s; }
.flip-hint span:nth-child(2) { animation-delay: 0.2s; }
.flip-hint span:nth-child(3) { animation-delay: 0.4s; }
.flip-hint span:nth-child(4) { animation-delay: 0.6s; }

@keyframes buildIn {
    0%, 55%, 100% {
        opacity: 0;
    }
    15%, 45% {
        opacity: 1;
    }
}



.edu-card .front-content {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.edu-card .front-content .logo {
    max-width: 70%;
    max-height: 60%;
    object-fit: contain;
}

.edu-card .front-content .emoji-icon {
    font-size: 3.5rem;
}

.edu-card .front-content .card-label {
    margin-top: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    opacity: 0.6;
}

.edu-card .circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--accent);
    position: relative;
    filter: blur(15px);
    animation: edu-floating 2600ms infinite linear;
}

.edu-card #bottom {
    background-color: var(--navy);
    left: 50px;
    top: 0px;
    width: 150px;
    height: 150px;
    animation-delay: -800ms;
}

.edu-card #right {
    background-color: var(--gold);
    left: 160px;
    top: -80px;
    width: 30px;
    height: 30px;
    animation-delay: -1800ms;
}

@keyframes edu-floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0px); }
}

/* Responsive: 2 columns on tablet, 1 on mobile */
@media (max-width: 900px) {
    .education-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .education-grid {
        grid-template-columns: 1fr;
    }
    .edu-card {
        height: 180px;
    }
}

/* PERSONAL ZONE */
.personal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.personal-card {
    border: 1px solid var(--text);
    padding: 1.5rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.personal-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* SPOTIFY WIDGET */
.spotify-widget {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}
.album-art {
    width: 64px;
    height: 64px;
    background: #333;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}
.album-art img { width: 100%; height: 100%; object-fit: cover; }
.track-info { flex: 1; }
.track-name { font-weight: 700; font-size: 1rem; display: block; margin-bottom: 0.25rem; }
.artist-name { font-size: 0.85rem; color: #666; }
.bars { display: flex; gap: 3px; height: 12px; align-items: flex-end; }
.bar { width: 3px; background: var(--accent); animation: sound 1s infinite ease-in-out; }
.bar:nth-child(1) { animation-delay: 0s; height: 40%; }
.bar:nth-child(2) { animation-delay: 0.2s; height: 80%; }
.bar:nth-child(3) { animation-delay: 0.4s; height: 50%; }
@keyframes sound { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* NBA STATS */
.nba-stat-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #ccc;
}
.nba-stat-row:last-child { border-bottom: none; }
.stat-value { font-weight: 700; color: var(--accent); }

/* GUNDAM GALLERY */
.gundam-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}
.gundam-pic {
    aspect-ratio: 1;
    background: #eee;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}
.gundam-pic:hover img { transform: scale(1.1); }
.gundam-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(100%);
}
.gundam-pic:hover img { filter: grayscale(0%); }

/* NETFLIX TICKER */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    padding: 0.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}
.ticker { display: inline-block; white-space: nowrap; animation: ticker 20s linear infinite; }
.ticker-item { display: inline-block; padding: 0 2rem; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* FOOTER LOOP */
footer {
    border-top: 2px solid var(--text);
    background: #121212 !important;
    color: var(--bg);
    padding: 2rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative; /* Ensure stacking context */
    z-index: 1;
}

body.dark-mode footer {
    background: #121212 !important;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.loop-track {
    display: inline-flex;
    white-space: nowrap;
    -webkit-animation: scroll 40s linear infinite;
    animation: scroll 40s linear infinite;
    /* Hardware acceleration hints for WebView compatibility */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    will-change: transform;
}

.loop-item {
    display: inline-flex;
    align-items: center;
    gap: 4rem;
    padding-right: 4rem;
    opacity: 0.8;
}

/* PNGs with transparency: just make them white */
.loop-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s;
}

/* JPGs with white backgrounds: Invert to get Black BG + White Logo, then Screen to hide Black BG */
.loop-logo.jpg-fix {
    filter: grayscale(1) invert(1);
    mix-blend-mode: screen;
}

/* JPGs/PNGs with black backgrounds: Just Screen to hide Black BG */
.loop-logo.black-bg-fix {
    filter: grayscale(1);
    mix-blend-mode: screen;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .loop-track {
        -webkit-animation: scroll 35s linear infinite;
        animation: scroll 35s linear infinite;
    }

    .loop-item {
        gap: 2rem;
        padding-right: 2rem;
    }

    .loop-logo {
        height: 35px;
        flex-shrink: 0;
    }
}

/* Specific tweaks for visual balance */
.loop-logo[alt="Plug and Play"] { height: 40px; } /* Wide logo */
.loop-logo[alt="Grid110"] { height: 35px; } /* Square logo needs to be smaller */
.loop-logo[alt="White House"] { height: 75px; } /* Tall seal - increased size */
.loop-logo[alt="Snap Inc"] { height: 45px; }
.loop-logo[alt="Material Change"] { height: 45px; }
.loop-logo[alt="altMBA"] { height: 40px; } /* Often blocky - increased size */
.loop-logo[alt="Landor"] { height: 40px; }

.loop-logo:hover {
    opacity: 1;
}

@-webkit-keyframes scroll {
    0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}
@keyframes scroll {
    0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}

/* Utility */
.mt-4 { margin-top: 4rem; }

/* Hide Tweakpane UI if it existed */
.tp-dfwv { display: none !important; }

/* Cursor Animation */
.cursor {
    display: inline-block;
    color: #008080;
    animation: blink 1s step-end infinite;
    font-weight: 300; /* Lighter weight for the pipe */
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* === Send Email Button (Uiverse.io by adamgiebl - Adjusted) === */
.send-button {
    font-family: inherit;
    font-size: 1rem;
    background: var(--accent); /* Teal */
    color: white;
    padding: 0.5em 1.2em;
    padding-left: 1em;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: none;
    border-radius: 50px; /* Rounded pill like skill tags */
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.send-button span {
    display: block;
    margin-left: 0.5em;
    transition: all 0.3s ease-in-out;
}

.send-button svg {
    display: block;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
}

.send-button:hover .svg-wrapper {
    animation: fly-1 0.6s ease-in-out infinite alternate;
}

.send-button:hover svg {
    transform: translateX(2em) rotate(45deg) scale(1.1);
}

.send-button:hover span {
    transform: translateX(8em); /* Push text out */
}

.send-button:active {
    transform: scale(0.95);
}

a.send-button {
    text-decoration: none;
}

@keyframes fly-1 {
    from { transform: translateY(0.1em); }
    to { transform: translateY(-0.1em); }
}

/* === LOADING SCREEN === */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

#loading-screen.loaded {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    position: relative;
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    overflow: hidden;
}

.logo-reveal {
    position: relative;
    color: #fff;
    padding: 0 0.2em;
    display: inline-block;
    line-height: 0.75;
    z-index: 1;
}

.logo-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--accent);
    z-index: -1;
    animation: fillReveal 2.3s ease-out forwards;
}

@keyframes fillReveal {
    0% { width: 0%; }
    40% { width: 30%; }     /* Reach 30% */
    53% { width: 30%; }     /* Pause for 0.3s */
    100% { width: 100%; }   /* BAM! Complete! */
}

/* Prevent scrolling during load */
body.loading {
    overflow: hidden;
}