/* =============================================
   BIOCHEMOINFO JOURNAL — GLOBAL STYLESHEET
   Aesthetic: Editorial Refined — Academic Authority
   Palette: Deep Navy + Cold White + Teal Accent + Gold Highlight
   Typography: Cormorant Garamond (display) + Source Sans 3 (body)
   ============================================= */

/* --- IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* --- DESIGN TOKENS --- */
:root {
    --navy: #0b1d3a;
    --navy-light: #132d5e;
    --teal: #1a8a7d;
    --teal-light: #2cb5a5;
    --teal-muted: rgba(26, 138, 125, 0.08);
    --gold: #c59a3e;
    --gold-light: #e0b960;
    --bg-page: #f7f9fb;
    --bg-white: #ffffff;
    --bg-warm: #f2f4f7;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-light: #e2e8f0;
    --border-subtle: rgba(26, 138, 125, 0.12);
    --shadow-sm: 0 1px 3px rgba(11, 29, 58, 0.06);
    --shadow-md: 0 4px 16px rgba(11, 29, 58, 0.08);
    --shadow-lg: 0 8px 32px rgba(11, 29, 58, 0.1);
    --shadow-hover: 0 12px 40px rgba(11, 29, 58, 0.14);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    --max-width: 1200px;
}

/* --- RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--navy);
    line-height: 1.25;
    margin-top: 0;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--teal-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- NAVBAR --- */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.navbar-brand img {
    height: 44px;
    width: auto;
}

.navbar-brand .brand-accent {
    color: var(--teal);
}

/* Desktop nav */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links a.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-links a.nav-link:hover {
    color: var(--teal);
    background: var(--teal-muted);
}

.nav-link .caret {
    font-size: 0.6rem;
    transition: transform var(--transition);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    z-index: 1001;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown:hover .caret {
    transform: rotate(180deg);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.dropdown-menu a:hover {
    background: var(--teal-muted);
    color: var(--teal);
    padding-left: 1.5rem;
}

.dropdown-menu a i {
    width: 18px;
    color: var(--teal);
    font-size: 0.85rem;
    text-align: center;
}

/* Submit button */
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--teal);
    color: #fff !important;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.btn-submit:hover {
    background: var(--teal-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 138, 125, 0.3);
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: all var(--transition);
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(170deg, var(--navy) 0%, var(--navy-light) 55%, var(--teal) 100%);
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 138, 125, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(197, 154, 62, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-inner {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.8rem;
    backdrop-filter: blur(4px);
}

.hero-badge i {
    font-size: 0.7rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.2rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 300;
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat .value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1.2;
}

.hero-stat .label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* --- SECTION SHARED --- */
.section {
    padding: 4.5rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 0.6rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

.section-divider {
    width: 48px;
    height: 3px;
    background: var(--teal);
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* --- CONTENT CARDS (Articles / Featured) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.content-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.content-card:hover {
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.content-card:hover::before {
    transform: scaleX(1);
}

.card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--teal-muted);
    border-radius: var(--radius-sm);
}

.content-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.content-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--teal);
    transition: gap var(--transition);
}

.card-link:hover {
    gap: 0.7rem;
}

.card-link i {
    font-size: 0.75rem;
    transition: transform var(--transition);
}

/* --- RESOURCES GRID --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.resource-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    cursor: pointer;
}

.resource-item:hover {
    border-color: var(--teal);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.resource-item i {
    font-size: 1.6rem;
    color: var(--teal);
    margin-bottom: 0.75rem;
    display: block;
    transition: transform var(--transition);
}

.resource-item:hover i {
    transform: scale(1.12);
}

.resource-item h5 {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.resource-item a {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* --- CONTACT / CTA SECTION --- */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 4rem 1.5rem;
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.5rem;
}

.cta-section a {
    color: var(--gold-light);
}

.cta-section a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    transition: all var(--transition);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* --- FOOTER --- */
.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.55);
    padding: 4rem 1.5rem 1.5rem;
    font-size: 0.88rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-footer h5 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 0.6rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    transition: all var(--transition);
}

.site-footer a:hover {
    color: var(--teal-light);
    padding-left: 3px;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a:hover {
    color: var(--teal-light);
}

/* --- INNER PAGE SHARED --- */
.page-header {
    background: linear-gradient(170deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
}

.page-header h1 {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
}

.page-header .breadcrumb-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.page-header .breadcrumb-text a {
    color: rgba(255, 255, 255, 0.65);
}

.page-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-content p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
}

.page-content ul, .page-content ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content strong {
    color: var(--text-primary);
}

/* Section title for inner pages */
.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--teal);
    display: inline-block;
}

/* --- ARTICLE LIST (Continuous Publication) --- */
.article-list {
    max-width: var(--max-width);
    margin: 0 auto;
}

.article-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.article-item:hover {
    background: var(--teal-muted);
    margin: 0 -1rem;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
}

.article-meta {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
}

.article-meta .month {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal);
}

.article-meta .year {
    display: block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

.article-body h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.article-body h4 a {
    color: var(--text-primary);
}

.article-body h4 a:hover {
    color: var(--teal);
}

.article-authors {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.article-doi {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
}

.article-type-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--teal-muted);
    color: var(--teal);
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: var(--border-light);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* --- UTILITIES --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-teal { color: var(--teal); }
.text-gold { color: var(--gold); }
.bg-warm { background: var(--bg-warm); }

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.12s; }
.animate-in:nth-child(3) { animation-delay: 0.19s; }
.animate-in:nth-child(4) { animation-delay: 0.26s; }
.animate-in:nth-child(5) { animation-delay: 0.33s; }
.animate-in:nth-child(6) { animation-delay: 0.4s; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
        padding: 1rem 0;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links > li {
        width: 100%;
    }

    .nav-links a.nav-link {
        padding: 0.75rem 1.5rem;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--bg-warm);
        border-radius: 0;
        padding-left: 1rem;
    }

    .dropdown.open .dropdown-menu {
        display: block;
        opacity: 1;
        transform: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .section {
        padding: 3rem 1.5rem;
    }

    .article-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .article-meta {
        width: auto;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }
}

@media (max-width: 480px) {
    .resources-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        padding: 3.5rem 1rem 3rem;
    }

    .hero-badge {
        font-size: 0.7rem;
    }
}

/* --- PRINT --- */
@media print {
    .navbar, .nav-toggle, .cta-section, .social-links {
        display: none !important;
    }
    body {
        background: #fff;
        color: #000;
    }
    .hero {
        background: none;
        color: #000;
        padding: 2rem 0;
    }
    .hero h1, .hero .subtitle {
        color: #000;
    }
}
