/* serhanyarkan.com — the only stylesheet.
 *
 * One theme, deliberately: warm paper, serif prose, a deep red accent. There is
 * no dark variant and no prefers-color-scheme block. Adding one would mean
 * maintaining two palettes across two languages.
 *
 * Edit the variables below before adding selectors.
 */

:root {
  --bg:       #faf7f2;
  --surface:  #f3ede3;
  --border:   #ddd4c6;
  --rule:     #cfc4b2;
  --fg:       #1f1b16;
  --fg-dim:   #433b32;
  --muted:    #6f655a;
  --accent:   #7b1f2b;
  --accent-soft: #a85462;

  --serif: "Source Serif 4", Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 38rem;
  --gutter: 1.5rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  padding: 3.25rem var(--gutter) 4.5rem;
  max-width: var(--measure);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #e8d3cf; color: var(--fg); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  padding: 0.4rem 0.7rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.82rem;
  border-radius: 2px;
}

/* ── Header: a small sans label, the name in serif, then the tagline ─────── */

.site-header { padding-bottom: 1.4rem; }

.prefix {
  margin: 0 0 0.1rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--accent);
}

.wordmark {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.95rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent); }

.tagline {
  margin: 0.3rem 0 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Nav row: sections left, language switch right ───────────────────────── */

.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1.5rem;
  padding: 0.7rem 0;
  margin-bottom: 2.8rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.84rem;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; }

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.1rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.langswitch {
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.langswitch:hover { border-bottom-color: var(--accent); }

/* ── Prose ───────────────────────────────────────────────────────────────── */

main > :first-child { margin-top: 0; }

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h2 {
  margin: 3rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h3 {
  margin: 2rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
}

p { margin: 0 0 1.2rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 0.17em;
}
a:hover { text-decoration-color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

strong { font-weight: 600; }
em { font-style: italic; }

ul, ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--rule); }

hr { margin: 2.8rem 0; border: 0; border-top: 1px solid var(--rule); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.3em;
  background: var(--surface);
  border-radius: 2px;
}

blockquote {
  margin: 0 0 1.3rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--border);
  color: var(--fg-dim);
  font-style: italic;
}

/* ── lede: the opening paragraph of a page ───────────────────────────────── */

.lede {
  font-size: 1.16rem;
  line-height: 1.68;
  color: var(--fg);
}
.lede p:last-child { margin-bottom: 1.4rem; }

/* ── facts: a key/value block with sans labels (degrees, posts) ───────────── */

.facts dl {
  margin: 0 0 1.3rem;
  display: grid;
  /* max-content, not a fixed width: the labels differ in length between
     English and Turkish and should not be clipped or wrapped. */
  grid-template-columns: minmax(4.5rem, max-content) 1fr;
  gap: 0 1.2rem;
}
.facts dt {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.6;
  padding-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.facts dd { margin: 0 0 0.6rem; line-height: 1.6; }
.facts dd > p:last-child { margin-bottom: 0; }

@media (max-width: 34rem) {
  .facts dl { grid-template-columns: 1fr; gap: 0; }
  .facts dt { padding-top: 0; }
  .facts dd { margin-bottom: 1rem; }
}

/* ── roles: dated service entries, year in sans ───────────────────────────── */

.roles ul { margin: 0 0 1.3rem; padding: 0; list-style: none; }
.roles li {
  margin: 0;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
}
.roles li:first-child { border-top: 1px solid var(--border); }
.role-meta {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── pubs: a bibliography, hanging indent, italic venue ──────────────────── */

.pubs ul { margin: 0 0 1.4rem; padding: 0; list-style: none; }
.pubs li {
  margin: 0 0 1.05rem;
  padding-left: 1.5rem;
  text-indent: -1.5rem;   /* hanging indent, as a reference list sets */
  line-height: 1.6;
}
.pubs li > p:last-child { margin-bottom: 0; }
.pub-meta { font-style: italic; color: var(--fg-dim); }
.pub-year { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }

/* ── linklist: the Links page ────────────────────────────────────────────── */

.linklist ul { margin: 0 0 1.4rem; padding: 0; list-style: none; }
.linklist li {
  margin: 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.linklist li:first-child { border-top: 1px solid var(--border); }
.linklist li > p:last-child { margin-bottom: 0; }
.link-note {
  display: block;
  font-family: var(--sans);
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

table {
  width: 100%;
  margin: 0 0 1.4rem;
  border-collapse: collapse;
  font-size: 0.98rem;
}
th, td {
  padding: 0.5rem 0.7rem 0.5rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
/* Pandoc emits an empty thead for headerless pipe tables; hide it. */
thead:empty, tr:empty { display: none; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }
