/* ==========================================================================
   Academic personal site: one stylesheet shared by the Turkish and English pages.
   Quick restyle: change the variables in :root. Colours adapt to light/dark
   automatically through light-dark(first = light mode, second = dark mode).
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Colours */
  --bg: light-dark(#fdfdfc, #121417);
  --text: light-dark(#1f2328, #e4e6ea);
  --muted: light-dark(#5b626b, #9ba3ad);
  --rule: light-dark(#e3e1dc, #2a2f36);
  --accent: light-dark(#1d4e89, #8ab4f8);

  /* Fonts: system fonts only, so nothing is downloaded */
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Width of the text column */
  --measure: 41rem;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--text);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.9rem;
  border-radius: 4px;
}
.skip-link:focus { top: 1rem; z-index: 10; }

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

.site-header { padding-top: 1.5rem; }

.header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-name {
  color: var(--text);
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
}

.lang {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.lang:hover { border-color: var(--accent); }

.site-nav {
  margin-top: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); text-decoration: underline; }

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

.about {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.75rem 2rem;
  align-items: start;
  padding: 2.5rem 0 0.5rem;
}

.photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  background: var(--rule);
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.position {
  margin: 0 0 0.15rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
}

.affiliation {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Sections ---------- */

section { margin-top: 3rem; }
.about { margin-top: 0; }

h2 {
  margin: 0 0 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  margin: 1.75rem 0 0.75rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h2 + h3 { margin-top: 0; }

.interests { list-style: disc; padding-left: 1.25rem; }
.interests li { margin-bottom: 0.3rem; }

/* ---------- Publications ---------- */

.pubs li { margin-bottom: 0.9rem; }
.pubs .me { font-weight: 600; }
.pubs em { font-style: italic; }
.pubs a { font-family: var(--sans); font-size: 0.85em; white-space: nowrap; }

/* ---------- Education / experience / projects ---------- */

.entries li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.15rem 1.5rem;
  margin-bottom: 1.1rem;
}
.entries .when {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
  padding-top: 0.2rem;
}
.entries .what { font-weight: 600; }
.entries .where { color: var(--muted); font-size: 1rem; }
.entries .note { font-size: 1rem; }
.entries .note em { font-style: italic; }

/* ---------- Contact ---------- */

.contact dl { margin: 0; display: grid; grid-template-columns: 6rem 1fr; gap: 0.4rem 1rem; }
.contact dt { color: var(--muted); font-family: var(--sans); font-size: 0.9rem; padding-top: 0.15rem; }
.contact dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

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

/* ---------- 404 page ---------- */

.not-found { padding: 4rem 0; }
.not-found p { color: var(--muted); }

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

@media (max-width: 38rem) {
  body { font-size: 1.0625rem; }

  .about { grid-template-columns: 1fr; padding-top: 2rem; }
  .photo { width: 9rem; }
  h1 { font-size: 1.75rem; }

  .entries li { grid-template-columns: 1fr; }
  .contact dl { grid-template-columns: 1fr; gap: 0; }
  .contact dd { margin-bottom: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Print: a clean, CV-like sheet ---------- */

@media print {
  :root { --bg: #fff; --text: #000; --muted: #444; --rule: #bbb; --accent: #000; }
  html { color-scheme: light; }
  body { font-size: 11pt; line-height: 1.45; }
  .wrap { max-width: none; padding-inline: 0; }
  .skip-link, .site-nav, .lang { display: none; }
  .site-header { padding-top: 0; }
  .about { grid-template-columns: 8rem 1fr; padding-top: 1rem; }
  section { margin-top: 1.5rem; break-inside: auto; }
  h2, h3 { break-after: avoid; }
  .pubs li, .entries li { break-inside: avoid; }
  a { text-decoration: none; }
  .site-footer { margin-top: 1.5rem; }
}
