/* =========================================================
   GLOBAL BASE & LAYOUT
========================================================= */

/* Base / Body */
body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background-color: #F5E6D3; /* Warm Sand */
    color: #222222; /* Deep Charcoal */
}

/* Site Header & Navigation */
.site-header {
    padding: 1rem 2rem;
    border-bottom: 2px solid #D9822B; /* Terracotta */
    background-color: #FAF5F0; /* Warm Off-White */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    color: #8E7CA5; /* Ashy Purple */
}

.site-nav {
    margin-top: 0.5rem;
}

.site-nav a {
    margin-right: 1.5rem;
    text-decoration: none;
    color: #4AC3B0; /* Teal */
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-nav a:hover {
    color: #FF6F3C; /* Sunset Orange */
}

/* Main Content Wrapper */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: auto;
}

/* =========================================================
   REUSABLE COMPONENTS
========================================================= */

/* Base Buttons */
.btn {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.btn.primary {
    background-color: #FF6F3C; /* Sunset Orange */
    color: #FAF5F0; /* Warm Off-White */
}

.btn.secondary {
    background-color: #4A3B2A; /* Dark Earth Brown */
    color: #FAF5F0;
}

.btn.secondary:hover {
    background-color: #8E7CA5; /* Ashy Purple */
}

.btn.disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* Reusable Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #4A3B2A; /* Dark Earth Brown */
}

.page-header h2 {
    color: #8E7CA5; /* Ashy Purple */
}

.page-header p {
    max-width: 700px;
    margin: auto;
    font-size: 1.1rem;
}

/* =========================================================
   HOME PAGE
========================================================= */

/* Home — Hero */
.home-hero {
    background: linear-gradient(
        135deg,
        #D9822B, /* Terracotta */
        #FF6F3C, /* Sunset Orange */
        #8E7CA5  /* Ashy Purple */
    );
    text-align: center;
    padding: 4rem 1rem;
    border-radius: 0 0 50% 50% / 20%;
    margin-bottom: 3rem;
    color: #FAF5F0; /* Warm Off-White */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.home-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.home-hero p {
    font-size: 1.5rem;
    font-weight: 400;
}

/* Home — Intro */
.home-intro {
    max-width: 800px;
    margin: auto;
    padding: 2rem 1rem;
    text-align: center;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Home — Section Cards */
.home-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 2rem 0;
    gap: 2rem;
}

.section-card {
    background-color: #FAF5F0; /* Warm Off-White */
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #222222;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 260px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.section-card h3 {
    margin-bottom: 0.5rem;
    color: #8E7CA5; /* Ashy Purple */
    font-size: 1.3rem;
}

.section-card p {
    margin-bottom: 1rem;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    background-color: #FFDFAF; /* Warm pop hover */
}

.section-card a {
    margin-top: 1rem;
    color: #FAF5F0;
    background-color: #FF6F3C; /* Sunset Orange */
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

.section-card a:hover {
    background-color: #4AC3B0; /* Teal */
}

/* =========================================================
   PROJECTS PAGE
========================================================= */

/* Projects — Hero */
.projects-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.projects-hero h2 {
    color: #8E7CA5; /* Ashy Purple */
}

.projects-hero p {
    max-width: 720px;
    margin: auto;
    font-size: 1.1rem;
}

/* Projects — Sections */
.projects-section {
    margin: 4rem 0;
    padding: 3rem 2.5rem;
    border-radius: 22px;
}

.projects-featured {
    background: linear-gradient(135deg, #3E2F23, #5B4A3A);
    color: #FAF5F0;
}

.projects-creative {
    background: linear-gradient(135deg, #6E5A74, #8E7CA5);
    color: #FAF5F0;
}

.projects-creative .project-card{
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.projects-infra {
    background-color: #EFE6DC;
    border: 2px solid #4A3B2A;
}

/* Projects — Section Header */
.section-header {
    max-width: 720px;
    margin: 0 auto 2.5rem auto;
}

.section-header h3 {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Projects — Grid & Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}


.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

.project-card h4 {
    margin-top: 0;
    color: #8E7CA5;
}

.project-card p {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #222222;
}

/* Project Preview (Static) */

.project-preview {
    margin: -2rem -2rem 1.5rem -2rem;
    border-radius: 14px 14px 0 0;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);

}

.project-tech li {
    background: #8E7CA5;
    color: #FAF5F0;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}



/* =========================================================
   ABOUT PAGE
========================================================= */

/* ------------------------------
   About — Hero (Intro + Photo)
-------------------------------- */

.about-hero {
    display: flex;
    gap: 3rem;
    align-items: center;
    padding: 4rem 2.5rem;
    background: linear-gradient(
        135deg,
        #F5E6D3, /* Warm Sand */
        #FAF5F0  /* Warm Off-White */
    );
    border-radius: 28px;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.about-hero-text {
    flex: 1;
    min-width: 300px;
}

.about-hero-text h2 {
    color: #8E7CA5; /* Ashy Purple */
    margin-bottom: 1rem;
}

.about-lead {
    font-size: 1.25rem;
    line-height: 1.65;
}

/* Photo container stays beside text */
.about-hero-image {
    flex: 0.9;
    min-width: 260px;
    display: flex;
    justify-content: center;
}

/* Photo Placeholder */
.photo-placeholder {
    width: 260px;
    height: 320px;
    background-color: #4A3B2A; /* Earth Brown */
    color: #FAF5F0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ------------------------------
   About — Section Containers
-------------------------------- */

/* Base container */
.about-section {
    padding: 3.5rem 2.5rem;
    border-radius: 24px;
    margin-bottom: 3.5rem;
}

/* Section inner width */
.about-content {
    max-width: 760px;
    margin: auto;
}

/* Variants for visual rhythm */
.about-section-light {
    background-color: #FAF5F0; /* Warm Off-White */
}

.about-section-warm {
    background-color: #E6D5C3; /* Warm Clay */
}

.about-section-accent {
    background-color: #EFE6DA; /* Soft Accent */
}

/* ------------------------------
   About — Highlight Text
-------------------------------- */

.about-highlight {
    font-size: 1.15rem;
    font-weight: 600;
    color: #8E7CA5; /* Ashy Purple */
    margin-bottom: 1.5rem;
}

/* ------------------------------
   Music Database Page
--------------------------------*/

.project-overview {
    max-width: 820px;
    margin: 0 auto 3rem;
    padding: 2.5rem 2.5rem;
    border-radius: 20px;
    background-color: #FAF5F0; /* Warm Off-White */
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.project-overview:nth-of-type(2) {
    background-color: #EFE6DA; /* Slightly darker warmth */
}

.project-overview:nth-of-type(3) {
    background-color: #E6D5C3; /* Rich warm accent */
}

.project-overview h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #8E7CA5; /* Ashy Purple */
    font-size: 1.4rem;
}

.project-overview p {
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Tech Stack – Music Database */

.project-overview .tech-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-overview .tech-list li {
    background-color: #8E7CA5; /* Ashy Purple */
    color: #FAF5F0;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Interactive Placeholder – Music Database */

.project-interactive {
    max-width: 900px;
    margin: 4rem auto;
}

.interactive-placeholder {
    background-color: #FAF5F0;
    border: 2px dashed #4A3B2A; /* Earth Brown */
    border-radius: 18px;
    padding: 2.5rem;
    text-align: center;
    color: #222222;
}

.interactive-placeholder p {
    max-width: 640px;
    margin: 0.75rem auto;
    line-height: 1.6;
}

.placeholder-note {
    margin-top: 1.5rem;
    font-weight: 600;
    color: #8E7CA5; /* Ashy Purple */
}

/* ================================
   Music Database: Level 1 Upgrade
   ================================ */

.album-card-rich {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 260px;
    text-decoration: none;
}

.album-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.album-card-label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    margin: 0;
}

.album-card-arrow {
    font-size: 1.1rem;
    opacity: 0.65;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.album-card-rich:hover .album-card-arrow {
    transform: translateX(4px);
    opacity: 1;
}

.album-card-title {
    margin-bottom: 0;
    line-height: 1.15;
}

.album-card-artist {
    font-weight: 600;
    margin: 0;
}

.album-card-meta,
.album-card-scene {
    margin: 0;
    font-size: 0.92rem;
    opacity: 0.82;
}

.album-card-scene {
    font-style: italic;
}

.album-card-tag-area {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.album-card-tag-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.album-card-tag-label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.65;
}

.album-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.album-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1;
    border: 1px solid currentColor;
    opacity: 0.85;
}

.album-tag.subgenre {
    opacity: 0.7;
}

.album-tag.more-tag {
    opacity: 0.55;
}

.album-card-action {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.75;
}

.music-db-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.music-db-search,
.music-db-sort,
.music-db-filter {
    min-height: 2.4rem;
}

.music-db-search {
    flex: 1 1 240px;
}

.music-db-sort,
.music-db-filter {
    flex: 1 1 160px;
}

.random-album-btn,
.reset-music-filters {
    min-height: 2.4rem;
    cursor: pointer;
}

@media (max-width: 700px) {
    .music-db-toolbar {
        flex-direction: column;
    }

    .music-db-search,
    .music-db-sort,
    .music-db-filter,
    .random-album-btn,
    .reset-music-filters {
        width: 100%;
    }
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    background-color: #4A3B2A;
    color: #FAF5F0;
    padding: 2rem 1rem;
}

.footer-content {
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.footer-name {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #8E7CA5;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: #FAF5F0; /* Warm white for legibility */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #FF6F3C; /* Accent pop */
}

/* =========================================================
   MODALS (STATIC + INTERACTIVE)
========================================================= */

.project-modal,
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 15, 10, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.project-modal.active,
#modal-overlay:not(.modal-hidden) {
    display: flex;
}

.project-modal-content,
.modal-window {
    background: #FAF5F0;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: visible;
    padding: 2.5rem;
    position: relative;
}

.modal-close,
#modal-close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 1.6rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #4A3B2A;
}

/* ------------------------------
   Certifications Page
--------------------------------*/

.certifications-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: #FAF5F0; /* Warm Off-White */
    border: 1.5px solid #4A3B2A; /* Earth Brown */
    border-radius: 14px;
    padding: 1.6rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.cert-card h3 {
    margin-top: 0;
    color: #8E7CA5; /* Ashy Purple */
}

.cert-org {
    font-weight: 600;
    font-size: 0.9rem;
    color: #4A3B2A;
    margin-bottom: 0.6rem;
}

.cert-desc {
    font-size: 0.95rem;
    color: #222222;
    line-height: 1.5;
}

.cert-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin-top: 1rem;
    padding: 0;
}

.cert-tech li {
    background: #8E7CA5;
    color: #FAF5F0;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.cert-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.cert-label {
    font-style: italic;
    text-decoration: underline;
    font-weight: 500;
}

.cert-details {
    margin-top: 1rem;
    padding-left: 1.25rem;
    color: #222222;
}

.cert-details li {
    margin-bottom: 0.5rem;
    line-height: 1.45;
    font-size: 0.95rem;
}


/* =========================================================
   RESUME PAGE
========================================================= */

.resume-section {
    background-color: #FAF5F0;
    border: 1.5px solid #4A3B2A;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
}

.resume-section h3 {
    color: #8E7CA5; /* Ashy Purple */
    font-size: 1.9rem;
    margin-top: 0;
    margin-bottom: 1.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(142,124,165,0.35);
    padding-bottom: 0.5rem;
}


.resume-project h4,
.resume-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #4A3B2A;
}


.resume-item p {
    margin-top: 0;
    line-height: 1.5;
}

.resume-project {
    margin-bottom: 2rem;
}

.resume-tech {
    font-size: 0.9rem;
    font-style: italic;
    color: #6B5E52;
    margin-bottom: 0.75rem;
}

.resume-project ul,
.resume-section ul {
    padding-left: 1.25rem;
}

.resume-project li,
.resume-section li {
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

/* Skills */
.resume-skills {
    list-style: none;
    padding: 0;
}

.resume-skills li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Certifications */
.resume-certifications {
    list-style: none;
    padding: 0;
}

.resume-certifications li {
    margin-bottom: 1rem;
    line-height: 1.45;
}

/* Section subheaders (Completed / Upcoming) */
.resume-section h5 {
    font-size: 1.05rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #4A3B2A;
}

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

.album-card {
    display: block;
    padding: 1rem;
    border-radius: 14px;
    background: #FAF5F0;
    color: #4A3B2A;
    text-decoration: none;
    border: 1px solid rgba(74, 59, 42, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 59, 42, 0.12);
}

.album-card h3 {
    margin-bottom: 0.35rem;
}

.album-card-meta,
.album-card-scene {
    font-size: 0.9rem;
    opacity: 0.8;
}

.album-detail-page {
    max-width: 950px;
    margin: 2rem auto;
    padding: 2rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #D9822B;
    text-decoration: none;
}

.album-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.album-cover-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 18px;
    background: #F5E6D3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A3B2A;
    font-size: 0.9rem;
}

.album-main-info h1 {
    font-size: 2.4rem;
    margin-bottom: 0.25rem;
}

.album-main-info h2 {
    font-size: 1.4rem;
    font-weight: normal;
    opacity: 0.85;
}

.album-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D9822B;
    font-weight: bold;
}

.album-meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.album-section {
    margin-top: 2rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.music-tag {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #F5E6D3;
    color: #4A3B2A;
    font-size: 0.9rem;
}

.music-db-toolbar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.music-db-search {
    flex: 1;
    min-width: 240px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 59, 42, 0.2);
    background: #FAF5F0;
    color: #4A3B2A;
}

.music-db-sort,
.random-album-btn {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 59, 42, 0.2);
    background: #F5E6D3;
    color: #4A3B2A;
    cursor: pointer;
}

.album-grid,
.artist-grid,
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.album-card,
.artist-card,
.genre-card {
    display: block;
    padding: 1rem;
    border-radius: 14px;
    background: #FAF5F0;
    color: #4A3B2A;
    text-decoration: none;
    border: 1px solid rgba(74, 59, 42, 0.15);
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 59, 42, 0.12);
}

.album-card h3,
.artist-card h3,
.genre-card h3 {
    margin-bottom: 0.35rem;
}

.album-card-meta,
.album-card-scene,
.artist-card-meta,
.genre-type {
    font-size: 0.9rem;
    opacity: 0.8;
}

.artist-description {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.45;
}

.music-db-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.music-db-pagination button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #D9822B;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.music-db-pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.music-db-expanded #expand-music-db {
    display: none;
}

.music-detail-page {
    max-width: 1050px;
    margin: 2rem auto;
    padding: 2rem;
}

.music-db-count {
    margin: 0.75rem 0 1rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

.artist-card,
.genre-card {
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.artist-card:hover,
.genre-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 59, 42, 0.12);
}

.album-main-info a {
    color: inherit;
    text-decoration: none;
}

.album-main-info a:hover {
    color: #D9822B;
}

.music-tag {
    text-decoration: none;
}

.music-tag:hover {
    background: #D9822B;
    color: white;
}

.music-db-toolbar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.music-db-search {
    flex: 1 1 260px;
    min-width: 240px;
}

.music-db-search,
.music-db-sort,
.music-db-filter,
.random-album-btn,
.reset-music-filters {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 59, 42, 0.2);
    background: #FAF5F0;
    color: #4A3B2A;
}

.music-db-sort,
.music-db-filter,
.random-album-btn,
.reset-music-filters {
    cursor: pointer;
}

.random-album-btn {
    background: #D9822B;
    color: white;
}

.reset-music-filters {
    background: #F5E6D3;
}

.music-db-count {
    margin: 0.75rem 0 1rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

.album-grid,
.artist-grid,
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.album-card,
.artist-card,
.genre-card {
    display: block;
    padding: 1rem;
    border-radius: 14px;
    background: #FAF5F0;
    color: #4A3B2A;
    text-decoration: none;
    border: 1px solid rgba(74, 59, 42, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.album-card:hover,
.artist-card:hover,
.genre-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 59, 42, 0.12);
}

.album-card h3,
.artist-card h3,
.genre-card h3 {
    margin-bottom: 0.35rem;
}

.album-card-meta,
.album-card-scene,
.artist-card-meta,
.genre-type {
    font-size: 0.9rem;
    opacity: 0.8;
}

.music-db-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.music-db-pagination button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #D9822B;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.music-db-pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.music-detail-page {
    max-width: 1050px;
    margin: 2rem auto;
    padding: 2rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #D9822B;
    text-decoration: none;
}

.album-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.album-cover-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 18px;
    background: #F5E6D3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A3B2A;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.album-main-info h1 {
    font-size: 2.4rem;
    margin-bottom: 0.25rem;
}

.album-main-info h2 {
    font-size: 1.4rem;
    font-weight: normal;
    opacity: 0.85;
}

.album-main-info a {
    color: inherit;
    text-decoration: none;
}

.album-main-info a:hover {
    color: #D9822B;
}

.album-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D9822B;
    font-weight: bold;
}

.album-meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.album-section {
    margin-top: 2rem;
}

.album-section p {
    line-height: 1.6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.music-tag {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #F5E6D3;
    color: #4A3B2A;
    font-size: 0.9rem;
    text-decoration: none;
}

.music-tag:hover {
    background: #D9822B;
    color: white;
}

.subgenre-tag {
    border: 1px solid rgba(74, 59, 42, 0.18);
}

.music-db-expanded #expand-music-db {
    display: none;
}

@media (max-width: 700px) {
    .album-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .album-main-info h1 {
        font-size: 2rem;
    }

    .music-detail-page {
        padding: 1rem;
    }
}

.music-db-intro {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(250, 245, 240, 0.8);
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.music-db-kicker {
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: bold;
    color: #D9822B;
}

.music-db-intro h2 {
    margin-bottom: 0.5rem;
    color: #4A3B2A;
}

.music-db-intro p {
    max-width: 760px;
    line-height: 1.6;
}

.music-db-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.music-stat-card {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: #F5E6D3;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.music-stat-card strong {
    display: block;
    font-size: 1.4rem;
    color: #4A3B2A;
}

.music-stat-card span {
    font-size: 0.85rem;
    opacity: 0.8;
}

.music-db-empty-state {
    margin: 2rem auto;
    max-width: 520px;
    padding: 1.5rem;
    text-align: center;
    border-radius: 18px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.music-db-empty-state h3 {
    margin-bottom: 0.5rem;
    color: #4A3B2A;
}

.music-db-empty-state p {
    line-height: 1.5;
    opacity: 0.8;
}

.album-section {
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 59, 42, 0.1);
}

.album-section:first-of-type {
    border-top: none;
}

.album-section h3 {
    margin-bottom: 0.75rem;
    color: #4A3B2A;
}

.album-section p {
    max-width: 850px;
}

.nasa-page {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2rem;
}

.nasa-hero {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: rgba(250, 245, 240, 0.85);
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.nasa-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D9822B;
    font-weight: bold;
    font-size: 0.85rem;
}

.nasa-hero h1 {
    margin: 0.25rem 0 0.5rem;
    color: #4A3B2A;
}

.nasa-hero p {
    max-width: 760px;
    line-height: 1.6;
}

.nasa-controls {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.nasa-controls label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: #4A3B2A;
    font-weight: 600;
}

.nasa-controls input {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 59, 42, 0.2);
    background: #FAF5F0;
    color: #4A3B2A;
}

.nasa-controls button {
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    border: none;
    background: #D9822B;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.neo-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.neo-stat-card {
    padding: 1rem;
    border-radius: 16px;
    background: #F5E6D3;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.neo-stat-card strong {
    display: block;
    font-size: 1.35rem;
    color: #4A3B2A;
}

.neo-stat-card span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.neo-grid {
    margin-top: 1rem;
}

.neo-results-header {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

.neo-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.neo-pagination button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #D9822B;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.neo-pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.neo-card.hazardous {
    border-color: rgba(217, 130, 43, 0.8);
}

.nasa-empty,
.nasa-empty-state {
    grid-column: 1 / -1;
    padding: 1.5rem;
    text-align: center;
    border-radius: 18px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.12);
}
.neo-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.neo-card {
    padding: 0.85rem;
    border-radius: 14px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.14);
    color: #4A3B2A;
}

.neo-card-header {
    display: block;
}

.neo-card-header h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
}

.neo-card-header span {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #F5E6D3;
}

.neo-date {
    margin-top: 0.45rem;
    opacity: 0.8;
    font-size: 0.85rem;
}

.neo-data-list {
    margin-top: 0.75rem;
}

.neo-data-list p {
    margin-bottom: 0.35rem;
    line-height: 1.35;
    font-size: 0.9rem;
}

.projects-hero {
    max-width: 950px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 22px;
    background: rgba(250, 245, 240, 0.85);
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.projects-kicker {
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    font-weight: bold;
    color: #D9822B;
}

.projects-hero h2 {
    margin-bottom: 0.5rem;
    color: #4A3B2A;
}

.projects-hero p {
    max-width: 720px;
    line-height: 1.6;
}

.projects-section {
    max-width: 1150px;
    margin: 2rem auto;
    padding: 0 2rem;
}

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

.section-header h3 {
    color: #4A3B2A;
    margin-bottom: 0.35rem;
}

.section-header p {
    max-width: 760px;
    line-height: 1.55;
    opacity: 0.85;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1rem;
    border-radius: 20px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.14);
    box-shadow: 0 10px 24px rgba(74, 59, 42, 0.06);
}

.featured-project-card {
    border-color: rgba(217, 130, 43, 0.28);
}

.project-status {
    align-self: flex-start;
    margin-bottom: 0.75rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #F5E6D3;
    color: #4A3B2A;
}

.project-status.complete {
    background: rgba(74, 195, 176, 0.16);
}

.project-status.active {
    background: rgba(217, 130, 43, 0.18);
}

.project-status.systems {
    background: rgba(142, 124, 165, 0.18);
}

.project-status.creative {
    background: rgba(255, 111, 60, 0.16);
}

.project-status.infra {
    background: rgba(74, 59, 42, 0.1);
}

.project-preview {
    min-height: 150px;
    margin-bottom: 1rem;
    border-radius: 16px;
    overflow: hidden;
    background: #F5E6D3;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.project-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.project-preview-placeholder {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    color: #4A3B2A;
}

.music-preview {
    background: linear-gradient(135deg, #F5E6D3, #D9822B);
}

.nasa-preview {
    background: linear-gradient(135deg, #F5E6D3, #8E7CA5);
}

.weather-preview {
    background: linear-gradient(135deg, #F5E6D3, #4AC3B0);
}

.hawkvm-preview {
    background: linear-gradient(135deg, #F5E6D3, #4A3B2A);
}

.project-card-body {
    flex: 1;
}

.project-card h4 {
    margin-bottom: 0.5rem;
    color: #4A3B2A;
}

.project-summary {
    line-height: 1.55;
    opacity: 0.88;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.project-tech li {
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #F5E6D3;
    color: #4A3B2A;
    font-size: 0.78rem;
}

.project-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.project-highlights span {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 59, 42, 0.12);
    font-size: 0.76rem;
    opacity: 0.85;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.btn.disabled,
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.project-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(26, 20, 15, 0.55);
}

.project-modal {
    position: relative;
    width: min(880px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 2rem;
    border-radius: 22px;
    background: #FAF5F0;
    color: #4A3B2A;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.project-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #F5E6D3;
    color: #4A3B2A;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.project-modal-kicker {
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #D9822B;
}

.project-modal-header h2 {
    margin-bottom: 0.35rem;
}

.project-modal-header p {
    max-width: 680px;
    line-height: 1.55;
}

.project-modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0 1.5rem;
}

.project-modal-tech span {
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: #F5E6D3;
    font-size: 0.82rem;
}

.project-modal-section {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(74, 59, 42, 0.12);
}

.project-modal-section h3 {
    margin-bottom: 0.6rem;
    color: #4A3B2A;
}

.project-modal-section p {
    line-height: 1.6;
}

.project-modal-section ul {
    padding-left: 1.25rem;
}

.project-modal-section li {
    margin-bottom: 0.4rem;
    line-height: 1.45;
}

.project-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .projects-hero,
    .projects-section {
        padding: 1rem;
    }

    .project-modal {
        padding: 1.5rem;
    }

    .project-actions {
        flex-direction: column;
    }

    .project-actions .btn,
    .project-modal-actions .btn {
        width: 100%;
        text-align: center;
    }
}


/* ===============================
   Projects Page Stability Overrides
================================ */

.projects-section {
    max-width: 1150px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 1rem;
    border-radius: 20px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.14);
    box-shadow: 0 10px 24px rgba(74, 59, 42, 0.06);
    overflow: hidden;
}

.project-card-body {
    flex: 0 1 auto;
}

.project-preview {
    width: 100%;
    height: 150px;
    min-height: 150px;
    max-height: 150px;
    margin-bottom: 1rem;
    border-radius: 16px;
    overflow: hidden;
    background: #F5E6D3;
    border: 1px solid rgba(74, 59, 42, 0.12);
    flex-shrink: 0;
}

.project-preview-placeholder {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    color: #4A3B2A;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Keep summaries from making cards absurdly tall */
.project-summary {
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* Keep tags compact */
.project-tech,
.project-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tech {
    margin: 0.85rem 0;
    padding: 0;
    list-style: none;
}

.project-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* =========================================================
   WEATHER APP PAGE
========================================================= */

.weather-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
}

.weather-page-hero {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: rgba(250, 245, 240, 0.85);
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.weather-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D9822B;
    font-weight: bold;
    font-size: 0.85rem;
}

.weather-page-hero h1 {
    margin: 0.25rem 0 0.5rem;
    color: #4A3B2A;
}

.weather-page-hero p {
    max-width: 720px;
    line-height: 1.6;
}

.weather-app-card {
    padding: 1.25rem;
    border-radius: 18px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.14);
}

.weather-app-card label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
    color: #4A3B2A;
}

.weather-search-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.weather-search-row input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 59, 42, 0.2);
    background: #FAF5F0;
    color: #4A3B2A;
}

.weather-search-row button {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: none;
    background: #D9822B;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.weather-location-suggestions {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.weather-suggestion {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 59, 42, 0.12);
    background: #FAF5F0;
    color: #4A3B2A;
    text-align: left;
    cursor: pointer;
}

.weather-suggestion:hover {
    background: #D9822B;
    color: white;
}

.weather-result {
    margin-top: 1rem;
}

.weather-current-card,
.weather-error,
.weather-loading {
    padding: 1rem;
    border-radius: 16px;
    background: #F5E6D3;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.weather-location-name {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #4A3B2A;
}

.weather-temp-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.weather-temp-row strong {
    font-size: 2.2rem;
    color: #4A3B2A;
}

.weather-temp-row span {
    opacity: 0.8;
}

.weather-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.weather-detail-grid div {
    padding: 0.75rem;
    border-radius: 14px;
    background: #FAF5F0;
}

.weather-detail-grid span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.75;
}

.weather-detail-grid strong {
    display: block;
    margin-top: 0.25rem;
    color: #4A3B2A;
}

@media (max-width: 700px) {
    .weather-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .weather-search-row button {
        width: 100%;
    }
}

/* =========================================================
   PROJECT OVERVIEW MODAL FIX
   Keeps project overview modals separate from old global modal CSS
========================================================= */

.project-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(26, 20, 15, 0.55);
}

.project-modal-overlay .project-modal {
    display: block;
    position: relative;
    inset: auto;
    width: min(880px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 2rem;
    border-radius: 22px;
    background: #FAF5F0;
    color: #4A3B2A;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.project-modal-overlay .project-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #F5E6D3;
    color: #4A3B2A;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.project-modal-overlay .project-modal-kicker {
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #D9822B;
}

.project-modal-overlay .project-modal-header h2 {
    margin-bottom: 0.35rem;
}

.project-modal-overlay .project-modal-header p {
    max-width: 680px;
    line-height: 1.55;
}

.project-modal-overlay .project-modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0 1.5rem;
}

.project-modal-overlay .project-modal-tech span {
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: #F5E6D3;
    font-size: 0.82rem;
}

.project-modal-overlay .project-modal-section {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(74, 59, 42, 0.12);
}

.project-modal-overlay .project-modal-section h3 {
    margin-bottom: 0.6rem;
    color: #4A3B2A;
}

.project-modal-overlay .project-modal-section p {
    line-height: 1.6;
}

.project-modal-overlay .project-modal-section ul {
    padding-left: 1.25rem;
}

.project-modal-overlay .project-modal-section li {
    margin-bottom: 0.4rem;
    line-height: 1.45;
}

.project-modal-overlay .project-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

body.modal-open {
    overflow: hidden;
}

/* =========================================================
   PROJECTS PAGE — NEXT VERSION CLEANUP
========================================================= */

.projects-hero {
    max-width: 950px;
    margin: 2rem auto 3rem;
    padding: 2rem;
    text-align: center;
    border-radius: 22px;
    background: rgba(250, 245, 240, 0.88);
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.projects-hero h2 {
    margin-bottom: 0.5rem;
    color: #4A3B2A;
}

.projects-hero p {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.projects-section {
    max-width: 1150px;
    margin: 2.5rem auto;
    padding: 2.25rem;
    border-radius: 24px;
}

.section-header {
    max-width: 760px;
    margin: 0 auto 2rem;
    text-align: center;
}

.section-header h3 {
    margin-bottom: 0.5rem;
    color: inherit;
}

.section-header p {
    margin: 0 auto;
    line-height: 1.55;
    opacity: 0.9;
}

.projects-infra .section-header h3,
.projects-infra .section-header p {
    color: #4A3B2A;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 1rem;
    border-radius: 20px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.14);
    color: #4A3B2A;
    box-shadow: 0 10px 24px rgba(74, 59, 42, 0.06);
    overflow: hidden;
}

.project-card h4 {
    color: #4A3B2A;
}

.project-card p,
.project-summary {
    color: #4A3B2A;
    line-height: 1.5;
}

.project-card-body {
    flex: 1;
}

.project-preview {
    width: 100%;
    height: 150px;
    min-height: 150px;
    max-height: 150px;
    margin: 0 0 1rem;
    border-radius: 16px;
    overflow: hidden;
    background: #F5E6D3;
    border: 1px solid rgba(74, 59, 42, 0.12);
    flex-shrink: 0;
}

.project-preview-placeholder {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    color: #4A3B2A;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0 0.75rem;
    padding: 0;
    list-style: none;
    border-top: none;
}

.project-tech li {
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: #F5E6D3;
    color: #4A3B2A;
    font-size: 0.76rem;
    font-weight: 600;
}

.project-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.75rem 0 1rem;
}

.project-highlights span {
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(74, 59, 42, 0.08);
    color: #4A3B2A;
    border: 1px solid rgba(74, 59, 42, 0.16);
    font-size: 0.76rem;
    font-weight: 600;
}

.projects-featured .project-highlights span,
.projects-creative .project-highlights span {
    background: #F5E6D3;
    color: #4A3B2A;
    border-color: rgba(74, 59, 42, 0.16);
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.75rem;
}

.project-actions .btn {
    text-align: center;
}

/* Slightly tighten sections with only one card */
.projects-creative .projects-grid,
.projects-infra .projects-grid {
    max-width: 520px;
    margin: 0 auto;
}

/* =========================================================
   PROJECT DETAIL PAGES
========================================================= */

.project-detail-page {
    max-width: 1050px;
    margin: 2rem auto;
    padding: 2rem;
}

.project-detail-hero {
    margin-bottom: 1.5rem;
    padding: 2rem;
    border-radius: 22px;
    background: rgba(250, 245, 240, 0.88);
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.project-detail-kicker {
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D9822B;
    font-weight: 700;
    font-size: 0.85rem;
}

.project-detail-hero h1 {
    margin: 0.25rem 0 0.75rem;
    color: #4A3B2A;
}

.project-detail-hero p {
    max-width: 780px;
    line-height: 1.65;
}

.project-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.project-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.project-detail-card {
    padding: 1.25rem;
    border-radius: 18px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.14);
    color: #4A3B2A;
}

.project-detail-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #4A3B2A;
}

.project-detail-card p,
.project-detail-card li {
    line-height: 1.55;
}

.project-detail-card ul {
    padding-left: 1.25rem;
}

@media (max-width: 700px) {
    .projects-section,
    .project-detail-page {
        padding: 1rem;
    }

    .project-actions {
        flex-direction: column;
    }

    .project-actions .btn,
    .project-detail-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   PORTFOLIO V2 POLISH
========================================================= */

.eyebrow {
    margin: 0 0 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #D9822B;
    font-size: 0.8rem;
    font-weight: 800;
}

.section-heading-centered {
    max-width: 780px;
    margin: 0 auto 2rem;
    text-align: center;
}

.section-heading-centered h2 {
    margin: 0 0 0.65rem;
    color: #4A3B2A;
}

.section-heading-centered p {
    margin: 0 auto;
    line-height: 1.65;
    color: #4A3B2A;
}

/* ------------------------------
   Home V2
-------------------------------- */

.home-v2-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    gap: 1.5rem;
    align-items: stretch;
    max-width: 1150px;
    margin: 2rem auto 3rem;
}

.home-v2-copy,
.home-v2-card,
.home-v2-section,
.home-v2-cta {
    border-radius: 26px;
    background: rgba(250, 245, 240, 0.9);
    border: 1px solid rgba(74, 59, 42, 0.12);
    box-shadow: 0 14px 36px rgba(74, 59, 42, 0.08);
}

.home-v2-copy {
    padding: 3rem;
}

.home-v2-copy h1 {
    max-width: 820px;
    margin: 0 0 1rem;
    color: #4A3B2A;
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.home-v2-lead {
    max-width: 760px;
    color: #4A3B2A;
    font-size: 1.12rem;
    line-height: 1.7;
}

.home-v2-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.home-v2-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(135deg, rgba(217, 130, 43, 0.14), rgba(142, 124, 165, 0.16)),
        #FAF5F0;
}

.home-card-label,
.home-feature-type {
    margin: 0 0 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D9822B;
    font-size: 0.78rem;
    font-weight: 800;
}

.home-v2-card h2 {
    margin: 0 0 0.75rem;
    color: #4A3B2A;
}

.home-v2-card p {
    line-height: 1.6;
    color: #4A3B2A;
}

.home-v2-section {
    max-width: 1150px;
    margin: 2.5rem auto;
    padding: 2.5rem;
}

.home-feature-grid,
.skill-pillar-grid,
.about-v2-grid,
.contact-v2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.home-feature-card,
.skill-pillar,
.about-v2-card,
.contact-v2-card {
    padding: 1.25rem;
    border-radius: 20px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.13);
    color: #4A3B2A;
}

.home-feature-card h3,
.skill-pillar h3,
.about-v2-card h2,
.contact-v2-card h2 {
    margin-top: 0;
    color: #4A3B2A;
}

.home-feature-card p,
.skill-pillar p,
.about-v2-card p,
.contact-v2-card p {
    line-height: 1.6;
}

.home-feature-card a,
.contact-v2-card a {
    color: #D9822B;
    font-weight: 800;
    text-decoration: none;
}

.home-feature-card a:hover,
.contact-v2-card a:hover {
    color: #FF6F3C;
}

.home-v2-cta {
    max-width: 900px;
    margin: 3rem auto 2rem;
    padding: 2.5rem;
    text-align: center;
}

.home-v2-cta h2 {
    margin: 0 0 0.75rem;
    color: #4A3B2A;
}

.home-v2-cta p {
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.65;
}

.home-v2-cta .home-v2-actions {
    justify-content: center;
}

/* ------------------------------
   About V2
-------------------------------- */

.about-v2-hero,
.about-v2-story,
.contact-v2-hero {
    max-width: 1050px;
    margin: 2rem auto;
    padding: 2.5rem;
    border-radius: 26px;
    background: rgba(250, 245, 240, 0.9);
    border: 1px solid rgba(74, 59, 42, 0.12);
    color: #4A3B2A;
}

.about-v2-hero h1,
.contact-v2-hero h1 {
    max-width: 900px;
    margin: 0 0 1rem;
    color: #4A3B2A;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.about-v2-lead,
.contact-v2-hero p {
    max-width: 780px;
    line-height: 1.7;
    font-size: 1.08rem;
}

.about-v2-grid,
.contact-v2-grid {
    max-width: 1050px;
    margin: 1.5rem auto;
}

.about-v2-card ul {
    padding-left: 1.25rem;
}

.about-v2-card li {
    margin-bottom: 0.45rem;
    line-height: 1.5;
}

.about-v2-story h2 {
    margin-top: 0;
    color: #4A3B2A;
}

.about-v2-story p {
    max-width: 820px;
    line-height: 1.7;
}

.about-v2-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ------------------------------
   Contact V2
-------------------------------- */

.contact-v2-page {
    max-width: 1050px;
    margin: 0 auto;
}

.contact-v2-card a {
    overflow-wrap: anywhere;
}

/* ------------------------------
   Case Study Pages
-------------------------------- */

.case-study-page {
    max-width: 1150px;
    margin: 2rem auto;
    padding: 0 1rem 2rem;
}

.case-study-hero {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 2.5rem;
    border-radius: 26px;
    background: rgba(250, 245, 240, 0.92);
    border: 1px solid rgba(74, 59, 42, 0.12);
    box-shadow: 0 14px 36px rgba(74, 59, 42, 0.08);
}

.case-study-hero h1 {
    margin: 0 0 0.85rem;
    color: #4A3B2A;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.case-study-hero p {
    max-width: 820px;
    line-height: 1.7;
    color: #4A3B2A;
}

.case-study-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.case-study-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    align-items: start;
}

.case-study-main,
.case-study-side-card {
    border-radius: 22px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.13);
    color: #4A3B2A;
}

.case-study-main {
    padding: 2rem;
}

.case-study-main h2 {
    margin-top: 0;
    color: #4A3B2A;
}

.case-study-main h2:not(:first-child) {
    margin-top: 2rem;
}

.case-study-main p {
    line-height: 1.72;
}

.case-study-sidebar {
    display: grid;
    gap: 1rem;
}

.case-study-side-card {
    padding: 1.25rem;
}

.case-study-side-card h3 {
    margin-top: 0;
    color: #4A3B2A;
}

.case-study-side-card ul {
    padding-left: 1.1rem;
}

.case-study-side-card li {
    margin-bottom: 0.45rem;
    line-height: 1.45;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0 !important;
    list-style: none;
}

.tag-list li {
    margin: 0;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: #F5E6D3;
    color: #4A3B2A;
    border: 1px solid rgba(74, 59, 42, 0.12);
    font-size: 0.78rem;
    font-weight: 700;
}

/* ------------------------------
   Weather Showcase
-------------------------------- */

.weather-app-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    align-items: start;
}

.weather-project-notes {
    padding: 1.25rem;
    border-radius: 22px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.13);
    color: #4A3B2A;
}

.weather-project-notes h2 {
    margin-top: 0;
    color: #4A3B2A;
}

.weather-project-notes p {
    line-height: 1.6;
}

/* ------------------------------
   Responsive V2
-------------------------------- */

@media (max-width: 900px) {
    .home-v2-hero,
    .case-study-layout,
    .weather-app-showcase {
        grid-template-columns: 1fr;
    }

    .case-study-sidebar {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 700px) {
    .home-v2-copy,
    .home-v2-card,
    .home-v2-section,
    .home-v2-cta,
    .about-v2-hero,
    .about-v2-story,
    .contact-v2-hero,
    .case-study-hero,
    .case-study-main {
        padding: 1.25rem;
    }

    .home-v2-actions,
    .about-v2-actions,
    .case-study-actions {
        flex-direction: column;
    }

    .home-v2-actions .btn,
    .about-v2-actions .btn,
    .case-study-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* =========================================================
   RESUME V2 POLISH
========================================================= */

.resume-v2-page {
    max-width: 1150px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.resume-v2-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
    gap: 1.25rem;
    align-items: stretch;
    margin: 2rem auto;
}

.resume-v2-hero-copy,
.resume-v2-snapshot,
.resume-v2-card {
    border-radius: 26px;
    background: rgba(250, 245, 240, 0.92);
    border: 1px solid rgba(74, 59, 42, 0.12);
    box-shadow: 0 14px 36px rgba(74, 59, 42, 0.08);
    color: #4A3B2A;
}

.resume-v2-hero-copy {
    padding: 3rem;
}

.resume-v2-hero-copy h1 {
    max-width: 850px;
    margin: 0 0 1rem;
    color: #4A3B2A;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.resume-v2-hero-copy p {
    max-width: 760px;
    line-height: 1.7;
    font-size: 1.06rem;
}

.resume-v2-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.resume-v2-snapshot {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(217, 130, 43, 0.13), rgba(142, 124, 165, 0.15)),
        #FAF5F0;
}

.resume-v2-snapshot h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #4A3B2A;
}

.resume-snapshot-list {
    display: grid;
    gap: 0.8rem;
}

.resume-snapshot-list div {
    padding: 0.85rem;
    border-radius: 16px;
    background: rgba(250, 245, 240, 0.75);
    border: 1px solid rgba(74, 59, 42, 0.1);
}

.resume-snapshot-list span {
    display: block;
    margin-bottom: 0.25rem;
    color: #6B5E52;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
}

.resume-snapshot-list strong {
    display: block;
    line-height: 1.35;
    color: #4A3B2A;
}

.resume-v2-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.resume-v2-card {
    padding: 1.5rem;
}

.resume-v2-card-wide {
    grid-column: 1 / -1;
}

.resume-card-header {
    margin-bottom: 1.25rem;
}

.resume-card-header h2 {
    margin: 0 0 0.5rem;
    color: #4A3B2A;
}

.resume-card-header p:not(.eyebrow) {
    max-width: 820px;
    line-height: 1.65;
}

.resume-entry {
    padding: 1rem;
    border-radius: 18px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.resume-entry + .resume-entry {
    margin-top: 0.8rem;
}

.resume-entry h3 {
    margin: 0 0 0.35rem;
    color: #4A3B2A;
}

.resume-entry p {
    margin: 0;
    line-height: 1.55;
}

.resume-skill-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.resume-skill-group {
    padding: 1rem;
    border-radius: 18px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.resume-skill-group h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #4A3B2A;
}

.resume-project-list {
    display: grid;
    gap: 1rem;
}

.resume-project-v2 {
    padding: 1.15rem;
    border-radius: 20px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.13);
}

.resume-project-topline {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.resume-project-topline h3 {
    margin: 0;
    color: #4A3B2A;
}

.resume-project-topline a {
    color: #D9822B;
    font-weight: 800;
    text-decoration: none;
}

.resume-project-topline a:hover {
    color: #FF6F3C;
}

.resume-tech {
    margin: 0 0 0.75rem;
    color: #6B5E52;
    font-size: 0.92rem;
    font-style: normal;
    font-weight: 700;
}

.resume-project-v2 ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.resume-project-v2 li {
    margin-bottom: 0.5rem;
    line-height: 1.55;
}

.resume-clean-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.resume-clean-list li {
    padding: 1rem;
    border-radius: 18px;
    background: #FAF5F0;
    border: 1px solid rgba(74, 59, 42, 0.12);
}

.resume-clean-list strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #4A3B2A;
}

.resume-clean-list span {
    display: block;
    line-height: 1.5;
    color: #6B5E52;
}

.resume-course-group + .resume-course-group {
    margin-top: 1.25rem;
}

.resume-course-group h3 {
    margin-bottom: 0.55rem;
    color: #4A3B2A;
}

.resume-course-group ul {
    margin: 0;
    padding-left: 1.2rem;
}

.resume-course-group li {
    margin-bottom: 0.45rem;
    line-height: 1.5;
}

/* Keep the older resume styles from overpowering the new layout */
.resume-v2-page .resume-section {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

@media (max-width: 900px) {
    .resume-v2-hero,
    .resume-v2-grid,
    .resume-skill-grid {
        grid-template-columns: 1fr;
    }

    .resume-v2-hero-copy {
        padding: 2rem;
    }
}

@media (max-width: 700px) {
    .resume-v2-hero-copy,
    .resume-v2-snapshot,
    .resume-v2-card {
        padding: 1.25rem;
    }

    .resume-v2-actions {
        flex-direction: column;
    }

    .resume-v2-actions .btn {
        width: 100%;
        text-align: center;
    }

    .resume-project-topline {
        display: block;
    }

    .resume-project-topline a {
        display: inline-block;
        margin-top: 0.35rem;
    }
}

/* ================================
   Music Database Modal Height Patch
   ================================ */

/* Keep the expanded Music DB inside the white modal box */
body.music-db-modal-open #modal-content,
#modal-content.music-db-modal-content {
    max-height: calc(100vh);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Give the bottom of the scrolled content a little breathing room */
body.music-db-modal-open #music-db-ui,
#modal-content.music-db-modal-content #music-db-ui {
    padding-bottom: 1.5rem;
}

/* Make sure pagination does not sit outside the modal */
body.music-db-modal-open .music-db-pagination,
#modal-content.music-db-modal-content .music-db-pagination {
    margin-bottom: 1rem;
}

/* ================================
   Music Database Detail Pages
   ================================ */

.music-detail-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.music-detail-back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.25rem;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.8;
}

.music-detail-back:hover {
    opacity: 1;
}

.music-detail-hero {
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: rgba(250, 245, 240, 0.82);
    border: 1px solid rgba(74, 59, 42, 0.18);
    box-shadow: 0 18px 45px rgba(74, 59, 42, 0.08);
}

.music-detail-kicker,
.music-mini-label {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.68;
}

.music-detail-hero h1 {
    margin: 0;
    line-height: 1.05;
}

.music-detail-subtitle {
    margin: 0.65rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.85;
}

.music-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.music-detail-meta-row span {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(74, 59, 42, 0.25);
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
}

.music-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

.music-detail-main,
.music-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.music-detail-panel {
    border-radius: 20px;
    padding: 1.35rem;
    background: rgba(250, 245, 240, 0.74);
    border: 1px solid rgba(74, 59, 42, 0.16);
}

.music-detail-panel h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.music-detail-panel h3 {
    margin-top: 0;
}

.music-detail-panel p {
    line-height: 1.6;
}

.music-detail-section-note {
    margin-top: -0.25rem;
    opacity: 0.78;
}

.music-muted {
    opacity: 0.72;
}

.music-artist-context h3 {
    margin-bottom: 0.25rem;
}

.music-fact-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
}

.music-fact-list div {
    border-bottom: 1px solid rgba(74, 59, 42, 0.13);
    padding-bottom: 0.75rem;
}

.music-fact-list div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.music-fact-list dt {
    font-size: 0.74rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 0.2rem;
}

.music-fact-list dd {
    margin: 0;
    font-weight: 600;
}

.music-fact-list a {
    text-decoration: none;
}

.music-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.music-tag-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    text-decoration: none;
    border: 1px solid rgba(74, 59, 42, 0.22);
    font-size: 0.86rem;
    transition: transform 0.18s ease, background 0.18s ease;
}

.music-tag-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.5);
}

.music-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
}

.music-mini-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 155px;
    border-radius: 18px;
    padding: 1rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(74, 59, 42, 0.15);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.music-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(74, 59, 42, 0.1);
}

.music-mini-card h3 {
    margin: 0;
    line-height: 1.15;
}

.music-mini-card p {
    margin: 0;
}

.music-mini-scene {
    font-style: italic;
    opacity: 0.8;
}

.music-mini-description {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    opacity: 0.78;
}

@media (max-width: 850px) {
    .music-detail-layout {
        grid-template-columns: 1fr;
    }

    .music-detail-sidebar {
        order: -1;
    }

    .music-detail-hero {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    .music-detail-page {
        padding: 1rem 0.75rem 2rem;
    }

    .music-detail-hero,
    .music-detail-panel {
        border-radius: 16px;
        padding: 1rem;
    }

    .music-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Music Database Detail Improvements
   Related Albums + Genre Pages
   ================================ */

.music-section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.music-section-heading-row h2 {
    margin-bottom: 0.35rem;
}

.music-small-action-btn {
    border: 1px solid rgba(74, 59, 42, 0.22);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.48);
    color: inherit;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.music-small-action-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.68);
}

.music-filter-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(135px, 1fr)) auto;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border-radius: 16px;
    border: 1px solid rgba(74, 59, 42, 0.14);
    background: rgba(255, 255, 255, 0.32);
}

.music-filter-panel.hidden {
    display: none;
}

.music-detail-search,
.music-detail-filter {
    min-height: 2.3rem;
    width: 100%;
    min-width: 0;
}

.related-paged-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.genre-page-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(120px, 1fr)) auto;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 1rem;
}

.genre-page-album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.music-db-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.music-db-pagination button {
    border: 1px solid rgba(74, 59, 42, 0.22);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.48);
    color: inherit;
    cursor: pointer;
}

.music-db-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 950px) {
    .music-filter-panel,
    .genre-page-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .genre-page-album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-paged-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .music-section-heading-row {
        flex-direction: column;
    }

    .music-filter-panel,
    .genre-page-toolbar {
        grid-template-columns: 1fr;
    }

    .genre-page-album-grid,
    .related-paged-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Related Albums Filter Panel Fix
   ================================ */

.related-albums-panel {
    overflow: hidden;
}

.related-albums-panel .music-filter-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;

    margin-left: 0;
    margin-right: 0;
}

.related-albums-panel .music-filter-panel .music-detail-search {
    grid-column: 1 / -1;
}

.related-albums-panel .music-filter-panel .music-detail-search,
.related-albums-panel .music-filter-panel .music-detail-filter,
.related-albums-panel .music-filter-panel .music-small-action-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.related-albums-panel #related-reset {
    justify-self: start;
    width: auto;
}

@media (max-width: 650px) {
    .related-albums-panel .music-filter-panel {
        grid-template-columns: 1fr;
    }

    .related-albums-panel .music-filter-panel .music-detail-search {
        grid-column: auto;
    }

    .related-albums-panel #related-reset {
        width: 100%;
    }
}

/* ================================
   Album Detail Artist Links
   ================================ */

.music-artist-inline-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 59, 42, 0.35);
    transition: opacity 0.18s ease, border-color 0.18s ease;
}

.music-artist-inline-link:hover {
    opacity: 0.78;
    border-color: rgba(74, 59, 42, 0.75);
}

/* Keep related album filters hidden until the Filters button is clicked */
.related-albums-panel .music-filter-panel.hidden {
    display: none;
}

/* ================================
   Music Database Interface Card
   + Project Architecture Section
   ================================ */

.music-interface-section {
    margin-top: 2rem;
}

/*
   Use the same blue/teal family as the main navigation.
   If your nav blue is slightly different, change only this variable.
*/
:root {
    --music-db-blue: #4AC3B0;
    --music-db-blue-dark: #2E8F83;
    --music-db-card-bg: rgba(250, 245, 240, 0.82);
    --music-db-border: rgba(74, 59, 42, 0.16);
    --music-db-shadow: 0 18px 45px rgba(74, 59, 42, 0.12);
}

.music-interface-card {
    border-radius: 24px;
    padding: 1.5rem;
    background: var(--music-db-card-bg);
    border: 1px solid var(--music-db-border);
    box-shadow: var(--music-db-shadow);
    border-top: 6px solid var(--music-db-blue);
}

.music-interface-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.music-interface-header h3 {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.music-interface-note {
    max-width: 460px;
    margin: 0;
    line-height: 1.55;
    opacity: 0.82;
}

/* Give the actual database UI a little breathing room inside the card */
.music-interface-card .music-db-ui {
    border-radius: 18px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(74, 59, 42, 0.12);
}

/* Make the tabs feel connected to the same blue accent */
.music-interface-card .music-db-tab.active,
.music-interface-card .music-db-expand {
    border-color: var(--music-db-blue);
}

.music-interface-card .music-db-tab.active {
    box-shadow: 0 0 0 2px rgba(74, 195, 176, 0.14);
}

.music-interface-card .music-db-expand {
    background: var(--music-db-blue);
    color: #ffffff;
}

.music-interface-card .music-db-expand:hover {
    background: var(--music-db-blue-dark);
}

/* ================================
   Project Architecture Explanation
   ================================ */

.music-architecture-section {
    margin-top: 2rem;
    border-radius: 24px;
    padding: 1.75rem;
    background: rgba(250, 245, 240, 0.82);
    border: 1px solid rgba(74, 59, 42, 0.16);
    box-shadow: 0 18px 45px rgba(74, 59, 42, 0.1);
    border-left: 6px solid var(--music-db-blue);
}

.music-architecture-section h3 {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.music-architecture-section > p {
    max-width: 850px;
    line-height: 1.65;
    opacity: 0.86;
}

.music-architecture-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.35rem;
}

.music-architecture-card {
    position: relative;
    border-radius: 18px;
    padding: 1.15rem;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(74, 59, 42, 0.13);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.music-architecture-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(74, 59, 42, 0.1);
}

.architecture-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    margin-bottom: 0.75rem;
    border-radius: 999px;
    background: var(--music-db-blue);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
}

.music-architecture-card h4 {
    margin: 0 0 0.45rem;
}

.music-architecture-card p {
    margin: 0;
    line-height: 1.55;
    opacity: 0.82;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .music-interface-header {
        flex-direction: column;
    }

    .music-interface-note {
        max-width: none;
    }

    .music-architecture-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .music-interface-card,
    .music-architecture-section {
        border-radius: 18px;
        padding: 1rem;
    }

    .music-interface-card .music-db-ui {
        padding: 0.75rem;
    }

    .music-architecture-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Related Album Reason Badges
   ================================ */

.related-reason-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.related-reason-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
    line-height: 1;
    border: 1px solid rgba(74, 59, 42, 0.18);
    background: rgba(255, 255, 255, 0.45);
    opacity: 0.82;
}

/* ================================
   Music Database Listening Paths
   ================================ */

.music-listening-paths-section {
    margin-top: 2rem;
    border-radius: 24px;
    padding: 1.75rem;
    background: rgba(250, 245, 240, 0.82);
    border: 1px solid rgba(74, 59, 42, 0.16);
    box-shadow: 0 18px 45px rgba(74, 59, 42, 0.1);
}

.music-listening-paths-section h3 {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.music-listening-paths-section > p {
    max-width: 850px;
    line-height: 1.65;
    opacity: 0.86;
}

.music-listening-paths-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.35rem;
}

.music-listening-path-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 210px;
    border-radius: 18px;
    padding: 1.15rem;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(74, 59, 42, 0.13);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.music-listening-path-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(74, 59, 42, 0.1);
}

.listening-path-label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.65;
}

.music-listening-path-card h4 {
    margin: 0;
}

.music-listening-path-card p {
    margin: 0;
    line-height: 1.55;
    opacity: 0.82;
}

.listening-path-action {
    margin-top: auto;
    font-weight: 700;
    font-size: 0.88rem;
}

@media (max-width: 950px) {
    .music-listening-paths-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .music-listening-paths-section {
        border-radius: 18px;
        padding: 1rem;
    }

    .music-listening-paths-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Genre Discovery Cards
   ================================ */

.genre-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.genre-card-count {
    font-weight: 600;
    margin: 0;
}

.genre-card-meta {
    margin: 0;
    font-size: 0.86rem;
    opacity: 0.76;
}

.genre-card-examples {
    margin-top: 0.25rem;
}

.genre-card-examples p {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.62;
}

.genre-card-examples ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.genre-card-examples li {
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 0.78;
    margin-bottom: 0.25rem;
}

.genre-card-action {
    margin-top: auto;
    font-weight: 700;
    font-size: 0.86rem;
    opacity: 0.82;
}

#music-db-interface {
    scroll-margin-top: 6rem;
}