@charset "UTF-8";
/* ============================================================
   TABLE OF CONTENTS
   1. Reset & base
   2. Layout (page-layout, main-content, sections)
   3. Sidebar (nav, socials, theme toggle, hamburger)
   4. Home / bio
   5. Work & project cards (team + personal projects)
   6. Experience / education / goals
   7. Logs & reader
   8. Now-playing widget
   9. Media queries:
      - >=1051px  desktop-only refinements (consolidated)
      - <=1050px  mobile/tablet layout (consolidated)
      - other breakpoints (1150/900/768/700/600) for
        specific fine-tuning only
   ============================================================ */

/* 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;
}

:root {
    --bg-fade-duration: 1200ms;
    --page-bg: #000;
    --sidebar-width: 160px;

    --km-ink: #1F1D29;
    --km-charcoal: #2B2636;
    --km-plum: #4F406C;
    --km-violet: #5B3B7A;
    --km-orchid: #7A355C;
    --km-sky: #3B5D7A;
    --km-teal: #2E5A73;
    --km-cream: #F7F1EA;
    --km-blush: #F5E4EE;
    --km-apricot: #FDE7D7;
    --km-lavender: #ECE6FB;
    --km-powder: #E8F3FB;
    --km-softblue: #E7F2FA;
    --km-softviolet: #F3E8FB;
    --km-text: #26242E;
    --km-muted: #64606F;
    --km-link: #0F72B5;
    --km-border: rgba(38, 36, 46, 0.16);
    --km-card: rgba(255, 255, 255, 0.74);
    --km-card-strong: rgba(255, 255, 255, 0.92);
}

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

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;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Layout */
.page-layout {
    display: block;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    margin-left: var(--sidebar-width, 160px);
    transition: margin-left 0.3s ease;
    box-sizing: border-box;
}

main {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    width: 100%;
    margin: 0 auto;
    max-width: none;
    box-sizing: border-box;
}

section {
    min-height: auto !important;
    height: auto !important;
}

.content-section {
    scroll-snap-align: start;
    min-height: auto;
    padding: 2rem 0;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transform: translateZ(0);
    contain: layout style paint;
}

.content-section h2 {
    margin-bottom: 0.5rem;
}

/* Light mode default */
footer {
    text-align: center;
    padding: 4rem 1rem 3rem 1rem;
    font-size: 0.9rem;           /* Slightly larger for better readability */
    font-weight: 500;            /* Medium thickness so it doesn't look thin/faint */
    color: #1f2937;              /* Deep, solid charcoal (almost black) */
    opacity: 1 !important;       /* Forces it to ignore any parent transparency */
}

/* Dark mode specific */
body.dark footer {
    color: #e5e7eb;              /* Crisp, bright silver-white */
}

/* Background overlay */
#bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    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);
}

/* Foreground switching */
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.dark-foreground .sidebar,
body.dark-foreground .sidebar a,
body.dark-foreground .project-link,
body.dark-foreground .social-link,
body.dark-foreground .theme-toggle {
    color: #28282B;
    border-color: rgba(40, 40, 43, 0.15);
}

body.dark-foreground .theme-toggle {
    background: rgba(40, 40, 43, 0.06);
    border-color: rgba(40, 40, 43, 0.18);
}

body.dark-foreground .theme-toggle:hover {
    background: rgba(40, 40, 43, 0.12);
    border-color: rgba(40, 40, 43, 0.35);
}

/* Sidebar */
.sidebar {
    padding: 1.25rem 0.75rem;
    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, 160px) !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;
    display: flex;
    flex-direction: column;
    align-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-name {
    text-align: center;
    margin-bottom: 1.75rem;
}

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

.pronunciation,
.greeting,
.typed-flags,
.typed-name {
    color: #fffefe;
    display: inline-block;
    transition: opacity 140ms ease;
}

.pronunciation {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 0;
    font-weight: 400;
}

.greeting {
    font-size: 1.25rem;
    opacity: 0.85;
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.typed-flags {
    font-size: 1.4rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.typed-name {
    position: relative;
    white-space: nowrap;
}

.typed-name::after {
    display: none !important;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
    text-align: center;
    flex: 1;
    min-height: 0;
}

.sidebar-nav .nav-link,
.nav-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    font-size: 0.95rem;
    color: inherit;
    opacity: 0.85;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    width: 100%;
    line-height: 1;
}

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

.nav-icon {
    display: block;
    flex-shrink: 0;
}

.sidebar-section {
    padding: 0 1.5rem !important;
    width: 100%;
}

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

.project-links,
.social-links {
    display: flex;
    flex-direction: column;
    gap: 16px !important;
    align-items: center;
    text-align: center;
    width: 100%;
}

.project-link,
.social-link {
    color: inherit;
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.15s ease, transform 0.15s ease, opacity 0.2s ease;
    font-weight: 400;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    opacity: 0.7;
}

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

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

/* Theme toggle */
.theme-toggle-wrap {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.theme-icon {
    position: absolute;
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.theme-light .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.theme-light .theme-icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

body.theme-light .theme-toggle {
    background: rgba(40, 40, 43, 0.06);
    border-color: rgba(40, 40, 43, 0.18);
    color: #28282B;
}

body.theme-light .theme-toggle:hover {
    background: rgba(40, 40, 43, 0.12);
    border-color: rgba(40, 40, 43, 0.35);
}

/* Home and bio */
.bio-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    margin: 0 auto !important;
    gap: 3rem;
    width: 100%;
}

.bio-content-left {
    flex: 1;
    width: 100%;
}

.bio-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #fffefe;
    font-weight: 400;
    margin-bottom: 1.5rem;
    width: 100% !important;
    max-width: 100% !important;
}

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

/* Profile image */
.bio-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

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

.bio-image-container img,
.profile-image-wrapper img {
    width: 320px;
    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 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 & home-page projects */
#bio-logs-list,
#bio-projects-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 20px;
    margin-top: 20px;
    width: 100%;
}

.bio-log-card {
    border-bottom: 1px solid #fffeff;
    padding-bottom: 15px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 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;
}

/* Buttons */
.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;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-align: center;
    width: 100%;
    border-radius: 9999px;
    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;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.resume-button-view,
.resume-button:not(.resume-button-view) {
    border-color: rgba(255, 255, 255, 0.15);
}

/* About / goals */
.about-section,
.goals-section {
    margin-bottom: 20px;
    padding: 0;
}

.about-section h2,
.goals-section h2,
.about-section p,
.goals-section p {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Work and cards */
.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;
    color: #b351b3;
    width: 100%;
    align-items: start;
}

.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-card-link {
    text-decoration: none !important;
    display: block !important;
}

.work-image {
    height: 200px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
}

.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;
}

.project-card {
    background: #050505;
}

.project-card .project-title-link {
    text-decoration: none;
}

.project-desc {
    color: #fffeff;
    font-size: 0.9rem;
    margin-top: 0.35rem;
    line-height: 1.6;
}

.project-logo {
    width: 70%;
    height: 70%;
    object-fit: contain;
    display: block;
}

/* Current projects */
.current-projects-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 1.25rem !important;
    margin-top: 1.25rem !important;
    width: 100%;
    align-items: start !important;
}

.current-project-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: auto !important;
}

.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);
}

.current-project-title {
    color: #fffeff;
    transition: color 0.3s ease !important;
    font-size: 1rem !important;
}

.work-card-link:hover .current-project-title {
    color: #ffffff !important;
}

.current-project-logo {
    background: #182B49 !important;
    height: 90px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.85rem !important;
    margin-bottom: 0.75rem !important;
    border-radius: 4px;
}

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

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

/* GitHub project cards */
#projects-grid .project-card {
    padding: 10px;
    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;
    align-items: center !important;
    gap: 10px !important;
    min-height: auto !important;
    height: fit-content !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.85rem !important;
    margin: 0 !important;
    color: #fff !important;
}

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

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

/* Experience */
.experience-section {
    background: transparent;
    color: #fffeff;
    padding: 4rem 0;
    width: 100% !important;
}

.experience-container {
    width: 100% !important;
    max-width: 100% !important;
}

.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;
    justify-content: left;
    display: flex;
}

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

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

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

.experience-header-right {
    display: flex;
    flex-direction: column;
    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;
}

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

.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: none;
    position: absolute;
    left: 0;
    color: #fffeff;
}

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

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

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

.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: 1.5rem;
}

.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;
}

/* Logs folder UI */
.logs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-top: 20px;
    width: 100%;
}

.logs-section-header {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.4rem;
    width: 100%;
    grid-column: 1 / -1;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color, #282828);
}

.logs-list .log-card:nth-last-child(2) {
    align-self: flex-start;
}

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

.season-folder::-webkit-details-marker,
.season-header::marker {
    display: none;
    content: "";
}

.season-header {
    padding: 12px 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: 10px;
}

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

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

.custom-arrow {
    font-size: 0.65rem;
    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);
}

.logs-preview-list {
    padding: 0 10px 12px 38px;
}

.log-file-row {
    padding: 6px 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;
}

/* Fullscreen reader */
.fullscreen-reader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #2e2d2c;
    z-index: 99999;
    overflow-y: auto;
    font-family: 'IBM Plex Sans', sans-serif;
}

.reader-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    text-align: left !important;
}

.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 {
    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;
    margin: 120px auto;
    padding: 0 40px;
}

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

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

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

.reader-meta {
    color: #fffeff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.reader-theme-toggle {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 10001;
}

/* Contact */
.contact-content {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.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);
}

.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,
.resume-download-link i {
    font-size: 0.9rem;
}

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

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

/* Hamburger */
.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: #ffffff;
    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 */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

/* Desktop layout refinements */
/* ============================================= */
/* DESKTOP-ONLY REFINEMENTS (>=1051px)            */
/* Consolidated from several previously-duplicated */
/* @media (min-width: 1051px) blocks.              */
/* ============================================= */
@media (min-width: 1051px) {
    .page-layout {
        margin-left: var(--sidebar-width, 150px) !important;
    }

    .main-content {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    .content-section {
        min-height: auto !important;
        height: auto !important;
    }

    #home {
        padding-top: 3rem !important;
        padding-bottom: 4rem !important;
    }

    #about {
        padding-top: 3.25rem !important;
    }

    #about,
    #goals,
    #experience,
    #education,
    #contact {
        padding-bottom: 2.5rem !important;
    }

    #goals,
    #experience,
    #education,
    #contact {
        padding-top: 2.5rem !important;
    }

    #current-projects,
    #projects,
    #logs {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .bio-section,
    .experience-container,
    .work-section,
    .contact-content,
    .content-section > .experience-section-header,
    .content-section > .experience-item,
    .content-section > .work-section,
    .content-section > .contact-content {
        max-width: 1540px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: clamp(42px, 4vw, 88px) !important;
        padding-right: clamp(42px, 4vw, 88px) !important;
        box-sizing: border-box !important;
    }

    .bio-section {
        justify-content: center !important;
        align-items: flex-start !important;
        gap: clamp(3rem, 5vw, 5rem) !important;
    }

    .left-content-column {
        flex: 1 1 760px !important;
        max-width: 980px !important;
        padding-top: 0.75rem !important;
    }

    .bio-image-container {
        flex: 0 0 350px !important;
        width: 350px !important;
        margin-top: 2.35rem !important;
    }

    .bio-image-container img,
    .profile-image-wrapper img {
        width: 285px !important;
    }

    .profile-name {
        font-size: 38px !important;
        margin-top: 0.35rem !important;
        margin-bottom: 0.45rem !important;
    }

    .profile-title {
        font-size: 13.5px !important;
        line-height: 1.6 !important;
        margin-bottom: 1.25rem !important;
    }

    .bio-text {
        font-size: 1.04rem !important;
        line-height: 1.7 !important;
        max-width: 920px !important;
        margin-top: 1.4rem !important;
        margin-bottom: 1.25rem !important;
    }

    .bio-logs-container {
        margin-top: 0.9rem !important;
    }

    .bio-logs-container .section-title-small {
        margin-top: 0 !important;
        margin-bottom: 0.85rem !important;
    }

    #bio-logs-list {
        margin-top: 0.75rem !important;
        gap: 28px 24px !important;
    }

    .bio-log-card {
        padding-bottom: 14px !important;
    }

    .bio-log-card h3 {
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
    }

    .home-videos-row {
        margin-top: 2.25rem !important;
        gap: 1.75rem !important;
    }

    .home-video-card,
    #home .left-content-column > div[style*="display: flex"] > div {
        flex: 1 1 340px !important;
        max-width: 500px !important;
    }

    .home-video-card .section-title-small {
        margin-bottom: 0.85rem !important;
    }

    #home iframe {
        max-height: 280px !important;
    }

    .resume-buttons {
        margin-top: 0.9rem !important;
        gap: 0.65rem !important;
    }

    .resume-button {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .experience-section-header {
        margin-top: 2rem !important;
        margin-bottom: 1.25rem !important;
    }

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

    .experience-title {
        padding-bottom: 0.5rem !important;
    }

    .experience-item {
        margin-bottom: 2rem !important;
    }

    .experience-header {
        gap: 2.25rem !important;
    }

    .experience-header-left {
        max-width: 960px !important;
    }

    .experience-description,
    .experience-bullets,
    .experience-activities,
    .experience-company {
        line-height: 1.55 !important;
    }

    .experience-logo img,
    .experience-header-right img {
        max-width: 260px !important;
    }

    .current-projects-grid,
    .work-grid,
    .logs-grid,
    .logs-list {
        margin-top: 1.25rem !important;
        gap: 1.5rem !important;
    }

    .work-info {
        padding: 1.25rem !important;
    }

    html {
        zoom: 0.8;
    }

    .sidebar {
        height: 125vh !important;
        min-height: 125vh !important;
        bottom: auto !important;
        overflow-y: auto !important;
    }

}

/* Light mode */
body.theme-light {
    --page-bg: var(--km-cream);
    background-color: var(--km-cream) !important;
    color: var(--km-text) !important;
}

body.theme-light .content-section {
    color: var(--km-text) !important;
}

body.theme-light .content-section :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, small, blockquote),
body.theme-light .reader-content :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, small, blockquote) {
    color: var(--km-text) !important;
}

body.theme-light .content-section [style*="color: rgba(255,255,255"],
body.theme-light .content-section [style*="color: rgba(255, 255, 255"],
body.theme-light .content-section [style*="color:#fff"],
body.theme-light .content-section [style*="color: #fff"],
body.theme-light .content-section [style*="color:#ffffff"],
body.theme-light .content-section [style*="color: #ffffff"] {
    color: var(--km-text) !important;
}

body.theme-light .timestamp,
body.theme-light .file-date,
body.theme-light .custom-arrow,
body.theme-light .folder-title i,
body.theme-light .bio-log-card .meta,
body.theme-light .logs-subtitle,
body.theme-light .experience-company,
body.theme-light .experience-date {
    color: var(--km-muted) !important;
}

body.theme-light a,
body.theme-light .reader-body a,
body.theme-light .project-link-inline,
body.theme-light a[style*="text-decoration: underline"] {
    color: var(--km-link) !important;
    text-decoration-color: var(--km-link) !important;
}

body.theme-light .experience-title,
body.theme-light .bio-log-card,
body.theme-light .season-folder,
body.theme-light .log-file-row,
body.theme-light .logs-section-header,
body.theme-light .theme-toggle-wrap,
body.theme-light .sidebar {
    border-color: var(--km-border) !important;
}

body.theme-light div[style*="border-bottom: 1px solid rgba(255,255,255"],
body.theme-light div[style*="border-bottom: 1px solid rgba(255, 255, 255"] {
    border-color: var(--km-border) !important;
}

body.theme-light div[style*="border: 1px solid rgba(255, 255, 255, 0.15)"] {
    border-color: var(--km-border) !important;
    box-shadow: 0 10px 24px rgba(38, 36, 46, 0.08) !important;
}

body.theme-light .work-card,
body.theme-light .current-project-card,
body.theme-light #projects-grid .project-card,
body.theme-light .log-card {
    background: var(--km-card) !important;
    border-color: rgba(38, 36, 46, 0.12) !important;
    color: var(--km-text) !important;
    box-shadow: 0 12px 28px rgba(38, 36, 46, 0.05);
}

body.theme-light .work-card:hover,
body.theme-light .current-project-card:hover,
body.theme-light #projects-grid .project-card:hover,
body.theme-light .log-card:hover {
    background: var(--km-card-strong) !important;
    border-color: rgba(38, 36, 46, 0.22) !important;
}

body.theme-light .work-title,
body.theme-light .work-subtitle,
body.theme-light .project-desc,
body.theme-light .log-title,
body.theme-light .log-body,
body.theme-light .current-project-title,
body.theme-light .current-project-description,
body.theme-light .bio-log-card h3,
body.theme-light .file-name,
body.theme-light .folder-title span {
    color: var(--km-text) !important;
}

body.theme-light .log-tag {
    background: rgba(38, 36, 46, 0.08) !important;
    color: var(--km-muted) !important;
}

body.theme-light .resume-button {
    color: var(--km-text) !important;
    background: rgba(255, 255, 255, 0.42) !important;
    border-color: rgba(38, 36, 46, 0.16) !important;
}

body.theme-light .resume-button:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(38, 36, 46, 0.3) !important;
}

body.theme-light .fullscreen-reader {
    background: var(--km-cream) !important;
    color: var(--km-text) !important;
}

body.theme-light .reader-header h1,
body.theme-light .reader-meta,
body.theme-light .reader-body,
body.theme-light .reader-body p,
body.theme-light .reader-body li,
body.theme-light .reader-body h1,
body.theme-light .reader-body h2,
body.theme-light .reader-body h3,
body.theme-light .reader-body h4,
body.theme-light .reader-body span,
body.theme-light .reader-body strong,
body.theme-light .reader-body em {
    color: var(--km-text) !important;
}

body.theme-light .back-link {
    background: #ffffff !important;
    color: var(--km-text) !important;
    border-color: rgba(38, 36, 46, 0.18) !important;
}

body.theme-light .back-link:hover {
    background: var(--km-text) !important;
    color: #ffffff !important;
}

body.theme-light .scroll-top {
    color: var(--km-muted) !important;
}

body.theme-light .scroll-top:hover {
    color: var(--km-text) !important;
}

/* Project card readability */
body.theme-light .section-title-small,
body.dark-foreground .section-title-small {
    color: #26242E !important;
    opacity: 0.88 !important;
}

body.theme-light .current-project-card,
body.theme-light #projects-grid .project-card,
body.dark-foreground .current-project-card,
body.dark-foreground #projects-grid .project-card {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(38, 36, 46, 0.16) !important;
    box-shadow: 0 12px 28px rgba(38, 36, 46, 0.06) !important;
}

body.theme-light .current-project-card *,
body.theme-light #projects-grid .project-card *,
body.dark-foreground .current-project-card *,
body.dark-foreground #projects-grid .project-card * {
    color: #26242E !important;
    opacity: 1 !important;
}

body.theme-light .current-project-card .project-desc,
body.theme-light #projects-grid .project-card .project-desc,
body.dark-foreground .current-project-card .project-desc,
body.dark-foreground #projects-grid .project-card .project-desc {
    color: rgba(38, 36, 46, 0.78) !important;
}

body.theme-light .work-subtitle,
body.dark-foreground .work-subtitle {
    color: rgba(38, 36, 46, 0.82) !important;
}

body.theme-light .current-project-logo,
body.dark-foreground .current-project-logo {
    background: #182B49 !important;
}

body.theme-light .current-project-logo *,
body.dark-foreground .current-project-logo * {
    color: #ffffff !important;
}

/* Mobile navigation */
/* ============================================= */
/* MOBILE / TABLET LAYOUT (<=1050px)              */
/* Consolidated from several previously-duplicated */
/* @media (max-width: 1050px) blocks.              */
/* ============================================= */
@media (max-width: 1050px) {
    .page-layout {
        margin-left: 0 !important;
    }

    .hamburger-menu {
        display: flex;
        background: rgba(255, 255, 255, 0.96) !important;
        border: 1px solid rgba(255, 255, 255, 0.95) !important;
        color: #1F1D29 !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }

    .hamburger-menu span {
        background: #1F1D29 !important;
    }

    .hamburger-menu:hover,
    .hamburger-menu.active {
        background: #ffffff !important;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-width, 160px);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        background: color-mix(in srgb, var(--page-bg, #1F1D29) 86%, transparent) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        overflow-y: auto;
        padding: 2rem 1rem;
    }

    .sidebar.active {
        transform: translateX(0);
        background: color-mix(in srgb, var(--page-bg, #1F1D29) 86%, transparent) !important;
        box-shadow: none !important;
    }

    .sidebar-overlay,
    .sidebar-overlay.active {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

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

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

    .sidebar-nav .nav-links {
        align-items: center !important;
        justify-content: center !important;
        width: 100%;
        margin-bottom: 20px !important;
    }

    .sidebar-nav .nav-link {
        padding: 0.5rem 0 !important;
        font-size: 0.9rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

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

    .sidebar-section .social-links {
        align-items: center !important;
        width: 100%;
    }

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

    .main-content {
        padding: 5rem 2rem 2rem 2rem;
        margin: 0 auto !important;
        max-width: 100% !important;
    }

    .left-content-column {
        max-width: 100% !important;
        width: 100%;
    }

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

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

    .bio-section {
        flex-direction: column-reverse !important;
        gap: 2rem;
    }

    .bio-image-container {
        align-self: center;
        margin: 0 auto !important;
    }

    body.theme-light .sidebar,
    body.theme-light .sidebar.active {
        background: color-mix(in srgb, var(--page-bg, #F7F1EA) 88%, transparent) !important;
        border-right-color: rgba(38, 36, 46, 0.14) !important;
    }

    body.theme-light .hamburger-menu {
        background: rgba(255, 255, 255, 0.96) !important;
        border: 1px solid rgba(38, 36, 46, 0.18) !important;
        color: #26242E !important;
        box-shadow: 0 8px 24px rgba(38, 36, 46, 0.12) !important;
    }

    body.theme-light .hamburger-menu span {
        background: #26242E !important;
    }

    body.theme-light .sidebar,
    body.theme-light .sidebar a,
    body.theme-light .project-link,
    body.theme-light .social-link,
    body.theme-light .typed-name,
    body.theme-light .greeting,
    body.theme-light .typed-flags,
    body.theme-light .pronunciation {
        color: #26242E !important;
    }

    body:not(.theme-light) .sidebar,
    body:not(.theme-light) .sidebar a,
    body:not(.theme-light) .project-link,
    body:not(.theme-light) .social-link,
    body:not(.theme-light) .typed-name,
    body:not(.theme-light) .greeting,
    body:not(.theme-light) .typed-flags,
    body:not(.theme-light) .pronunciation {
        color: #FFFFFF !important;
    }

    html {
        zoom: 1;
    }

    #home .bio-section {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    #home .bio-image-container {
        order: -1 !important;
        width: min(100%, 420px) !important;
        max-width: 420px !important;
        flex: 0 1 auto !important;
        margin: 7rem auto 2rem auto !important;
        padding: 0 !important;
        align-self: center !important;
        text-align: center !important;
    }

    #home .profile-image-wrapper,
    #home .profile-image-wrapper img {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #home .left-content-column {
        width: 100% !important;
        max-width: 100% !important;
        align-items: center !important;
        text-align: center !important;
    }

    #home .home-videos-row {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1.5rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #home .home-video-card {
        width: 100% !important;
        max-width: 560px !important;
        flex: 0 1 auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #home .home-video-card iframe {
        width: 100% !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #about .experience-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #about .experience-header,
    #education .experience-header,
    #experience .experience-header {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 1.25rem !important;
        width: 100% !important;
    }

    #about .experience-header-left,
    #education .experience-header-left,
    #experience .experience-header-left {
        width: 100% !important;
        max-width: 900px !important;
        min-width: 0 !important;
        flex: 0 1 auto !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #about .experience-header-right,
    #education .experience-header-right,
    #experience .experience-header-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 auto !important;
        gap: 0.75rem !important;
    }

    #about .experience-logo-link,
    #education .experience-logo-link,
    #experience .experience-logo-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #about .experience-logo,
    #education .experience-logo,
    #experience .experience-logo {
        width: clamp(170px, 42vw, 260px) !important;
        height: clamp(105px, 28vw, 180px) !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0.4rem !important;
        background: transparent !important;
        border: none !important;
    }

    #about .experience-logo img,
    #education .experience-logo img,
    #experience .experience-logo img {
        width: auto !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #about .experience-header-right > img {
        width: 100% !important;
        max-width: 460px !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 12px !important;
    }

    #about .verse-container {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: left !important;
        max-width: 680px !important;
    }

    #current-projects .current-projects-grid {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        align-items: center !important;
        width: 100% !important;
    }

    #current-projects .work-card-link {
        width: 100% !important;
        max-width: 560px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #current-projects .current-project-card {
        width: 100% !important;
        max-width: 560px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #current-projects .current-project-logo {
        width: 100% !important;
        height: clamp(90px, 22vw, 130px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #current-projects .current-project-logo img {
        width: auto !important;
        height: auto !important;
        max-width: 88% !important;
        max-height: 88% !important;
        object-fit: contain !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #goals .experience-header {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    #goals .experience-header-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #goals .experience-header-right > div {
        width: 100% !important;
        max-width: 360px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #goals .experience-header-right img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

}

/* Tablet */
@media (max-width: 1150px) and (min-width: 1051px) {
    .bio-section {
        flex-direction: column-reverse !important;
        gap: 2.5rem;
        align-items: center;
    }

    .left-content-column {
        max-width: 100% !important;
        width: 100%;
    }

    .bio-image-container {
        width: 100% !important;
        max-width: 420px !important;
        margin: 0 auto 2rem auto !important;
        align-self: center;
    }
}

/* Medium mobile */
@media (max-width: 900px) {
    .bio-image-container {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto 2rem auto !important;
        padding: 0 1rem;
    }

    .profile-image-wrapper {
        margin: 0 auto 1rem !important;
    }

    .profile-image-wrapper img {
        width: min(220px, 100%);
    }

    .experience-section {
        padding: 2rem 0;
    }

    .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;
    }

    .experience-date {
        align-self: flex-start;
    }
}

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

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

    .main-content {
        padding: 4.5rem 1.25rem 2rem 1.25rem;
    }

    #bio-logs-list {
        grid-template-columns: 1fr !important;
    }
}

/* Reader mobile */
@media (max-width: 768px) {
    .reader-theme-toggle {
        top: 20px;
        right: 20px;
    }
}

/* Short desktop screens */
@media (max-height: 720px) and (min-width: 1051px) {
    .sidebar {
        padding: 1.25rem 1rem;
    }

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

    .sidebar-nav .nav-link {
        font-size: 0.9rem;
    }

    .sidebar-nav {
        gap: 1rem;
    }

    .social-links {
        gap: 0.75rem !important;
    }

    .theme-toggle-wrap {
        padding-top: 0.75rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* =========================================================
   Fix sidebar text in light mode
   ========================================================= */

body.theme-light .sidebar,
body.theme-light .sidebar *,
body.theme-light .sidebar a,
body.theme-light .sidebar-name,
body.theme-light .sidebar-name h1,
body.theme-light .typed-name,
body.theme-light .greeting,
body.theme-light .typed-flags,
body.theme-light .pronunciation {
    color: #26242E !important;
    opacity: 1 !important;
}

body.theme-light .sidebar svg,
body.theme-light .sidebar .nav-icon,
body.theme-light .sidebar svg * {
    color: #26242E !important;
    stroke: currentColor !important;
}

body.theme-light .sidebar {
    border-right-color: rgba(38, 36, 46, 0.16) !important;
}

body.theme-light .theme-toggle {
    color: #26242E !important;
    border-color: rgba(38, 36, 46, 0.2) !important;
}

/* =========================================================
   FINAL RESPONSIVE POLISH OVERRIDES V4
   Moderate logo sizing. Logo changes only happen when minimized.
   ========================================================= */

/* Desktop zoom only. Do not run this during hamburger layout. */

/* Mobile / minimized layout should not be zoomed. */

/* Force real browser bullets, no custom bullet character. */
.experience-bullets {
    list-style-type: disc !important;
    list-style-position: outside !important;
    padding-left: 1.5rem !important;
    margin-left: 0 !important;
}

.experience-bullets li {
    display: list-item !important;
    position: static !important;
    padding-left: 0.25rem !important;
    margin-bottom: 0.45rem !important;
}

.experience-bullets li::before {
    content: none !important;
    display: none !important;
}

/* Short centered divider between Logs and Contact. */
#contact {
    border-top: none !important;
    position: relative;
}

#contact::before {
    content: "";
    display: block;
    width: min(62vw, 900px);
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 auto 2.5rem auto;
}

body.theme-light #contact::before {
    background: rgba(38, 36, 46, 0.16);
}

/* Center profile section when screen is minimized. */

/* Center videos when screen is minimized. */

/* Moderate logo/image fixes only when screen is minimized. */

/* Center the Goals photo when screen is minimized */

/* --- Tightened Square Layout for Last.fm Card --- */

/* Removed the forced 300px height so the card body dynamically shrinks to fit the square layout */
/* 1. CONTAINERS: FORCE UNIFORM SIZE AND ALIGNMENT */
#home #now-playing.now-playing-card,
.letterboxd-card-inner {
    width: 190px !important;
    max-width: 190px !important;
    height: 100% !important;
    min-height: 300px !important; /* Matches your video card height */
    box-sizing: border-box !important;
    padding: 0.75rem !important; /* Unified padding for a clean look */
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 0.6rem !important;
}

/* 1. Force the image to occupy its own "slot" at the top */
#home #now-playing img.now-playing-art,
#home #now-playing .now-playing-art {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    border-radius: 8px !important;
    object-fit: cover !important;   
    display: block !important;
    /* Remove min-height: 0 if it exists; it can cause the image to 'shrink' away */
    min-height: auto !important; 
    flex-shrink: 0 !important; /* This prevents the image from squishing */
}



/* 2. Ensure the parent container is actually creating the space */
#home #now-playing.now-playing-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; /* Forces the card to take up the full 278px */
    justify-content: flex-start !important; 
}

/* 4. TYPOGRAPHY */
#home #now-playing .now-playing-title {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#home #now-playing .now-playing-artist {
    font-size: 0.82rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
}

/* 5. CLEANUP */
#home #now-playing.now-playing-card .now-playing-status {
    display: none !important;
}

#home #now-playing.now-playing-card a {
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
@media (max-width: 1100px) {
  .video-letterboxd-row {
    justify-content: center !important;
  }
}

@media (max-width: 780px) {
  .video-letterboxd-row {
    flex-direction: column !important;
    align-items: center !important;
  }

  .home-video-card,
  .letterboxd-card,
  .spotify-card {
    flex: 1 1 100% !important;
    max-width: 520px !important;
    width: 100% !important;
  }
}

/*.now-playing-card {
    width: 100%;
    max-width: 320px;
    margin: 1rem auto 0 auto;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.now-playing-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.now-playing-art {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
}

.now-playing-text {
    min-width: 0;
    text-align: left;
}

.now-playing-status {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
    margin-bottom: 0.35rem;
}

.now-playing-title {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-artist {
    font-size: 0.8rem;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-card a {
    color: inherit;
    text-decoration: none;
}

.now-playing-card a:hover .now-playing-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.theme-light .now-playing-card {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(38, 36, 46, 0.16);
    color: #26242E;
    box-shadow: 0 10px 28px rgba(38, 36, 46, 0.12);
}

/* Spotify card light-mode fix: the "Tightened Square Layout" rules above
   use #home #now-playing.now-playing-card with !important, which outranks
   the generic .now-playing-card light rule above, so the card stayed dark
   when switching themes. */
#home #now-playing.now-playing-card {
    transition: background-color var(--bg-fade-duration) ease,
                border-color var(--bg-fade-duration) ease,
                box-shadow var(--bg-fade-duration) ease;
}

#home #now-playing .now-playing-title,
#home #now-playing .now-playing-artist {
    transition: color var(--bg-fade-duration) ease;
}

body.theme-light #home #now-playing.now-playing-card {
    background: var(--km-card) !important;
    border-color: rgba(38, 36, 46, 0.12) !important;
    box-shadow: 0 12px 28px rgba(38, 36, 46, 0.05) !important;
}

body.theme-light #home #now-playing .now-playing-title {
    color: var(--km-text) !important;
}

body.theme-light #home #now-playing .now-playing-artist {
    color: var(--km-muted) !important;
}

/* Smaller Last.fm music widget 
#home .now-playing-card {
    max-width: 280px !important;
    width: 100% !important;
    margin-top: 0.85rem !important;
    padding: 0.75rem 0.85rem !important;
    border-radius: 16px !important;
}

#home .now-playing-inner {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.7rem !important;
    width: 100% !important;
}

#home img.now-playing-art,
#home .now-playing-art {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    display: block !important;
    flex-shrink: 0 !important;
}

#home .now-playing-text {
    min-width: 0 !important;
    text-align: left !important;
    display: block !important;
}

#home .now-playing-status {
    font-size: 0.62rem !important;
    margin-bottom: 0.35rem !important;
    letter-spacing: 0.1em !important;
}

#home .now-playing-title {
    display: block !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#home .now-playing-artist {
    display: block !important;
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    opacity: 0.72 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
} */

/* Fix fullscreen log reader when desktop zoom is active */
.fullscreen-reader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 2147483647 !important;
    overflow-y: auto !important;
}

/* Because html is zoomed to 0.8 on desktop, make the reader 125% wide/tall */
@media (min-width: 1051px) {
    .fullscreen-reader {
        width: 125vw !important;
        height: 125vh !important;
    }
}

/* Hide the normal page behind the log reader */
body:has(.fullscreen-reader) .sidebar,
body:has(.fullscreen-reader) .page-layout {
    visibility: hidden !important;
}

/* Keep the log reader visible */
body:has(.fullscreen-reader) .fullscreen-reader {
    visibility: visible !important;
}

/* Make log reader nicer on smaller screens */
@media (max-width: 700px) {
    .reader-content {
        margin: 100px auto 40px auto !important;
        padding: 0 24px !important;
        max-width: 100% !important;
    }

    .reader-header h1 {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }

    .reader-body {
        font-size: 1rem !important;
        line-height: 1.75 !important;
    }

    .pinned-nav {
        top: 20px !important;
        left: 20px !important;
    }

    .reader-theme-toggle {
        top: 20px !important;
        right: 20px !important;
    }
}
/* Mobile Optimization Upgrades */
@media screen and (max-width: 768px) {
    /* 1. Eliminate the desktop sidebar spacing constraint */
    .page-layout {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* 2. Fix the home column wrapping & spacing */
    .bio-section {
        flex-direction: column !important;
        align-items: center !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        gap: 2rem !important;
    }

    .left-content-column {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* 3. Center and scale the profile layout box properly */
    .bio-image-container {
        width: 100% !important;
        max-width: 320px !important;
        margin: 1.5rem auto 0 auto !important;
        flex: none !important;
    }

    .profile-image-wrapper img {
        width: 100% !important;
        max-width: 260px !important;
        height: auto !important;
    }

    .profile-name {
        font-size: 28px !important; /* Scaled down down from 38px */
    }

    /* 4. Fix Experience & Education multi-row misalignment */
    .experience-header {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: flex-start !important;
    }

    .experience-header-right {
        min-width: 100% !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .experience-date {
        text-align: left !important;
    }

    .experience-logo {
        width: 140px !important;
        height: auto !important;
        justify-content: flex-start !important;
    }

    .experience-logo img {
        max-width: 140px !important;
    }

    /* 5. Clean up grid systems (Personal Projects & Video Rows) */
    .work-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .home-videos-row {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .home-video-card {
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }

    #bio-logs-list {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}