/* toprakkaya.com — white paper, black and grey type, serif display.
   Fonts are self-hosted; see fonts.css. */

:root {
    --bg: #FFFFFF;
    --soft: #F6F6F4;
    --ink: #111111;
    --ink-2: #2B2B2B;
    --body: #3A3A3A;
    --muted: #5F5F5F;
    --label: #6E6E6E;
    --line: #E6E6E3;
    --line-strong: #111111;

    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --gutter: 32px;
    --measure: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }

.skip-link { position: absolute; left: -9999px; top: 0; padding: 12px 16px; background: var(--ink); color: var(--bg); z-index: 10; }
.skip-link:focus { left: 16px; top: 16px; }

.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--label); }
.h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.intro { padding-top: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.6vw, 84px); line-height: 1.02; letter-spacing: -0.025em; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.lead { font-size: 20px; line-height: 1.55; color: var(--body); max-width: 640px; }
.muted { color: var(--muted); }

/* ---- Header / footer ------------------------------------------------------ */

.site-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; }
.brand { font-family: var(--serif); font-size: 24px; font-weight: 500; text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 32px; padding-bottom: 12px; }
.footer-name { font-family: var(--serif); font-size: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { text-decoration: none; color: var(--muted); }
.footer-nav a:hover { color: var(--ink); }
.footer-copy { padding-bottom: 40px; font-size: 13px; color: var(--label); }

/* ---- Home ----------------------------------------------------------------- */

.hero { padding-top: 88px; padding-bottom: 72px; }
.hero .label { margin-bottom: 24px; }
.hero .lead { margin-top: 28px; }
.hero-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 24px; font-weight: 600; font-size: 15px; }

.section { padding-top: 72px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.section-head a { font-size: 15px; font-weight: 600; }
.section-note { margin-top: 14px; font-size: 15px; color: var(--muted); }

.now { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 40px; }
.now > div { padding: 24px 0; border-bottom: 1px solid var(--line); }
.now h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; margin-bottom: 6px; }
.now p { color: var(--body); font-size: 16px; }

/* ---- Article lists -------------------------------------------------------- */

.article-list { list-style: none; padding: 0; }
.article-list li { border-bottom: 1px solid var(--line); }
.article-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; padding: 16px 0; text-decoration: none; }
.article-row:hover .article-title { text-decoration: underline; }
.article-title { font-family: var(--serif); font-size: 22px; line-height: 1.3; flex: 1 1 360px; min-width: 0; }
.article-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--label); white-space: nowrap; }

.year-group { padding-top: 48px; }
.year-group:first-of-type { padding-top: 24px; }
.year { font-family: var(--serif); font-size: 28px; padding-bottom: 6px; border-bottom: 1px solid var(--line-strong); }

/* ---- Article page --------------------------------------------------------- */

.article-head { padding-top: 64px; padding-bottom: 32px; }
.article-head .label a { color: var(--label); }
.article-head h1 { margin-top: 20px; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5.4vw, 60px); line-height: 1.06; letter-spacing: -0.02em; }
.article-meta-line { margin-top: 20px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--label); }

.prose { font-family: var(--serif); font-size: 21px; line-height: 1.65; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--sans); font-weight: 600; line-height: 1.3; margin-top: 1.8em; }
.prose h2 { font-size: 24px; } .prose h3 { font-size: 21px; } .prose h4 { font-size: 18px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { border-left: 2px solid var(--ink); padding-left: 1em; color: var(--body); font-style: italic; }
.prose img { margin: 1.4em auto; border-radius: 4px; }
.prose figure img { margin: 0 auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { margin-top: 10px; font-family: var(--sans); font-size: 15px; color: var(--muted); }
.prose .video a { display: block; }
.prose .video img { width: 100%; max-width: 560px; margin: 0; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.prose .gallery img { margin: 0; width: 100%; }
.prose pre { overflow-x: auto; padding: 16px 18px; background: var(--soft); border-radius: 6px; font-size: 14px; line-height: 1.55; }
.prose code { font-family: var(--mono); font-size: 0.85em; }
.prose pre code { font-size: 14px; }
.prose table { border-collapse: collapse; font-family: var(--sans); font-size: 16px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; vertical-align: top; }
.prose .note { display: inline-block; font-family: var(--sans); font-size: 15px; color: var(--muted); }
.prose p > .note:only-child { padding: 12px 16px; background: var(--soft); border-radius: 6px; }

.article-foot { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line-strong); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 40px; }
.article-foot a { text-decoration: none; }
.article-foot .label { display: block; margin-bottom: 4px; }
.article-foot .title { font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.article-foot a:hover .title { text-decoration: underline; }
.article-foot .older { text-align: right; }
.back-link { margin-top: 32px; font-weight: 600; font-size: 15px; }

/* ---- About ---------------------------------------------------------------- */

.timeline li { display: flex; flex-wrap: wrap; gap: 4px 28px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline .when { flex: 0 0 150px; font-family: var(--mono); font-size: 13px; color: var(--label); padding-top: 4px; text-transform: uppercase; }
.timeline .what { flex: 1 1 400px; min-width: 0; }
.timeline .role { font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.timeline .desc { margin-top: 4px; color: var(--body); font-size: 16px; }
.timeline { list-style: none; padding: 0; border-top: 1px solid var(--line-strong); }

.original { margin-top: 24px; padding: 28px 32px; background: var(--soft); border-radius: 8px; }
.original .prose { font-size: 19px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.8vw, 32px); line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); }

/* ---- Small screens -------------------------------------------------------- */

@media (max-width: 720px) {
    :root { --gutter: 20px; }
    .site-header { padding-top: 20px; padding-bottom: 20px; }
    .hero { padding-top: 48px; padding-bottom: 40px; }
    .section { padding-top: 56px; }
    .article-head { padding-top: 40px; }
    .prose { font-size: 19px; }
    .article-row { padding: 14px 0; }
    .article-title { font-size: 20px; flex-basis: 100%; }
    .article-foot .older { text-align: left; }
    .original { padding: 20px; }
    .quote blockquote { font-size: 22px; }
}
