/* =============================================
   DESIGN SYSTEM
   ============================================= */

:root {
    --ink:        #0f0e0c;
    --paper:      #ffffff;
    --paper-dark: #eeedf2;
    --rule:       #374c80;
    --rule-light: #c8c4bc;
    --accent:     #374c80;
    --accent-alt: #ffa600;
    --muted:      #5c5852;
    --col-width:  680px;
    --fig-width:  820px;
}

/* =============================================
   RESET & BASE
   ============================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px;
    background-color: var(--paper-dark);
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    max-width: 960px;
    margin: 0 auto;
    border-left: 1px solid var(--rule-light);
    border-right: 1px solid var(--rule-light);
    min-height: 100vh;
}

/* =============================================
   MASTHEAD
   ============================================= */

.masthead {
    padding: 48px 60px 40px;
    border-bottom: 3px double var(--rule);
    background-color: var(--paper);
}

.masthead-inner {
    max-width: var(--col-width);
    margin: 0 auto;
}

.masthead-meta {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.masthead-divider {
    margin: 0 8px;
    color: var(--rule-light);
}

.section-label {
    color: var(--accent);
    font-weight: 500;
}

.masthead-rule {
    height: 3px;
    background-color: var(--rule);
    margin-bottom: 20px;
}

.masthead-rule--thin {
    height: 1px;
    background-color: var(--rule-light);
    margin-top: 20px;
    margin-bottom: 14px;
}

.headline {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 20px;
    text-shadow: 1px 1px 0 rgba(55,76,128,0.06);
}

.deck {
    font-family: 'Source Serif 4', serif;
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 0;
}

.byline-block {
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2px;
}

.byline-label {
    color: var(--rule-light);
    margin-right: 4px;
}

.byline-name {
    color: var(--ink);
    font-weight: 500;
}

/* =============================================
   CONTENT COLUMN
   ============================================= */

.content {
    padding: 52px 60px 64px;
}

/* =============================================
   SECTION HEADINGS
   ============================================= */

/* .section-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    color: var(--ink);
    max-width: var(--col-width);
    margin: 3em auto 1.2em;
    padding-right: 10rem;
    padding-bottom: 14px;
    border-bottom: 2px dashed var(--rule);
    position: relative;
} */

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    color: var(--ink);
    max-width: var(--col-width);
    margin: 3em auto 1.2em;
    padding-bottom: 14px;
    position: relative;
}

/* dashed line — adjust width to taste */
.section-heading::after {
    content: '';
    display: block;
    width: 90%;
    border-bottom: 2px dashed var(--rule);
    position: absolute;
    bottom: 0;
    left: 0;
}

.section-heading::before {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--rule);
    vertical-align: middle;
    margin-left: 4px;
    position: absolute;
    bottom: -0.65em;
    left: calc(90%);
    right: 0;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 16v-2l-8-5V3.5A1.5 1.5 0 0 0 11.5 2 1.5 1.5 0 0 0 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    transform: rotate(90deg) translateX(-3px);
}

/* little plane at the right end of the dashed rule */
/* .section-heading::before {
    content: '✈';
    position: absolute;
    bottom: -0.65em;
    right: 0;
    font-size: 2rem;
    line-height: 1;
    color: var(--rule);
    transform: translateY(-7px);
} */

/* =============================================
   TYPOGRAPHY
   ============================================= */

p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink);
    max-width: var(--col-width);
    margin: 0 auto 1.4em;
}

p.drop-cap::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 4.2em;
    font-weight: 900;
    float: left;
    line-height: 0.82;
    margin-right: 6px;
    margin-top: 8px;
    color: var(--accent-alt);
}

/* =============================================
   FIGURES — data charts
   ============================================= */

.figure {
    max-width: var(--col-width);
    margin: 2.4em auto 2.8em;
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
}

figcaption {
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-top: 10px;
}

/* =============================================
   FIGURES — photos
   ============================================= */

.figure--photo {
    max-width: var(--col-width);
    border-top: none;
    padding-top: 0;
    margin: 2em auto 2.4em;
}

.figure--photo img {
    width: 100%;
    height: auto;
    display: block;
    outline: 1px solid var(--rule-light);
}

.figure--photo figcaption {
    max-width: 100%;
}

/* =============================================
   PULL QUOTE
   ============================================= */

.pull-quote {
    max-width: var(--col-width);
    margin: 2em auto;
    border-left: 3px solid var(--rule);
    padding: 6px 0 6px 24px;
}

.pull-quote p {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ink);
    margin: 0;
    max-width: 100%;
}

/* =============================================
   STAT CALLOUT
   ============================================= */

.stat-callout {
    max-width: var(--col-width);
    margin: 2.4em auto;
    border-top: 1px solid var(--rule-light);
    border-bottom: 1px solid var(--rule-light);
    padding: 20px 0;
}

.stat-callout-inner {
    display: flex;
    align-items: center;
    gap: 28px;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-alt);
    line-height: 1;
    white-space: nowrap;
}

.stat-unit {
    font-size: 1.6rem;
    font-weight: 400;
    margin-left: 2px;
}

.stat-label {
    font-family: 'Source Serif 4', serif;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
    font-style: italic;
}

/* =============================================
   FOOTER / ABOUT
   ============================================= */

.about-section {
    background-color: var(--paper-dark);
    border-top: 3px double var(--rule);
    padding: 40px 60px 52px;
}

.about-inner {
    max-width: var(--col-width);
    margin: 0 auto;
}

.about-rule {
    width: 40px;
    height: 2px;
    background-color: var(--rule);
    margin-bottom: 16px;
}

.about-heading {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.about-text {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 100%;
}

.about-text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.about-text a:hover {
    color: var(--accent-alt);
}

/* =============================================
   TOOLTIP (D3)
   ============================================= */

#myTooltip {
    position: absolute;
    pointer-events: none;
    padding: 10px 14px;
    background-color: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--ink);
    opacity: 0;
    box-shadow: 2px 2px 0 var(--rule);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 700px) {
    .masthead,
    .content,
    .about-section {
        padding-left: 24px;
        padding-right: 24px;
    }

    .headline {
        font-size: 3rem;
    }

    .stat-callout-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .stat-number {
        font-size: 3rem;
    }
}