/*
Theme Name: Mela Bosch Academic Theme
Theme URI: https://melabosch.com
Author: Antigravity
Author URI: https://melabosch.com
Description: Un tema premium, minimalista y académico de alta gama diseñado a medida para Mela Bosch, con tipografía refinada, microanimaciones táctiles y maquetación responsiva.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mela-bosch-theme
*/

/* ==========================================================================
   DESIGN SYSTEM FOR MELABOSCH.COM (PREMIUM & ACADEMIC)
   ========================================================================== */

/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* Variables & Themes (Single Premium Light Mode) */
:root {
    --bg-color: #FAF9F6; /* Natural Linen / Warm Off-White */
    --card-bg: #FFFFFF;
    --text-primary: #1C2024; /* Soft Obsidian */
    --text-secondary: #434B54;
    --text-muted: #78828E;
    
    --accent: #7A2030; /* Deep Burgundy / Bordeaux */
    --accent-hover: #5A1320;
    --accent-subtle: rgba(122, 32, 48, 0.04);
    
    --gold: #A58B6F; /* Elegant Antique Gold */
    --gold-subtle: rgba(165, 139, 111, 0.1);
    
    --border-color: #E6E2D8;
    
    /* Premium Shadow Tokens */
    --shadow-subtle: 0 4px 15px rgba(122, 32, 48, 0.03);
    --shadow-medium: 0 10px 30px rgba(122, 32, 48, 0.05);
    --shadow-premium: 0 20px 40px rgba(28, 32, 36, 0.05);
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lora', serif;
    --font-ui: 'Inter', sans-serif;
    
    /* Grid/Layout */
    --max-width: 1000px;
    --header-height: 90px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.8;
    transition: background-color 0.4s ease, color 0.4s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    flex: 1;
    padding: 4.5rem 0;
}

/* Typography elements */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.4rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: var(--accent);
}

h2 {
    font-size: 1.85rem;
    margin-top: 3rem;
    position: relative;
    padding-left: 1.25rem;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 3px;
    background-color: var(--gold);
}

h3 {
    font-size: 1.35rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--accent);
}

p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

/* Header */
header {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.4s ease;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.header-inner {
    min-height: var(--header-height);
    height: auto;
    padding: 0.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Prevents overflow overlap, wraps columns instead */
    gap: 1rem;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand:hover {
    border-bottom-color: transparent;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.brand:hover .brand-title {
    color: var(--accent-hover);
}

.brand-subtitle {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap; /* Allows menu items to wrap gracefully if needed */
    justify-content: flex-end;
    gap: 0.5rem 1.25rem; /* Uses gap for flexible item spacing */
}

.nav-item {
    margin-left: 0; /* Handled by gap on parent */
    position: relative; /* Essential for absolute dropdown anchoring */
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.8rem; /* Slightly smaller to fit longer titles */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    padding-bottom: 0.25rem;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap; /* Prevents individual menu links from splitting vertically */
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-shadow: 0.5px 0 0 var(--accent);
}

/* Parent item dropdown indicator */
.menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.7rem;
    vertical-align: middle;
    margin-left: 0.25rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.menu-item-has-children:hover > a::after {
    transform: translateY(1px);
}

/* Dropdown Sub-menu on Desktop */
.nav-menu ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
    list-style: none;
    min-width: 280px;
    padding: 0.75rem 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 4px;
    z-index: 1000;
}

/* Align submenus of the last two menu items to the right, preventing offscreen clipping */
.nav-menu > li:nth-last-child(-n+2) ul.sub-menu {
    left: auto;
    right: 0;
}

/* Show Sub-menu on Hover */
.nav-item:hover > ul.sub-menu,
.nav-item:focus-within > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu ul.sub-menu li {
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.nav-menu ul.sub-menu a {
    display: block;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: none; /* Keep text natural to fit long academic titles */
    letter-spacing: 0.01em;
    border-bottom: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: left;
    white-space: normal; /* Allow text wrapping */
    line-height: 1.45;
}

.nav-menu ul.sub-menu a:hover {
    background-color: var(--accent-subtle);
    color: var(--accent);
    padding-left: 1.5rem; /* Soft indentation shift on hover */
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Editorial Hero Section */
.editorial-hero {
    margin-bottom: 5rem;
    text-align: center;
}

.hero-headline {
    margin-bottom: 3rem;
}

.hero-tagline {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    display: block;
    margin-bottom: 0.75rem;
}

.hero-headline h1 {
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.hero-headline h1::after {
    display: none; /* Hide standard h1 underlines in hero */
}

.hero-lead-in {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.hero-statement-card {
    background-color: #FAF5EF; /* Extra warm ivory */
    border-left: 4px solid var(--accent);
    border-right: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2.5rem 3rem;
    margin: 3.5rem 0;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.hero-statement-card::before {
    content: '“';
    position: absolute;
    top: -5px;
    left: 20px;
    font-family: var(--font-heading);
    font-size: 5rem;
    color: rgba(122, 32, 48, 0.05);
    line-height: 1;
}

.statement-text {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--accent);
    line-height: 1.8;
    margin-bottom: 0;
    text-align: center;
}

.hero-grid-intro {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
    text-align: left;
    margin-top: 3.5rem;
}

.intro-text-block p {
    font-size: 1.05rem;
    line-height: 1.85;
}

.intro-features-block {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2rem;
    box-shadow: var(--shadow-subtle);
}

.intro-features-block h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.editorial-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.editorial-features-list li {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.editorial-features-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--gold);
    border-radius: 50%;
    margin-right: 0.75rem;
}

.editorial-features-list li:last-child {
    margin-bottom: 0;
}

/* Premium Image Styling with frame & hover zoom */
.hero-img-container {
    position: relative;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-premium);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Internal artistic gold frame */
.hero-img-container::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    border: 1px solid var(--gold);
    opacity: 0.25;
    pointer-events: none;
    transition: opacity 0.4s ease, border-color 0.4s ease;
    z-index: 2;
}

.hero-img-container:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(122, 32, 48, 0.08);
    border-color: var(--gold);
}

.hero-img-container:hover::before {
    opacity: 0.8;
    border-color: var(--accent);
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(40%) sepia(5%);
    transition: filter 0.4s ease, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 2px;
}

.hero-img-container:hover .hero-img {
    filter: grayscale(0%) sepia(0%);
    transform: scale(1.03);
}

/* Academic Quote Blocks */
.academic-quote {
    background-color: var(--card-bg);
    border-left: 4px solid var(--accent);
    padding: 1.75rem 2.5rem;
    margin: 3rem 0;
    font-style: italic;
    box-shadow: var(--shadow-medium);
    border-radius: 0 6px 6px 0;
    position: relative;
    overflow: hidden;
}

.academic-quote::before {
    content: '“';
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: var(--font-heading);
    font-size: 5rem;
    color: rgba(122, 32, 48, 0.04);
    line-height: 1;
}

.academic-quote p {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.academic-quote-cite {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-style: normal;
}

/* Books / Creative Works Layout */
.books-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    margin: 3.5rem 0;
}

.book-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    box-shadow: var(--shadow-premium);
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

.book-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--accent);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 45px rgba(122, 32, 48, 0.08);
    border-color: var(--gold);
}

.book-card:hover::after {
    width: 6px;
    background-color: var(--gold);
}

/* Book Cover 3D effects */
.book-cover-container {
    border: 1px solid var(--border-color);
    padding: 0.6rem;
    background-color: #FAF8F5;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    height: fit-content;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}

.book-cover {
    max-width: 100%;
    height: auto;
    border-radius: 1px 3px 3px 1px;
    box-shadow: 5px 8px 18px rgba(0,0,0,0.15), 1px 0 3px rgba(0,0,0,0.04);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.book-card:hover .book-cover {
    transform: translateY(-6px) rotate(1deg);
    box-shadow: 8px 15px 25px rgba(0,0,0,0.22);
}

.book-info h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.book-meta {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.book-meta span {
    margin-right: 1.5rem;
}

.book-description {
    font-size: 0.96rem;
    margin-bottom: 2rem;
    text-align: justify;
}

.btn-academic {
    display: inline-block;
    background-color: var(--accent);
    color: #FFFFFF !important;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.85rem 2rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(122, 32, 48, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-academic:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(122, 32, 48, 0.25);
    border-bottom-color: var(--accent-hover);
}

/* Publication items (Bibliographic entries) */
.pub-section-header {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--accent);
    margin: 3rem 0 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.pub-list {
    list-style: none;
}

.pub-item {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 1.5rem;
    transition: transform 0.2s ease;
}

.pub-item:hover {
    transform: translateX(4px);
}

.pub-year {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 600;
    line-height: 1.2;
}

.pub-details {
    font-size: 0.95rem;
}

.pub-authors {
    font-weight: 500;
    color: var(--text-primary);
}

.pub-title {
    font-weight: 600;
    color: var(--text-primary);
}

.pub-venue {
    font-style: italic;
    color: var(--text-secondary);
}

.pub-links {
    margin-top: 0.75rem;
    display: flex;
    gap: 1.25rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
}

.pub-link-btn {
    color: var(--accent);
    font-weight: 600;
    border-bottom: 1px dotted var(--accent);
    transition: all 0.2s ease;
}

.pub-link-btn:hover {
    color: var(--gold);
    border-bottom-style: solid;
    border-bottom-color: var(--gold);
}

/* Dynamic Filter Component */
.filter-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-medium);
}

.filter-label {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background-color: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(122, 32, 48, 0.15);
}

/* Grid of periodism/media cards */
.media-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2.5rem 0;
}

.media-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2.25rem;
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.media-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background-color: var(--gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(122, 32, 48, 0.08);
    border-color: var(--accent);
}

.media-card:hover::after {
    transform: scaleX(1);
}

.media-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.media-card-meta {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.media-card-excerpt {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    flex: 1;
    color: var(--text-secondary);
}

/* Authority Profiles Cards (Trayectoria) */
.authority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.authority-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-subtle);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.authority-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 12px 24px rgba(165, 139, 111, 0.12);
}

.authority-logo {
    height: 40px;
    margin-bottom: 1.25rem;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: all 0.3s ease;
}

.authority-card:hover .authority-logo {
    filter: grayscale(0%);
    opacity: 1;
}

.authority-title {
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.authority-id {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Biography Grid */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4.5rem;
    margin-bottom: 5rem;
}

.bio-meta-list {
    list-style: none;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.75rem 0;
    margin: 2.25rem 0;
}

.bio-meta-item {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.bio-meta-item:last-child {
    margin-bottom: 0;
}

.bio-meta-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.bio-meta-value {
    color: var(--text-primary);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.4;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-credits {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .hero-grid-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2.5rem;
    }
    
    .hero-statement-card {
        padding: 1.75rem 2rem;
        margin: 2.5rem 0;
    }
    
    .statement-text {
        font-size: 1.15rem;
    }
    
    .hero-headline h1 {
        font-size: 2.2rem;
    }
    
    .hero-img-container {
        max-width: 380px;
        margin: 0 auto;
    }
    
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .book-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem;
    }
    
    .book-cover-container {
        max-width: 200px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }
    
    .header-inner {
        position: relative;
    }
    
    .mobile-nav-toggle {
        display: block;
        z-index: 101;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background-color: var(--card-bg);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 7rem 2rem 2rem 2rem;
        transition: right 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
        z-index: 99;
        overflow-y: auto; /* Allow vertical scrolling for long menus */
    }
    
    .nav-menu.open {
        right: 0;
    }
    
    .nav-item {
        margin-left: 0;
        margin-bottom: 1.5rem;
        width: 100%;
    }

    /* Inline Submenu display for Mobile */
    .nav-menu ul.sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1.25rem;
        margin-top: 0.5rem;
        min-width: 100%;
        background: none;
        display: block;
    }
    
    .nav-menu ul.sub-menu li {
        margin-bottom: 0.5rem;
        border-bottom: none;
    }
    
    .nav-menu ul.sub-menu a {
        padding: 0.4rem 0;
        font-size: 0.85rem;
        color: var(--text-secondary);
        display: block;
    }
    
    .nav-menu ul.sub-menu a:hover {
        background: none;
        padding-left: 0.25rem;
        color: var(--accent);
    }
    
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .pub-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}
