/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Initial page load transition */
@keyframes fadeInFromBlack {
    0% {
        background: #000;
        opacity: 1;
    }
    100% {
        background: #fff;
        opacity: 0;
    }
}

#entrance-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    opacity: 1;
    animation: fadeInFromBlack 0.8s ease-out forwards;
    pointer-events: none;
}

/* La Jolla / UCSD palette variables (lighter, laid-back coastal vibes) */
:root {
    --bg-fade-duration: 1200ms; /* overlay crossfade duration - smoother transition */
    --page-bg: #000; /* current page background color (updated from JS) */
    --sidebar-width: 200px; /* reduced from 240px */
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-padding-top: 0;
}

html, body {
    height: 100%;
    font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: var(--page-bg, #ffffff);
    transition: background-color var(--bg-fade-duration) cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

* {
    scroll-behavior: inherit;
}

/* Layout */
.page-layout {
    display: block;
    min-height: 100vh;
    position: relative;
    z-index: 1; /* ensure page content stacks above background overlay */
    margin-left: var(--sidebar-width, 200px); /* Offset for fixed sidebar */
    will-change: scroll-position;
    contain: layout style;
    isolation: isolate; /* Create new stacking context */
}

/* Foreground color transitions */
body.light-foreground .sidebar,
body.light-foreground .sidebar a,
body.light-foreground .project-link,
body.light-foreground .social-link {
    color: #ffffff;
    border-color: rgba(40,40,43 0.1);
}

body.light-foreground .project-link:hover,
body.light-foreground .social-link:hover {
    opacity: 1;
    transform: translateY(-2px);

}

/* Sidebar */
.sidebar {
    padding: 2rem 1.5rem;
    background: transparent;
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: var(--sidebar-width, 200px) !important;
    overflow-y: auto;
    overflow-x: hidden;
    transition: color var(--bg-fade-duration) ease,
                border-color var(--bg-fade-duration) ease;
    z-index: 10000 !important;
    transform: translateZ(0);
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-name {
    text-align: center;
}

.sidebar-name h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: inherit;
    letter-spacing: -0.02em;
}

.pronunciation {
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.7;
    margin-bottom: 0.25rem;
    font-weight: 400;
    color: #fffefe;
}

.greeting {
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.7;
    margin-bottom: 2.5rem;
    font-weight: 400;
    color: #fffefe;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.sidebar-nav .nav-link {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    color: inherit;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    opacity: 1;
    transform: translateY(-2px);
    
}


.sidebar-section {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
}

.section-title-small {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0.7;
    color: #fffeff;
    margin-bottom: 0.75rem;
    text-align: center;
}

.project-links,
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.project-link,
.social-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s ease;
    font-weight: 400;
    text-align: center;
    display: inline-block;
}

.social-link {
    font-size: 1.5rem;
}

.project-link:hover,
.social-link:hover {
    color: #1a1a1a;
}

/* Typewriter caret */
.typed-name {
    position: relative;
    white-space: nowrap;
    color: #fffefe;
}
.typed-name::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    animation: caretBlink 1s step-end infinite;
}
@keyframes caretBlink {
    50% { opacity: 0; }
}

/* Main Content */
.main-content {
    padding: 3rem 4rem 2rem;
    background: transparent;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    margin-left: 0;
    justify-content: left;
    align-items: left;
    transform: translateZ(0);
    will-change: scroll-position;
}

/* optional scroll-snap to make section-to-section scrolling feel seamless */
html {
    scroll-snap-type: y proximity;
}
.content-section {
    scroll-snap-align: start;
    min-height: 100vh;
    padding: 2rem;
    transform: translateZ(0);
    contain: layout style paint;
}

/* Contact section styling */
.social-links-grid {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    justify-content: center;
    align-items: center;
}

.social-icon-link {
    color: #fffefe;
    text-decoration: none;
    font-size: 1.75rem;
    opacity: 0.8;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Full-viewport background overlay used for smooth crossfade transitions between section colors */
#bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0; /* underneath page content but above the raw page background */
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--bg-fade-duration) cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
    background-color: transparent;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Sidebar/contact icon styles */
.social-link,
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.social-link i,
.project-link i {
    width: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    color: inherit;
}


/* Hide visual scrollbar for the sidebar but keep it scrollable (one visible scrollbar on the page) */
.sidebar::-webkit-scrollbar { display: none; }
.sidebar { scrollbar-width: none; -ms-overflow-style: none; }

/* Reduce sidebar padding on short viewports so content is more likely to fit without scroll */
@media (max-height: 720px) and (min-width: 901px) {
    .sidebar { padding: 1.25rem 1rem; }
    .sidebar-name h1 { font-size: 1.25rem; }
    .sidebar-nav .nav-link { font-size: 0.9rem; }
}

.content-section {
    min-height: 100vh;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: left;
    transform: translateZ(0);
    contain: layout style paint;
}

.content-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 3rem;
}

.timestamp {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 400;
}

.bio-section {
    display: flex;
    margin: auto 0;
    gap: 2rem;
}

.bio-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-image-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.bio-image-container img,
.profile-image-wrapper img {
    width: 300px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.profile-image-wrapper:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.profile-social-links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.profile-image-wrapper:hover .profile-social-links {
    opacity: 1;
    pointer-events: all;
}

.profile-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: #28282B;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-social-link:hover {
    transform: scale(1.1);
    background: #fff;
}

/*Profile Picture Modal */
.profile-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.profile-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: scaleIn 0.3s ease;
}

.profile-modal-content img {
    width: 100%;
    height: auto;
    max-width: 600px;
    border-radius: 4px;
}

.profile-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.profile-modal-close:hover {
    opacity: 0.7;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* Bio Logs Styling */
#bio-logs-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 20px; /* Vertical and horizontal gap */
    margin-top: 20px;
}

.bio-log-card {
    border-bottom: 1px solid #fffeff; /* Sharp white line */
    padding-bottom: 15px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bio-log-card:hover { opacity: 1;
    transform: translateY(-2px);  }

.bio-log-card .meta {
    font-size: 0.7rem;
    color: #fffeff;
    font-weight: 600;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 5px;
}

.bio-log-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fffeff;
    margin: 0;
}

.bio-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #fffefe;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.experience-description {
    font-size: 0.95rem;
    color: #fffefe;
    line-height: 1.65;
    margin-top: 0.5rem;
}

/*.resume-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
}

.resume-button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    color: #fffefe;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.02em;
    border: 1px solid rgba(40, 40, 43, 0.3);
    background: transparent;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    border-radius: 9999px;
    inset: 0;
    backdrop-filter: blur(3px);
    filter: url(#glass-distortion);
    overflow: hidden;
    isolation: isolate; /* Optional: adds a subtle frosted glass distortion effect
}

.resume-button:hover {
    background: rgba(40, 40, 43, 0.05);
    border-color: rgba(40, 40, 43, 0.5);
    opacity: 1;
    transform: translateY(-2px);
}

.resume-button-view {
    border-color: #fffcfb;
    color: #fffefe;
}

.resume-button-view:hover {
    background: rgba(40, 40, 43, 0.05);
    border-color: #fffefe;
}

.resume-button:not(.resume-button-view) {
    border-color: #fffcfb;
    color: #fffefe;
}

.resume-button:not(.resume-button-view):hover {
    background: rgba(40, 40, 43, 0.05);
    border-color: #fffefe;
}
*/
.resume-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
}

.resume-button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important; /* Slightly dimmed text */
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-align: center;
    width: 100%;
    border-radius: 9999px;
    
    /* Liquid Glass Core */
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.resume-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important; /* Brightens text on hover */
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Specific button variants - keeping them consistent with the glass theme */
.resume-button-view, 
.resume-button:not(.resume-button-view) {
    border-color: rgba(255, 255, 255, 0.15);
}

.resume-button-view:hover, 
.resume-button:not(.resume-button-view):hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.work-section {
    margin-top: 0;
}

.contact-section .work-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Projects grid card tweaks */
.project-card .project-title-link { text-decoration: none; }
.project-desc {
    color: #fffeff;
    font-size: 0.9rem;
    margin-top: 0.35rem;
    line-height: 1.6;
}

.work-card {
    background: #2e2d2c;
    border: 1px solid #2e2d2c;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.work-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.work-image {
    height: 200px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
}
/* GitHub project logos inside cards */
.project-logo {
    width: 70%;
    height: 70%;
    object-fit: contain;
    display: block;
}

/* Optional, if some logos are dark and you want a lighter tile */
.project-card {
    background: #050505;
}


.work-info {
    padding: 1.5rem;
    position: relative;
}

.work-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fffeff;
    margin-bottom: 0.25rem;
}

.work-subtitle {
    font-size: 0.9rem;
    color: #fffefe;
    margin-bottom: 1rem;
    font-weight: 400;
}

.work-year {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.85rem;
    color: #999;
    font-weight: 400;
}

/* Logs Section */
.logs-subtitle {
    color: #fffefe;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.logs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.log-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.log-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.log-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.75rem;
}

.log-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.log-body {
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
}

.log-body p {
    margin-bottom: 1rem;
}

.log-body p:last-child {
    margin-bottom: 0;
}

.log-body p:first-child {
    margin-top: 0;
}

.log-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.log-tag {
    background: #f5f5f5;
    color: #666;
    padding: 0.25rem 0.6rem;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Contact Section */
.contact-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.resume-download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.resume-download-button:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.05);
    
}

.resume-download-button i {
    font-size: 0.9rem;
}

.resume-download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.resume-download-link i {
    font-size: 0.9rem;
}

.social-links-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 10001;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hamburger-menu span {
    display: block;
    width: 22px;
    height: 2px;
    background: #28282B;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: all;
}

/* Responsive */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }

    /* Sidebar as overlay menu on mobile */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-width, 200px);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 10000;
        background: inherit;
        backdrop-filter: blur(20px);
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        padding: 2rem 1.5rem;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Keep sidebar styling the same as desktop */
    .sidebar-name {
        display: block;
        text-align: center;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 3rem;
        text-align: center;
    }

    .sidebar-nav .nav-link {
        padding: 0.5rem 0;
        font-size: 0.6rem;
    }

    .sidebar-section {
        display: block;
        margin-bottom: 2rem;
        color: #fffefe;

    }

    .main-content {
        grid-column: 1;
        padding-top: 2rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        margin-left: 0;
        width: 100%;
    }

    .sidebar-name h1 {
        font-size: 1.25rem;
    }

    .work-grid,
    .logs-grid {
        grid-template-columns: 1fr;
    }

    .work-image {
        height: 160px;
        font-size: 2.5rem;
    }

    .content-section {
        min-height: auto;
        padding: 2rem 0;
    }

    .bio-section {
        flex-direction: column;
        gap: 1.5rem;
    }

    .bio-image-container {
        align-self: center;
    }
}

/* Smaller mobile screens */
@media (max-width: 600px) {
    .hamburger-menu {
        top: 0.75rem;
        left: 0.75rem;
        width: 36px;
        height: 36px;
    }

    .sidebar {
        width: 85%;
        max-width: 280px;
        padding: 1.5rem 1rem;
    }

    .main-content {
        padding-top: 1.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .bio-section {
        gap: 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, transform, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Subtle entrance */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: fadeIn 0.4s ease-out;
}

.content-section[data-bg="#f7fbff"] {
    color: #28282B;
}

.content-section[data-bg="#f7fbff3"] .timestamp,
.content-section[data-bg="#f7fbff"] .section-title-small {
    color: rgba(40, 40, 43, 0.9);
}

.content-section[data-bg="#fff1e0"] {
    color: #1a1a1a;
}

/* About Section - Resume Style */
.experience-section {
    background: transparent;
    color: #fffeff;
    padding: 4rem 4rem;
}

.experience-container {
    max-width: 900px;
    margin: 0 auto;
}

.experience-section-header {
    margin-bottom: 2rem;
    margin-top: 3rem;
}

.experience-section-header:first-child {
    margin-top: 0;
}

.experience-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fffeff;
    margin-bottom: 0;
}

.experience-item {
    margin-bottom: 3rem;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.experience-header-left {
    flex: 1;
}

.experience-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    min-width: 220px;
   justify-content: center;
   align-items: center;
    flex-shrink: 0;
}

.experience-header-right .experience-date {
    order: 1;
}

.experience-header-right .experience-logo-link {
    order: 2;
}

.experience-logo-link {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.experience-logo-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.experience-logo {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
}

.experience-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.experience-role {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fffeff;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.experience-role strong {
    font-weight: 700;
}

.experience-company {
    font-size: 0.95rem;
    color: #fffefe;
    margin-bottom: 0.5rem;
}


.experience-date {
    font-size: 0.85rem;
    color: #fffefe;
    white-space: normal;
    flex-shrink: 0;
    text-align: right;
    line-height: 1.5;
}

.project-link-inline {
    color: #fffeff;
    text-decoration: underline;
    text-decoration-color: #fffeff;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
    font-weight: 500;
}


.experience-activities {
    font-size: 0.9rem;
    color: #fffeff;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.experience-activities strong {
    font-weight: 600;
    color: #fffefe;
}

.experience-bullets {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.experience-bullets li {
    font-size: 0.95rem;
    color: #fffeff;
    line-height: 1.6;
    margin-bottom: 0.4rem;
    padding-left: 1.2rem;
    position: relative;
}

.experience-bullets li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #fffeff;
}

/* --- MAIN CONTENT: CURRENT PROJECTS GLOW & COMPACT --- */

/* 1. Grid Layout: Adjusts based on screen size */
.current-projects-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 1.5rem !important;
}

/* 2. The Card Link Wrapper */
.work-card-link {
    text-decoration: none !important;
    display: block !important;
}

/* 3. The Card Style (Dimmed State) */
.current-project-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: 100% !important;
}

/* 4. Hover State: Lift and Glow Effect */
.work-card-link:hover .current-project-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-5px);
}

/* 5. Title Brightening (Matches your Sidebar behavior) */
.current-project-title {
    color: #fffeff; /* Starts dimmed */
    transition: color 0.3s ease !important;
    font-size: 1.1rem !important;
}

.work-card-link:hover .current-project-title {
    color: #ffffff !important; /* Glows white on hover */
}

/* 6. Logo Container */
.current-project-logo {
    background: #182B49 !important; /* UCSD Navy */
    height: 160px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2rem !important;
    margin-bottom: 1rem !important;
    border-radius: 4px;
}

.current-project-logo img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* 7. Description text */
.current-project-description {
    font-size: 0.85rem !important;
    color: #fffeff;
    line-height: 1.5 !important;
}

/* Responsive adjustments for experience section */
@media (max-width: 900px) {
    .experience-section {
        padding: 2rem 1.5rem;
    }
    
    .experience-container {
        max-width: 100%;
    }
    
    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .experience-header-right {
        flex-direction: row-reverse;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-width: auto;
    }
    
    .experience-header-right .experience-date {
        order: 2;
        text-align: right;
    }
    
    .experience-header-right .experience-logo {
        order: 1;
    }
    
    .experience-logo {
        width: 80px;
        height: 80px;
    }

    .current-project-logo {
        height: 160px;
        padding: 1.5rem;
    }
    
    .experience-date {
        align-self: flex-start;
    }
    
    .current-projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .experience-section {
        padding: 1.5rem 1rem;
    }
}

/*
 * LOGS PAGE STYLING (for grouped logs)
 * =====================================
 */

/* Ensure logs-list is a grid container if it's not already, and that its contents are laid out correctly */
.logs-list {
    display: grid; 
    /* The next line ensures 2 columns on desktop, matching your existing structure */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-top: 20px;
    width: 100%;
}

.logs-section-header {
    /* Title for the quarter/folder, e.g., "Fall 2025" */
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    width: 100%;
    
    /* This is the key property: makes the title span all columns in the grid */
    grid-column: 1 / -1; 
    
    /* Visual separator */
    border-bottom: 2px solid rgba(0, 0, 0, 0.1); 
    color: var(--text-color, #282828);
}

/* Specific styling for the last log card in a row to ensure it doesn't leave a gap */
.logs-list .log-card:nth-last-child(2) {
    /* If you have 2 columns, this targets the second to last item to ensure it sits nicely */
    align-self: flex-start;
}


/* Responsive adjustment for mobile to keep the header full width */
@media (max-width: 600px) {
    .logs-section-header {
        font-size: 1.25rem;
        margin-top: 2rem;
    }
    .logs-list {
        gap: 20px;
        padding-top: 10px;
    }
}

/* --- CLEAN FOLDER UI --- */
.season-folder {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: all 0.3s ease;
}

/* Remove default browser arrow/marker */
.season-header::-webkit-details-marker,
.season-header::marker {
    display: none;
    content: "";
}

.season-header {
    padding: 24px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    font-family: 'IBM Plex Sans', sans-serif;
}

.folder-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.folder-title i {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.folder-title span {
    color: #ffffff;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

/* Custom Minimalist Arrow */
.custom-arrow {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.season-folder[open] .custom-arrow {
    transform: rotate(90deg);
}

/* --- LOG FILE ROWS --- */
.logs-preview-list {
    padding: 0 10px 24px 42px; /* Indents files under the folder text */
}

.log-file-row {
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-file-row:hover .file-name {
    color: #ffffff;
}

.file-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s;
}

.file-date {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- THE OVERLAY --- */
.fullscreen-reader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #2e2d2c; /* Match your dark background */
    z-index: 99999; /* Ensure it sits above your sidebar and header */
    overflow-y: auto;
    font-family: 'IBM Plex Sans', sans-serif;
}

/* --- THE CONTENT CONTAINER --- */
.reader-container {
    max-width: 800px; /* Standard reading width */
    margin: 0 auto;
    padding: 60px 40px;
    text-align: left !important;
}



/* --- PINNED NAVIGATION --- */
.pinned-nav {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 10000;
}

.back-link {
    background: #000;
    color: #fff;
    border: 1px solid #333;
    padding: 10px 18px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-link:hover {
    background: #fff;
    color: #000;
}

/* Scroll Top Button inside Reader */
.scroll-top {
    margin-top: 100px;
    background: transparent;
    color: #555;
    border: none;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.scroll-top:hover { color: #fff; }




.reader-content {
    max-width: 700px; /* Optimal reading width */
    margin: 120px auto; /* More top margin to clear the fixed button */
    padding: 0 40px;
}

.reader-body {
    font-family: 'IBM Plex Sans', sans-serif;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    text-align: left !important;
}

.reader-body p { margin-bottom: 1.5rem; text-align: left !important;}

/* --- LOG TYPOGRAPHY --- */
.reader-header h1 {
    font-size: 2.8rem;
    color: #fff;
    margin: 10px 0 30px 0;
    line-height: 1.1;
}

.reader-meta {
    color: #fffeff; /* Use your blue accent color */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.reader-body {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1.1rem;
}

.reader-body p {
    margin-bottom: 1.5rem;
    text-align: left !important;
}

/* --- CONSOLIDATED PRODUCTION FIXES --- */

/* SIDEBAR: CURRENT PROJECTS */
.sidebar-section {
    padding: 1rem 1.5rem !important; /* Tightens the section container */
}

.sidebar-section .section-title-small {
    margin-bottom: 6px !important; /* Reduces gap under the title */
}

.sidebar-section .project-link {
    display: block !important;
    padding: 2px 0 !important;      /* Minimal vertical gap */
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.4) !important; /* Matches 'About' link dimness */
    transition: color 0.2s ease, transform 0.2s ease !important;
    font-size: 0.85rem !important;
    text-align: center;
    text-decoration: none;
}

.sidebar-section .project-link:hover {
    color: #ffffff !important;      /* Full bright white on hover */
    transform: translateY(-2px);    /* Subtle lift effect */
}

/* MAIN CONTENT: GITHUB PROJECT CARDS */
/* We target #projects-grid to ensure we only affect the GitHub area */
#projects-grid .project-card {
    padding: 12px ;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: row !important; /* Keeps icon and text side-by-side */
    align-items: center !important;
    gap: 12px !important;
    min-height: auto !important;
    text-decoration: none;
}

#projects-grid .project-card:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

#projects-grid .project-card .work-title {
    font-size: 0.9rem !important;
    margin: 0 !important;
    color: #fff !important;
}

#projects-grid .project-card .project-desc {
    font-size: 0.75rem ;
    line-height: 1.3;
    color: #fffeff;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#projects-grid .project-card .work-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    flex-shrink: 0;
}