:root {
  color-scheme: light;
  --background: #faf9f6;
  --text: #262824;
  --muted: #5e625b;
  --accent: #28584d;
  --line: #dddfd8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1.0625rem/1.7 Georgia, "Times New Roman", serif;
  overflow-wrap: anywhere;
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  grid-template-areas: "header sidebar" "main sidebar" "footer sidebar";
  column-gap: 3rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

h1, h2, p { margin: 0 0 1rem; }
h1 { font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.15; }
h2 { font-size: 1.5rem; line-height: 1.3; }
strong { font-weight: 700; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

header { grid-area: header; min-width: 0; }
main { grid-area: main; min-width: 0; }
.identity { min-width: 0; }
.identity p:last-child { margin-bottom: 0; }
.portrait-block { grid-area: sidebar; align-self: start; width: 12rem; max-width: 100%; }

.portrait {
  width: 100%;
  height: 15rem;
  border-radius: 0.25rem;
  /* A neutral frame is shown until you add profile.jpg. */
  background: var(--line) url("./images/Aksoy_photo_2.jpg") center / cover no-repeat;
}

.profile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
  text-align: center;
}

.profile-links a { display: inline-flex; align-items: center; gap: 0.45rem; }
.profile-icon { width: 1.1rem; height: 1.1rem; flex-shrink: 0; fill: currentColor; }
.line-icon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.affiliation, .profile-links, nav, footer {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.875rem;
}

.affiliation, footer { color: var(--muted); }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.site-nav a { padding-bottom: 0.3rem; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5rem;
}

section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1.5rem;
}

.publications { margin: 0; padding-left: 1.4rem; }
.publications li { padding-left: 0.3rem; }
.section-link { margin-top: 1.5rem; margin-bottom: 0; }
.talks { margin: 0; padding-left: 1.4rem; list-style: decimal; }
.talks > li::marker { content: "[" counter(list-item) "] "; }
li + li { margin-top: 1.25rem; }

footer {
  grid-area: footer;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.skip-link { position: absolute; left: 1rem; top: -10rem; }
.skip-link:focus { top: 1rem; padding: 0.4rem 0.8rem; background: var(--background); }

@media (max-width: 54rem) {
  .page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "sidebar" "main" "footer"; }
  .portrait-block { margin-top: 2rem; }
}

@media (max-width: 36rem) {
  .page { padding: 2.5rem 1.25rem 1.5rem; }
}

@media print {
  body { background: white; color: black; font-size: 11pt; }
  .page { display: block; max-width: none; padding: 0; }
  .portrait-block { width: auto; margin-top: 1rem; }
  .profile-links { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 0.5rem 1.25rem; }
  nav, .skip-link, .portrait { display: none; }
  section { margin-top: 1.5rem; padding-top: 1rem; }
  h2 { break-after: avoid; }
  li { break-inside: avoid; }
  a { color: inherit; }
}
