:root {
  --paper: #ece9e4;
  --stone: #e1dcd3;
  --line: #d3cdc2;
  --field-line: #8a8378;
  --ink: #23211e;
  --ink-hover: #3d3a35;
  --muted: #67625a;

  --display: "Instrument Serif", Georgia, serif;
  --text: "Noticia Text", Georgia, serif;

  --wide: 72rem;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.75 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 2px; }

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

p { margin: 0 0 1.25em; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 8vw, 4.75rem); margin: 0 0 2.5rem; }
h2 { font-size: clamp(1.875rem, 4vw, 2.5rem); margin: 0 0 1.5rem; }
h3 { font-size: 1rem; font-weight: 700; line-height: 1.45; margin: 0 0 0.375rem; }

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

.logo {
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
}

.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Button */

.button {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.button:hover { background: var(--ink-hover); }

/* Photos: one treatment for every photo. Grayscale, then multiply onto the
   stone background, so whites turn stone and each photo reads as a warm duotone. */

.photo { position: relative; margin: 0; background: var(--stone); }
.photo img {
  width: 100%;
  filter: grayscale(1) contrast(1.06);
  mix-blend-mode: multiply;
}
/* Captions sit outside the frame, so the stone panel stays a clean rectangle. */
.photo figcaption {
  position: absolute;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
}

/* Home: hero, set like a magazine cover. The portrait's stone panel
   slides up under the name, which stays in front. */

.hero {
  --name-size: min(16rem, 36vw);
  --tuck: calc(var(--name-size) * 0.32);
  padding-block: clamp(2rem, 6vw, 4rem) clamp(4rem, 9vw, 6.5rem);
  text-align: center;
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: var(--name-size);
  line-height: 0.85;
  letter-spacing: -0.025em;
  margin: 0;
  white-space: nowrap;
}

.cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem) minmax(0, 1fr);
  column-gap: clamp(2rem, 4vw, 3.5rem);
  text-align: left;
}

.portrait {
  grid-column: 2;
  grid-row: 1;
  margin-top: calc(-1 * var(--tuck));
  padding-top: calc(var(--tuck) + 0.75rem);
}

.cover-intro { grid-column: 1; grid-row: 1; padding-top: 1.5rem; }

.role {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.lead { margin: 0 0 2rem; font-size: 1.125rem; }

.facts {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.facts li { padding: 0.75rem 0; border-top: 1px solid var(--line); }
/* The closing rule lines up with the bottom edge of the portrait. */
.facts li:last-child { border-bottom: 1px solid var(--line); }

/* Home: sections */

.section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem 3rem;
  padding: clamp(4rem, 9vw, 6.5rem) 0;
}
.section + .section { border-top: 1px solid var(--line); }
.section h2 { margin: 0; }

.areas-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--display);
  font-size: 3rem;
  line-height: 1;
  color: var(--muted);
}
.steps p { margin: 0; color: var(--muted); }

.closing {
  padding: clamp(4rem, 9vw, 6.5rem) var(--gutter);
  background: var(--stone);
  text-align: center;
}
.closing-line {
  font-family: var(--display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 2rem;
}
.closing .button { margin-bottom: 1.25rem; }
.closing p:last-child { margin: 0; }

/* Inner pages */

.page {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 6rem;
}
.page h2 { margin-top: 4.5rem; }

/* Hakkımda: a magazine spread. The photo bleeds off the left edge and stays
   in view while the text scrolls beside it. */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 1fr);
  grid-template-areas: "photo title" "photo text";
  grid-template-rows: auto 1fr;
  padding-bottom: 6rem;
}
.profile h1 { grid-area: title; margin: 0; padding-top: 3.5rem; }
/* The right padding lines the text up with the header's right edge. */
.profile h1, .profile-text {
  padding-inline: clamp(2.5rem, 6vw, 6rem) max(var(--gutter), calc((100vw - var(--wide)) / 2 + var(--gutter)));
}
.profile-text > * { max-width: var(--measure); }

.profile-photo {
  grid-area: photo;
  align-self: start;
  position: sticky;
  top: 0;
}
.profile-photo img {
  aspect-ratio: 3 / 4;
  max-height: 100svh;
  object-fit: cover;
}
/* Vertical caption running up the photo's inner edge. */
.profile-photo figcaption {
  left: calc(100% + 0.5rem);
  bottom: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.profile-text { grid-area: text; padding-top: 2.5rem; }
.profile-text p:last-child { margin-bottom: 0; }

.deck {
  margin: 0 0 2.5rem;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.2;
  text-wrap: pretty;
}

/* Drop cap on the first body paragraph; browsers without initial-letter show a plain letter. */
.deck + p::first-letter {
  -webkit-initial-letter: 3;
  initial-letter: 3;
  font-family: var(--display);
  margin-right: 0.5rem;
}

.publications, .trainings { margin: 0; padding: 0; list-style: none; }

.publications li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.publications .year { color: var(--muted); }
.publications p { margin: 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }

.trainings li {
  padding: 0.875rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem clamp(3rem, 8vw, 7rem);
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 6rem;
}

.contact-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}
.contact-intro h1 { margin: 0; }

.contact-details { display: grid; gap: 1.25rem; margin: 0; }
.contact-details dt { font-size: 0.9375rem; color: var(--muted); }
.contact-details dd { margin: 0; }

.contact-lead {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  text-wrap: balance;
}

.muted { color: var(--muted); }

.contact-form { display: grid; gap: 1.75rem; margin-top: 2.5rem; }
.contact-form label { display: grid; gap: 0.25rem; font-size: 0.9375rem; color: var(--muted); }
.contact-form .optional { font-size: 0.875rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.375rem 0 0.5rem;
  border: 0;
  border-bottom: 1px solid var(--field-line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
}
.contact-form textarea { resize: vertical; min-height: 6rem; }
/* The thicker ink underline is the focus indicator for these fields. */
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 2rem; }

.form-note { margin: 0; font-size: 0.875rem; color: var(--muted); }
.contact-form .button { justify-self: start; }

/* Footer */

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) 2rem;
  overflow: hidden;
  container-type: inline-size;
}

/* 40cqi makes "Naz Töz" span the footer's full width. */
.footer-name {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-size: 40cqi;
  line-height: 0.85;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
.footer-row p { margin: 0; }

/* Medium screens: the cover stacks, portrait first. */

@media (max-width: 60rem) {
  .cover { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .portrait { grid-column: auto; grid-row: auto; width: min(22rem, 80%); }
  .cover-intro, .facts { grid-column: auto; grid-row: auto; max-width: 27rem; }
  .cover-intro { padding-top: 2rem; }
  .facts { width: 100%; margin-top: 2.5rem; }
}

/* Small screens */

@media (max-width: 48rem) {
  .site-header nav { gap: 0.25rem 1rem; font-size: 0.9375rem; }
  .section { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .profile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "photo" "text"; }
  .profile h1, .profile-text { padding-inline: var(--gutter); }
  .profile h1 { padding-block: 2.5rem; }
  .profile-photo { position: relative; margin-bottom: 2.5rem; }
  .profile-photo img { aspect-ratio: 4 / 5; }
  .profile-text { padding-top: 1rem; }
  .profile-photo figcaption { left: var(--gutter); bottom: auto; top: calc(100% + 0.5rem); writing-mode: horizontal-tb; transform: none; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
