﻿:root {
    --bg: #f3f0e8;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --surface-muted: #f7f4ee;
    --text: #1f2937;
    --text-soft: #5b6472;
    --line: rgba(31, 41, 55, 0.08);
    --accent: #295c5a;
    --accent-strong: #183c3b;
    --shadow: 0 18px 50px rgba(24, 34, 44, 0.08);
    --shadow-soft: 0 8px 24px rgba(24, 34, 44, 0.06);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1180px;
}

html { scroll-behavior: smooth; }

body.modern-site {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(41, 92, 90, 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(120, 102, 84, 0.1), transparent 22%),
        linear-gradient(180deg, #f7f4ee 0%, #f3f0e8 48%, #eeebe4 100%);
    color: var(--text);
    font-family: 'Manrope', sans-serif;
}

body.modern-site p,
body.modern-site li,
body.modern-site td,
body.modern-site a,
body.modern-site span,
body.modern-site div { font-family: 'Manrope', sans-serif; }

body.modern-site h1,
body.modern-site h2,
body.modern-site h3,
body.modern-site h4 {
    color: #18212b;
    font-family: 'Libre Baskerville', serif;
}

.site-navbar {
    background: rgba(24, 33, 43, 0.82) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
}

.site-navbar-inner { min-height: 82px; }
.site-brand { color: #fff !important; font-family: 'Libre Baskerville', serif; font-size: 1.35rem; letter-spacing: 0.03em; }
.site-brand-mark { opacity: 0.92; }
.site-brand-accent { color: #8bd0cb; margin-left: 2px; }
.site-nav-item { margin-left: 1rem; }
.site-nav-link { color: rgba(255,255,255,0.78) !important; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; transition: color 0.2s ease; }
.site-nav-link:hover, .site-nav-link.is-active { color: #fff !important; }

.site-page { padding-top: 122px; padding-bottom: 56px; }
.site-shell { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.site-card { background: var(--surface); border: 1px solid rgba(255,255,255,0.52); border-radius: var(--radius-lg); box-shadow: var(--shadow); backdrop-filter: blur(8px); }

.hero-panel { position: relative; overflow: hidden; padding: 84px 72px; min-height: calc(100vh - 190px); display: flex; align-items: center; }
.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, rgba(247,244,238,0.92) 0%, rgba(247,244,238,0.85) 42%, rgba(247,244,238,0.38) 72%, rgba(247,244,238,0.12) 100%),
        url('../images/firstscreen.jpg') center center / cover no-repeat;
}
.hero-content { position: relative; z-index: 1; max-width: 650px; }
.eyebrow, .section-kicker { display: inline-block; color: var(--accent); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow { margin-bottom: 20px; }
.hero-title { margin-bottom: 18px; font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: 1.05; }
.hero-subtitle, .lede, .content-flow p, .cv-subtitle, .cv-value, .cv-value p, .cv-value li, .contact-note { color: var(--text-soft); line-height: 1.85; }
.hero-subtitle { max-width: 560px; font-size: 1.1rem; }
.hero-quote {
    margin-top: 34px;
    padding-left: 22px;
    border-left: 3px solid rgba(41, 92, 90, 0.28);
    color: #24313d;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.9;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.site-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font-size: 0.95rem; font-weight: 700; text-decoration: none !important; transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease; }
.site-button:hover { transform: translateY(-1px); }
.site-button-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-soft); }
.site-button-primary:hover { color: #fff; background: var(--accent-strong); }
.site-button-secondary { background: rgba(255,255,255,0.65); border-color: rgba(24,33,43,0.08); color: var(--text); }

.site-grid { display: grid; gap: 22px; margin-top: 24px; }
.site-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card, .section-panel, .contact-card, .cv-section { padding: 28px; }
.feature-card h3 { margin-bottom: 12px; font-size: 1.25rem; }
.feature-card p { margin-bottom: 0; color: var(--text-soft); line-height: 1.8; }

.section-panel { padding: 48px; }
.section-header { margin-bottom: 28px; }
.section-title { margin-top: 12px; margin-bottom: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }

.about-layout, .contact-grid { display: grid; gap: 28px; }
.about-layout { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); align-items: start; }
.about-image-modern { width: 100%; border-radius: 22px; box-shadow: var(--shadow-soft); object-fit: cover; }
.content-flow > * + * { margin-top: 18px; }
.content-flow h3 { margin-top: 28px; font-size: 1.35rem; }
.about-panel-simple {
    max-width: 860px;
    margin: 0 auto;
}
.about-header-simple {
    max-width: 720px;
}
.about-copy-simple {
    max-width: 720px;
}
.about-copy-simple .lede {
    color: #22313f;
    font-size: 1.1rem;
    font-weight: 600;
}
.about-cta-row {
    display: flex;
    justify-content: flex-start;
    padding-top: 8px;
}

.cv-stack { display: grid; gap: 18px; }
.cv-hero { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 28px; }
.cv-avatar { width: 96px; height: 96px; border-radius: 24px; object-fit: cover; box-shadow: var(--shadow-soft); }
.cv-section-title { margin-bottom: 18px; font-size: 1.15rem; }
.cv-list { display: grid; gap: 16px; }
.cv-row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.cv-row:first-child { padding-top: 0; border-top: 0; }
.cv-label, .contact-label { display: block; color: var(--accent); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.cv-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cv-mini-card { padding: 22px; background: var(--surface-muted); border-radius: 18px; }

.contact-grid { grid-template-columns: 1.15fr 0.85fr; }
.contact-list { display: grid; gap: 18px; }
.contact-item { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.contact-item:last-child { padding-bottom: 0; border-bottom: 0; }
.contact-label { margin-bottom: 8px; }
.contact-value, .contact-value a { color: var(--text); font-size: 1.02rem; font-weight: 600; text-decoration: none; }
.social-links { display: flex; gap: 12px; margin-top: 14px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 999px; background: rgba(41, 92, 90, 0.08); }
.social-links img { width: 20px; height: 20px; }

.site-footer { padding: 0 20px 32px; }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; max-width: var(--container); padding: 22px 0 0; border-top: 1px solid rgba(24,33,43,0.08); }
.site-footer-copy {
    color: #263544;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.site-footer-tagline {
    color: #314252;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    opacity: 0.76;
    transform: translateY(1px);
}

@media screen and (max-width: 991px) {
    .site-navbar-inner { min-height: 72px; }
    .site-nav-item { margin-left: 0; width: 100%; }
    .site-nav-link { padding: 0.9rem 0 !important; }
    .hero-panel { min-height: auto; padding: 72px 28px; }
    .site-grid-3, .contact-grid, .about-layout, .cv-mini-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 767px) {
    .site-page { padding-top: 100px; }
    .feature-card, .section-panel, .contact-card, .cv-section { padding: 26px 20px; }
    .hero-panel { padding: 54px 20px; border-radius: 24px; }
    .hero-actions { flex-direction: column; }
    .site-button { width: 100%; }
    .cv-hero, .cv-row { grid-template-columns: 1fr; }
    .site-footer-inner { flex-direction: column; gap: 10px; text-align: center; }
    .about-panel-simple,
    .about-header-simple,
    .about-copy-simple {
        max-width: 100%;
    }
}
.cv-inline-link-wrap {
    margin-top: 10px;
    margin-bottom: 0;
}

.cv-inline-link {
    color: #516171;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(81, 97, 113, 0.28);
}

.cv-inline-link:hover {
    color: #24313d;
    text-decoration: none;
    border-bottom-color: rgba(36, 49, 61, 0.45);
}
.selected-projects {
    display: grid;
    gap: 22px;
}

.project-entry {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.project-entry:first-child {
    padding-top: 0;
    border-top: 0;
}

.project-title {
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.project-company {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.project-points {
    margin: 0;
    padding-left: 20px;
    color: var(--text-soft);
}

.project-points li {
    margin-bottom: 8px;
    line-height: 1.75;
}

.project-points li:last-child {
    margin-bottom: 0;
}
.cv-detail-lines {
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    padding-left: 16px;
}

.cv-detail-line {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 4px;
}

.cv-detail-line:last-child {
    margin-bottom: 0;
}

.cv-detail-line strong {
    color: var(--text);
    font-weight: 700;
}
.contact-meta {
    margin-top: 8px;
    margin-bottom: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.7;
}

.contact-text-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.contact-text-links a {
    color: #516171;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(81, 97, 113, 0.24);
}

.contact-text-links a:hover {
    color: #24313d;
    text-decoration: none;
    border-bottom-color: rgba(36, 49, 61, 0.42);
}

.contact-note-card .contact-note {
    max-width: 34ch;
}
.books-page-main {
    padding-bottom: 72px;
}

.books-shell {
    max-width: 1320px;
}

.books-hero {
    padding: 36px 40px;
    margin-bottom: 28px;
}

.books-hero-copy {
    max-width: 760px;
}

.books-ads {
    margin-bottom: 28px;
    text-align: center;
}

.books-ads > div {
    margin-bottom: 14px;
}

.books-groups {
    display: grid;
    gap: 42px;
}

.books-category-block {
    display: block;
}

.books-category-head {
    margin-bottom: 18px;
}

.books-category-title {
    margin: 0;
    color: #1d2935;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
}

.books-row {
    margin-left: -10px;
    margin-right: -10px;
}

.books-col {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 22px;
}

.books-card-link {
    display: block;
    text-decoration: none !important;
}

.books-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 28px rgba(24, 34, 44, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.books-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(24, 34, 44, 0.14);
}

.books-card-image {
    display: block;
    width: 100%;
    height: auto;
}

.books-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    background: linear-gradient(180deg, rgba(18, 27, 36, 0.04) 0%, rgba(18, 27, 36, 0.74) 100%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.books-card:hover .books-card-overlay {
    opacity: 1;
}

.books-card-text {
    display: grid;
    gap: 4px;
    color: #ffffff;
    width: 100%;
}

.books-card-text strong {
    font-size: 1rem;
    line-height: 1.35;
}

.books-card-text span {
    font-size: 0.9rem;
    line-height: 1.45;
    opacity: 0.86;
}

@media screen and (max-width: 991px) {
    .books-hero {
        padding: 30px 24px;
    }

    .books-groups {
        gap: 36px;
    }
}

@media screen and (max-width: 767px) {
    .books-shell {
        padding: 0 16px;
    }

    .books-hero {
        padding: 26px 20px;
        margin-bottom: 24px;
    }

    .books-col {
        margin-bottom: 18px;
    }

    .books-card-overlay {
        display: none;
    }

    .books-card-text strong {
        font-size: 0.9rem;
    }

    .books-card-text span {
        font-size: 0.8rem;
    }
}
.book-detail-page {
    padding-bottom: 80px;
}

.book-detail-shell {
    max-width: 1040px;
}

.book-detail-breadcrumb {
    margin-bottom: 18px;
}

.book-detail-breadcrumb a {
    color: #516171;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(81, 97, 113, 0.24);
}

.book-detail-breadcrumb a:hover {
    color: #24313d;
    text-decoration: none;
    border-bottom-color: rgba(36, 49, 61, 0.42);
}

.book-detail-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.book-detail-nav-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    color: var(--text);
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255,255,255,0.52);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-detail-nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(24, 34, 44, 0.1);
}

.book-detail-nav-card.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.book-detail-nav-card.is-next {
    text-align: right;
    grid-template-columns: 1fr 68px;
}

.book-detail-nav-card.is-next .book-detail-nav-copy {
    order: 1;
    justify-self: stretch;
    margin-left: 0;
}

.book-detail-nav-card.is-next .book-detail-nav-thumb {
    order: 2;
    justify-self: end;
}

.book-detail-nav-thumb {
    width: 68px;
    height: 94px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 10px 22px rgba(24, 34, 44, 0.14);
}

.book-detail-nav-label {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.book-detail-nav-title {
    display: block;
    color: #1d2935;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.book-detail-card {
    padding: 32px;
}

.book-detail-summary-card {
    margin-top: 24px;
    background: rgba(248, 244, 235, 0.92);
    border: 1px solid rgba(130, 113, 89, 0.12);
}

.book-detail-hero {
    display: grid;
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.book-detail-cover {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
    box-shadow: 0 18px 38px rgba(24, 34, 44, 0.16);
}

.book-detail-kicker {
    margin-bottom: 14px;
}

.book-detail-title {
    margin-bottom: 14px;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    line-height: 1.08;
}

.book-detail-author {
    margin-bottom: 22px;
    color: #314252;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.7;
}

.book-detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.book-detail-meta-item {
    padding: 14px 16px;
    background: rgba(255,255,255,0.58);
    border: 1px solid rgba(24, 33, 43, 0.06);
    border-radius: 16px;
}

.book-detail-meta-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.book-detail-meta-item span {
    display: block;
    color: #1f2937;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.55;
}

.book-detail-section + .book-detail-section {
    margin-top: 30px;
}

.book-detail-secondary-card {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.book-detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.book-detail-section-title {
    margin: 0;
    font-size: 1.45rem;
}

.book-detail-section-meta {
    color: #667180;
    font-size: 0.92rem;
    font-weight: 600;
}

.book-detail-richtext,
.book-detail-summary {
    color: #3f4c5a;
    font-size: 1.03rem;
    line-height: 1.9;
}

.book-detail-richtext {
    margin-top: 14px;
}

.book-detail-richtext p,
.book-detail-summary p {
    margin-bottom: 1.2rem;
}

.book-detail-richtext img,
.book-detail-summary img,
.book-detail-richtext iframe,
.book-detail-summary iframe,
.book-detail-richtext table,
.book-detail-summary table {
    max-width: 100%;
}

.book-detail-richtext img,
.book-detail-summary img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
    border-radius: 18px;
}

.book-detail-richtext p:has(> img:only-child),
.book-detail-summary p:has(> img:only-child) {
    text-align: center;
}

.book-detail-richtext p:has(> img:only-child) + p,
.book-detail-summary p:has(> img:only-child) + p {
    text-align: center;
}

.book-detail-richtext .photo-desc,
.book-detail-summary .photo-desc {
    text-align: center;
}

.book-detail-richtext h3:has(cdb),
.book-detail-summary h3:has(cdb) {
    margin-top: 28px;
}

.book-detail-summary {
    color: #566273;
}

.book-detail-ads {
    margin-top: 24px;
    text-align: center;
}

.book-detail-ads > div {
    margin-bottom: 12px;
}

.book-detail-return {
    margin-top: 28px;
}

@media screen and (max-width: 991px) {
    .book-detail-hero,
    .book-detail-meta {
        grid-template-columns: 1fr;
    }

    .book-detail-cover-wrap {
        max-width: 260px;
    }
}

@media screen and (max-width: 767px) {
    .book-detail-nav {
        grid-template-columns: 1fr;
    }

    .book-detail-nav-card,
    .book-detail-nav-card.is-next {
        text-align: left;
    }

    .book-detail-nav-card.is-next .book-detail-nav-copy,
    .book-detail-nav-card.is-next .book-detail-nav-thumb {
        order: initial;
    }

    .book-detail-card {
        padding: 24px 20px;
    }

    .book-detail-secondary-card {
        padding: 22px 20px;
    }

    .book-detail-section-head {
        display: block;
    }

    .book-detail-section-meta {
        display: block;
        margin-top: 8px;
    }
}
