/* ==========================================================================
   Marian Munteanu — academic / professional theme
   ========================================================================== */

:root {
    --navy:        #16233f;
    --navy-800:    #1c2c4c;
    --navy-700:    #26375c;
    --gold:        #b08d3e;
    --gold-light:  #cbb277;
    --ink:         #23262b;
    --muted:       #5c636e;
    --paper:       #ffffff;
    --paper-alt:   #f5f3ee;   /* warm off-white, archival feel */
    --line:        #e3e0d8;

    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans:  "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Base ---------------------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 400;
}
/* Offset anchors so section titles clear the sticky navbar */
:target { scroll-margin-top: 100px; }
section[id]  { scroll-margin-top: 100px; }

h1, h2, h3, h4, h5 { font-family: var(--serif); color: var(--navy); font-weight: 600; }
a { color: var(--navy-700); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); }

.text-gold { color: var(--gold) !important; }
.bg-paper-alt { background: var(--paper-alt); }
.skip-link {
    position: absolute; top: .5rem; left: .5rem; z-index: 2000;
    background: var(--navy); color: #fff; padding: .5rem .9rem; border-radius: .25rem;
}

/* ---- Header / navbar ----------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 1030;
    background: var(--navy);
    box-shadow: 0 2px 14px rgba(0,0,0,.18);
    border-bottom: 3px solid var(--gold);
}
.navbar-brand { line-height: 1.1; }
.brand-mark { flex: 0 0 auto; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.brand-text { display: inline-block; }
.brand-name {
    font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
    color: #fff; letter-spacing: .3px; display: block;
}
.brand-tagline {
    font-family: var(--sans); font-size: .72rem; letter-spacing: .18em;
    text-transform: uppercase; color: var(--gold-light); font-weight: 500;
}
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,.86);
    font-weight: 500; font-size: .96rem;
    padding: .5rem .85rem; position: relative;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus { color: #fff; }
.navbar-dark .navbar-nav .nav-link.active { color: var(--gold-light); }
.navbar-dark .navbar-nav .nav-link.active::after {
    content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .15rem;
    height: 2px; background: var(--gold);
}
.dropdown-menu {
    border: none; border-top: 3px solid var(--gold);
    border-radius: 0 0 .35rem .35rem; box-shadow: 0 10px 30px rgba(0,0,0,.15);
    padding: .4rem 0;
}
.dropdown-item { font-size: .95rem; padding: .45rem 1.25rem; color: var(--ink); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--paper-alt); color: var(--navy); }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
    position: relative;
    background:
        linear-gradient(rgba(16,26,47,.86), rgba(16,26,47,.92)),
        url('../../img/hero.jpg') center/cover no-repeat, var(--navy);
    color: #fff;
    padding: 5.5rem 0;
}
.hero--tall { padding: 7rem 0; }
.hero .eyebrow {
    text-transform: uppercase; letter-spacing: .22em; font-size: .78rem;
    color: var(--gold-light); font-weight: 600; margin-bottom: 1rem;
}
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; }
.hero .lead { color: rgba(255,255,255,.85); max-width: 42rem; }
.hero-portrait {
    width: 100%; max-width: 320px; aspect-ratio: 4/5; object-fit: cover;
    border: 6px solid rgba(255,255,255,.08); border-radius: .4rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

/* Page banner (interior pages) */
.page-banner {
    background: linear-gradient(rgba(16,26,47,.9), rgba(16,26,47,.95)),
                url('../../img/hero.jpg') center/cover no-repeat, var(--navy);
    color: #fff; padding: 3.75rem 0;
    border-bottom: 3px solid var(--gold);
}
.page-banner .eyebrow {
    text-transform: uppercase; letter-spacing: .2em; font-size: .75rem;
    color: var(--gold-light); font-weight: 600;
}
.page-banner h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.breadcrumb-wrap { background: var(--paper-alt); border-bottom: 1px solid var(--line); }
.breadcrumb { margin: 0; padding: .75rem 0; font-size: .9rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb-item.active { color: var(--navy); }

/* ---- Sections ------------------------------------------------------------ */
.section { padding: 4rem 0; }
.section-sm { padding: 2.75rem 0; }
.section-title { position: relative; margin-bottom: 1.75rem; }
.section-title .kicker {
    display: block; text-transform: uppercase; letter-spacing: .18em;
    font-family: var(--sans); font-weight: 600; font-size: .78rem;
    color: var(--gold); margin-bottom: .4rem;
}
.section-title h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0; }
.rule { width: 64px; height: 3px; background: var(--gold); border: 0; opacity: 1; margin: 1rem 0 1.75rem; }
.lead-serif { font-family: var(--serif); font-size: 1.3rem; color: var(--navy-700); font-style: italic; }

/* ---- Cards / content ----------------------------------------------------- */
.card-academic {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: .4rem; height: 100%; transition: transform .2s ease, box-shadow .2s ease;
}
.card-academic:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(22,35,63,.12); }
.card-academic .card-body { padding: 1.6rem; }
.card-icon {
    width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--paper-alt); color: var(--gold); border-radius: 50%;
    font-size: 1.4rem; margin-bottom: 1rem; border: 1px solid var(--line);
}
.card-academic h3 { font-size: 1.25rem; }

/* Anchored content blocks within a page */
.content-block { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.content-block:last-child { border-bottom: 0; }
.content-block .anchor-label {
    display: inline-block; font-family: var(--sans); text-transform: uppercase;
    letter-spacing: .16em; font-size: .74rem; font-weight: 600; color: var(--gold);
    margin-bottom: .5rem;
}
.content-block h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

.figure-frame {
    border: 1px solid var(--line); background: var(--paper); padding: .5rem;
    border-radius: .35rem; box-shadow: 0 8px 22px rgba(22,35,63,.08);
}
.figure-frame img { width: 100%; border-radius: .2rem; display: block; }
figcaption { font-size: .85rem; color: var(--muted); padding: .6rem .25rem 0; }

/* Timeline (biography / career) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
    content: ""; position: absolute; left: 10px; top: 4px; bottom: 4px;
    width: 2px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 1.75rem 2.5rem; }
.timeline li::before {
    content: ""; position: absolute; left: 3px; top: 4px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.timeline .year { font-family: var(--serif); font-weight: 700; color: var(--navy); }

/* Quote / pull */
.pullquote {
    border-left: 4px solid var(--gold); background: var(--paper-alt);
    padding: 1.5rem 1.75rem; font-family: var(--serif); font-style: italic;
    font-size: 1.2rem; color: var(--navy-700); border-radius: 0 .35rem .35rem 0;
}

/* Stats */
.stat { text-align: center; }
.stat .num { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--gold); line-height: 1; }
.stat .lbl { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); }

/* Publications list */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li {
    padding: 1.1rem 0; border-bottom: 1px solid var(--line);
    display: flex; gap: 1rem; align-items: baseline;
}
.pub-list li:last-child { border-bottom: 0; }
.pub-year {
    flex: 0 0 auto; font-family: var(--serif); font-weight: 700;
    color: var(--gold); min-width: 3.5rem;
}
.pub-title { font-weight: 600; color: var(--navy); }
.pub-meta { color: var(--muted); font-size: .92rem; }

/* Books */
.book-card { height: 100%; }
.book-cover {
    aspect-ratio: 2/3; width: 100%; object-fit: cover;
    border-radius: .3rem; box-shadow: 0 10px 26px rgba(22,35,63,.2);
    background: var(--paper-alt);
}
.book-price { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.15rem; }

/* Alert / note for the Controversies page */
.note-box {
    background: #fbf7ee; border: 1px solid var(--gold-light);
    border-left: 4px solid var(--gold); border-radius: .35rem; padding: 1.1rem 1.35rem;
    color: var(--navy-700); font-size: .95rem;
}

/* Contact */
.contact-card { background: var(--paper-alt); border: 1px solid var(--line); border-radius: .4rem; padding: 1.6rem; height: 100%; }
.form-control, .form-select {
    border-radius: .3rem; border-color: var(--line); padding: .7rem .9rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(176,141,62,.18);
}
.btn-gold {
    background: var(--gold); border: 1px solid var(--gold); color: #fff; font-weight: 600;
    padding: .65rem 1.6rem; border-radius: .3rem; letter-spacing: .02em;
}
.btn-gold:hover { background: #9a7a33; border-color: #9a7a33; color: #fff; }
.btn-outline-navy {
    border: 1px solid var(--navy); color: var(--navy); font-weight: 600;
    padding: .6rem 1.5rem; border-radius: .3rem; background: transparent;
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 3.25rem 0 2rem; }
.footer-brand { font-family: var(--serif); color: #fff; font-size: 1.6rem; margin-bottom: .35rem; }
.footer-heading { color: var(--gold-light); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; font-family: var(--sans); font-weight: 600; margin-bottom: 1rem; }
.text-muted-light { color: rgba(255,255,255,.6); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.78); font-size: .95rem; }
.footer-links a:hover { color: var(--gold-light); }
.footer-social a {
    display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; margin-right: .5rem; font-size: 1.05rem;
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); }
.footer-rule { border-color: rgba(255,255,255,.15); margin: 2rem 0 1.25rem; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: var(--gold-light); }

/* ---- Back to top --------------------------------------------------------- */
.back-to-top {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040;
    width: 46px; height: 46px; border: none; border-radius: 50%;
    background: var(--navy); color: #fff; font-size: 1.1rem;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all .25s ease; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); }

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Alerts */
.alert-soft-success { background: #eef6ee; border: 1px solid #cfe3cf; color: #2f5d34; }
.alert-soft-danger  { background: #fbeeee; border: 1px solid #eccccc; color: #7d2b2b; }

/* ---- Language switcher --------------------------------------------------- */
.lang-switch .nav-link { display: inline-flex; align-items: center; }
.lang-switch .lang-code {
    display: inline-block; min-width: 1.6rem; font-weight: 700;
    color: var(--gold); font-size: .8rem;
}
.lang-switch .dropdown-item.active,
.lang-switch .dropdown-item:active { background: var(--paper-alt); color: var(--navy); }
@media (min-width: 1200px) {
    .lang-switch { margin-left: .5rem; padding-left: .5rem; border-left: 1px solid rgba(255,255,255,.18); }
}

/* ---- Responsive tweaks --------------------------------------------------- */
@media (max-width: 1199.98px) {
    .navbar-collapse { padding-bottom: .5rem; }
    .navbar-dark .navbar-nav .nav-link.active::after { display: none; }
    .brand-name { font-size: 1.25rem; }
    .hero { padding: 3.5rem 0; }
    .hero-portrait { margin: 0 auto 1.5rem; display: block; }
    .lang-switch { margin-top: .35rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: .35rem; }
}
