/* ================================================================
   petronis.me — screen.css
   Design: NYT Editorial × Oxford Research Portal
   Colors: Antique Paper / Ink Black / Oxblood
   Fonts:  Playfair Display (display) · Inter (UI)
   ================================================================ */

/* ── Reset & Custom Properties ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --paper:   #F9F7F2;
    --ink:     #1A1A1A;
    --oxblood: #8B1A1A;
    --muted:   #888888;
    --rule:    #D4CFC4;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --max-width: 1200px;
    --pad-x:     2rem;
    --section-gap: 4rem;
}

html { font-size: 16px; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--oxblood); }
img { max-width: 100%; display: block; }

/* ── Shared Utilities ────────────────────────────────────────── */
.section-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}


/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    padding: 2rem var(--pad-x) 0;
    max-width: var(--max-width);
    margin: 0 auto;
}

.header-inner {
    /* intentionally not max-width constrained — site-header handles it */
}

.site-name {
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-block;
    margin-bottom: 0.25rem;
}

/* Homepage: large editorial headline */
.home-headline {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
    max-width: 18ch;
    margin: 0.5rem 0 1.25rem;
}

/* Navigation */
.site-nav { margin-bottom: 0.75rem; }

.site-nav .nav {
    list-style: none;
    display: flex;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.site-nav .nav li a {
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}

.site-nav .nav li a:hover { color: var(--oxblood); }

/* Hairline rule under header */
.header-rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin-top: 0.25rem;
}


/* ================================================================
   HERO (Featured post)
   ================================================================ */
.hero {
    max-width: var(--max-width);
    margin: 2rem auto var(--section-gap);
    padding: 0 var(--pad-x);
}

.hero-image {
    position: relative;
    width: 100%;
    height: 480px;
    background-size: cover;
    background-position: center;
    background-color: #2a2521;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.15) 55%,
        transparent 100%
    );
}

.hero-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 40%;
    color: #fff;
}

.hero-label {
    display: block;
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.6rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-excerpt {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.75);
    margin-bottom: 1.25rem;
}

.hero-link {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--oxblood);
}

.hero-link:hover { opacity: 0.8; color: var(--oxblood); }


/* ================================================================
   FOCUS STRIP (Currently · On The Desk)
   ================================================================ */
.focus-strip {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin-bottom: var(--section-gap);
}

.focus-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem var(--pad-x);
    display: grid;
    grid-template-columns: 3fr 2fr;
}

.focus-currently {
    padding-right: 3rem;
    border-right: 1px solid var(--rule);
}

.focus-desk {
    padding-left: 3rem;
}

.focus-role {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0.5rem 0 0.3rem;
}

.focus-org {
    font-size: 0.875rem;
    color: var(--oxblood);
    margin-bottom: 0.75rem;
}

.focus-desc,
.focus-desc p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.desk-content { margin-top: 0.5rem; }

.desk-content p {
    font-size: 0.9375rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.desk-content p:last-child { margin-bottom: 0; }

/* For reading list styled as Ghost list block */
.desk-content ul { list-style: none; padding: 0; }

.desk-content li {
    margin-bottom: 0.85rem;
    font-size: 0.9375rem;
    line-height: 1.35;
}


/* ================================================================
   THREE PILLARS
   ================================================================ */
.pillars {
    border-top: 1px solid var(--rule);
    margin-bottom: var(--section-gap);
}

.pillars-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--pad-x);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.pillar {
    padding: 2rem 0;
}

.pillar + .pillar {
    border-left: 1px solid var(--rule);
    padding-left: 2rem;
}

.pillar:not(:last-child) {
    padding-right: 2rem;
}

.pillar-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 1.5rem;
}

.pillar-name {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
}

.pillar-num {
    font-size: 0.625rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}


/* ================================================================
   POST CARDS
   ================================================================ */
.post-card {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}

.post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-type { margin-bottom: 0.35rem; }

.post-type-tag {
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--oxblood);
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--oxblood); }

.post-card-venue {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.post-card-date {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
}


/* ================================================================
   FOOTER
   ================================================================ */
.site-footer { border-top: 1px solid var(--rule); }

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem var(--pad-x);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* Timeline */
.footer-timeline .section-label { margin-bottom: 1.5rem; }

.timeline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 1rem;
    align-items: start;
}

.timeline-period {
    font-size: 0.75rem;
    color: var(--muted);
    padding-top: 0.1rem;
    white-space: nowrap;
}

.timeline-role-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
}

.timeline-org {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

/* Dispatch */
.footer-dispatch .section-label { margin-bottom: 1.5rem; }

.dispatch-headline {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.dispatch-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.dispatch-form {
    display: flex;
    border: 1px solid var(--rule);
}

.dispatch-email {
    flex: 1;
    padding: 0.75rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    background: var(--paper);
    border: none;
    outline: none;
    color: var(--ink);
    min-width: 0;
}

.dispatch-email::placeholder { color: var(--muted); }

.dispatch-submit {
    padding: 0.75rem 1.25rem;
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--paper);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.dispatch-submit:hover { background: var(--oxblood); }

.dispatch-success { color: var(--oxblood); font-size: 0.875rem; margin-top: 0.5rem; }
.dispatch-error   { color: #c0392b; font-size: 0.875rem; margin-top: 0.5rem; }
.dispatch-subscribed { font-size: 0.875rem; color: var(--muted); }

/* Copyright bar */
.footer-copyright {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem var(--pad-x);
    border-top: 1px solid var(--rule);
    font-size: 0.6875rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* ================================================================
   SINGLE POST
   ================================================================ */
.post-template .site-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem var(--pad-x) 5rem;
}

.post-header { margin-bottom: 2.5rem; }

.post-type { margin-bottom: 0.75rem; }

.post-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    font-size: 1.125rem;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 0.8125rem;
    color: var(--muted);
    border-top: 1px solid var(--rule);
    padding-top: 0.75rem;
}

.post-reading-time { margin-left: 0.25rem; }

.post-image {
    max-width: 720px;
    margin: 0 auto 2.5rem;
}

.post-image img { width: 100%; }

.post-image figcaption {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* Post content typography */
.post-content,
.gh-content {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.post-content h2,
.gh-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 2.5rem 0 0.75rem;
}

.post-content h3,
.gh-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.5rem;
}

.post-content p,
.gh-content p { margin-bottom: 1.5rem; }

.post-content a,
.gh-content a {
    color: var(--oxblood);
    text-decoration: underline;
    text-decoration-thickness: 0.5px;
    text-underline-offset: 2px;
}

.post-content a:hover,
.gh-content a:hover { opacity: 0.8; }

.post-content blockquote,
.gh-content blockquote {
    border-left: 2px solid var(--oxblood);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.125rem;
    color: var(--muted);
}

.post-content code,
.gh-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    background: rgba(0,0,0,0.05);
    padding: 0.1em 0.35em;
}

.post-content pre,
.gh-content pre {
    background: var(--ink);
    color: #f8f8f2;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content pre code,
.gh-content pre code { background: none; padding: 0; color: inherit; }

.post-content ul,
.post-content ol,
.gh-content ul,
.gh-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-content li,
.gh-content li { margin-bottom: 0.4rem; }

.post-content hr,
.gh-content hr {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 3rem 0;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    font-size: 0.8125rem;
    color: var(--muted);
}

/* Ghost Koenig card widths */
.kg-width-wide  { margin-left: -6vw; margin-right: -6vw; }
.kg-width-full  { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.kg-image       { max-width: 100%; margin: auto; }

.kg-gallery-container { display: flex; flex-direction: column; margin: 1.5em auto; }
.kg-gallery-row       { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; margin: 0; width: 100%; height: 100%; object-fit: cover; }


/* ================================================================
   TAG ARCHIVE PAGE
   ================================================================ */
.tag-template.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem var(--pad-x) 5rem;
}

.tag-header {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 3rem;
}

.tag-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
}

.tag-desc {
    font-size: 1rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 3rem 0 0;
    font-size: 0.875rem;
}

.pagination a { color: var(--oxblood); }
.pagination .page-number { color: var(--muted); font-size: 0.8125rem; }


/* ================================================================
   PAGE TEMPLATE
   ================================================================ */
.page-template.site-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem var(--pad-x) 5rem;
}


/* ================================================================
   ERROR PAGE
   ================================================================ */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
}

.error-site-link {
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.error-code {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--oxblood);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.error-back {
    font-size: 0.875rem;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
    .focus-inner {
        grid-template-columns: 1fr;
    }

    .focus-currently {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }

    .focus-desk { padding-left: 0; }

    .pillars-inner { grid-template-columns: 1fr; }

    .pillar + .pillar {
        border-left: none;
        border-top: 1px solid var(--rule);
        padding-left: 0;
        padding-top: 2rem;
    }

    .pillar:not(:last-child) { padding-right: 0; }

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

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

@media (max-width: 600px) {
    :root { --pad-x: 1.25rem; }

    .hero-image { height: 340px; }
    .hero-content { right: 1.5rem; }

    .site-header { padding: 1.5rem var(--pad-x) 0; }

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

    .timeline-item { grid-template-columns: 4.5rem 1fr; }
}
