/* ============================================================
   Kaan Dogmazer — personal site
   Palette: warm paper, deep ink, a single terracotta accent.
   ============================================================ */

:root {
  /* white version. previous warm paper: #faf7f2 / #f3ede4 / rule #e6ded2 */
  --paper:      #ffffff;
  --paper-warm: #f6f4f1;
  --ink:        #1f1c1a;
  --ink-soft:   #57524c;
  --ink-faint:  #9b948c;
  --accent:     #b4573a;   /* terracotta: headings, kickers, hovers */
  --accent-vivid: #e2542b; /* the louder cousin: the one thing to click */
  --accent-soft:#e8d5cb;
  --rule:       #e8e4df;

  --serif: "Fraunces", Iowan Old Style, Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 40rem;      /* comfortable reading width */
  --page:    68rem;      /* outer container            */
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--accent-soft); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

/* ─────────────────────────── top bar ─────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }

.topbar__name {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .01em;
  text-decoration: none;
}

.topbar__nav {
  display: flex;
  gap: 1.5rem;
  font-size: .8rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.topbar__nav a { text-decoration: none; transition: color .2s ease; }
.topbar__nav a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .topbar__nav { display: none; }
}

/* ─────────────────────────── hero ─────────────────────────── */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6.5rem) clamp(1.25rem, 5vw, 3rem) clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.portrait {
  position: relative;
  width: clamp(150px, 22vw, 200px);
  aspect-ratio: 1 / 1.08;
  margin: 0 auto 2.5rem;
  overflow: hidden;
  background: var(--paper-warm);
  border-radius: 2px;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait__hint {
  display: none;
  position: absolute;
  inset: 0;
  place-content: center;
  align-content: center;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px dashed var(--rule);
}
.portrait--empty img { display: none; }
.portrait--empty .portrait__hint { display: grid; }

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7.5vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 1.75rem;
}
.hero__title em { font-style: normal; font-weight: 600; color: var(--accent); }

.caret {
  display: inline-block;
  width: 2px;
  height: .82em;
  margin-left: .06em;
  vertical-align: -.06em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.hero__lede {
  max-width: 34rem;
  margin: 0 auto .5rem;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--ink-soft);
}
.hero__lede a { color: var(--ink); font-weight: 400; }

/* ─────────────────────────── quick links ─────────────────────────── */

.quicklinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
}
.quicklinks a {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: .82rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.quicklinks a:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--paper-warm);
}

/* photo strip — drop images into the slots later */
.filmstrip {
  display: flex;
  gap: .55rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3.5rem;
}
.filmstrip__slot {
  width: clamp(64px, 9vw, 92px);
  aspect-ratio: 1 / 1.15;
  padding: 0;
  background: var(--paper-warm);
  border: none;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s ease;
}
.filmstrip__slot:hover { transform: translateY(-3px); }
.filmstrip__slot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: filter .35s ease;
}
.filmstrip__slot:hover img { filter: grayscale(0); }

.filmstrip__slot--empty {
  border: 1px dashed var(--rule);
  cursor: default;
}
.filmstrip__slot--empty:hover { transform: none; }

/* ─────────────────────────── lightbox ─────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: rgba(28, 24, 20, .88);
  animation: fade-in .2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  width: 2.5rem; height: 2.5rem;
  border: none;
  background: none;
  color: rgba(255, 255, 255, .75);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease;
}
.lightbox__close:hover { color: #fff; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ─────────────────────────── sections ─────────────────────────── */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}

.section__kicker {
  margin: 0 0 .9rem;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 1.5rem;
}

.section__intro,
.section__tags {
  max-width: var(--measure);
  margin: -.5rem 0 2rem;
  color: var(--ink-soft);
}
.section__tags { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-faint); }

/* ─────────────────────────── prose ─────────────────────────── */

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.35rem; color: var(--ink-soft); }
.prose strong { font-weight: 500; color: var(--ink); }
.prose em { font-style: italic; }

.prose__h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 2.5rem 0 .7rem;
}
.prose__h3:first-child { margin-top: 0; }

/* ───────────────────── roles (click to expand) ───────────────────── */

.roles { border-top: 1px solid var(--rule); }

.role { border-bottom: 1px solid var(--rule); }

.role__head {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr auto 1.5rem;
  align-items: baseline;
  gap: .9rem;
  padding: 1.1rem .25rem;
  cursor: pointer;
  list-style: none;
  transition: color .2s ease;
}
.role__head::-webkit-details-marker { display: none; }
.role__head:hover .role__org { color: var(--accent); }

.role__org {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  transition: color .2s ease;
}
.role__title { font-size: .93rem; color: var(--ink-faint); }
.role__date {
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* the little + that turns into a − */
.role__mark {
  position: relative;
  justify-self: end;
  width: 11px;
  height: 11px;
  align-self: center;
}
.role__mark::before,
.role__mark::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: var(--ink-faint);
  transition: transform .25s ease, background .2s ease;
}
.role__mark::after { transform: rotate(90deg); }
.role[open] .role__mark::after { transform: rotate(0deg); }
.role[open] .role__mark::before,
.role[open] .role__mark::after { background: var(--accent); }
.role[open] .role__org { color: var(--accent); }

.role__body {
  margin: 0;
  padding: 0 .25rem 1.35rem;
  max-width: var(--measure);
  color: var(--ink-soft);
  animation: role-in .32s ease both;
}
@keyframes role-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .role__head {
    grid-template-columns: 1fr 1.5rem;
    row-gap: .15rem;
    align-items: center;
  }
  .role__org  { grid-column: 1; }
  .role__title{ grid-column: 1; grid-row: 2; }
  .role__date { grid-column: 1; grid-row: 3; }
  .role__mark { grid-column: 2; grid-row: 1 / span 3; }
}

/* ─────────────────────────── ventures ─────────────────────────── */

.ventures { list-style: none; margin: 0; padding: 0; }

.venture {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  align-items: baseline;
  column-gap: .5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.venture:first-child { border-top: 1px solid var(--rule); }

.venture__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-.15em);
}
.venture__dot--bain     { background: #b4573a; }  /* terracotta */
.venture__dot--diaspora { background: #d19a2e; }  /* amber      */
.venture__dot--whaf     { background: #4a6fa5; }  /* blue       */
.venture__dot--grief    { background: #7b8f6f; }  /* sage       */

.venture__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0;
}
.venture__name a {
  text-decoration: none;
  transition: color .2s ease;
}
.venture__name a:hover { color: var(--accent); }

.venture__arrow {
  display: inline-block;
  margin-left: .15em;
  font-family: var(--sans);
  font-size: .72em;
  color: var(--ink-faint);
  transform: translateY(-.15em);
  transition: transform .2s ease, color .2s ease;
}
.venture__name a:hover .venture__arrow {
  color: var(--accent);
  transform: translate(2px, -.3em);
}
.venture__role {
  grid-column: 2;
  margin: .2rem 0 .6rem;
  font-size: .88rem;
  color: var(--ink-faint);
}
.venture__text {
  grid-column: 2;
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* ─────────────────────────── cards ─────────────────────────── */

/* Flex rather than grid: a short last row centres itself instead of
   leaving empty cells showing through the container background. */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .9rem;
  margin-top: 3rem;
}
.card {
  flex: 1 1 14rem;
  max-width: 17rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem 1.4rem;
}
.card__label {
  margin: 0 0 .5rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
}

/* a card that links out */
.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background .2s ease;
}
.card--link:hover { background: var(--paper-warm); }
.card--link:hover .card__label { color: var(--accent); }

.card__arrow {
  display: inline-block;
  margin-left: .1em;
  font-family: var(--sans);
  font-size: .72em;
  color: var(--ink-faint);
  transform: translateY(-.15em);
  transition: transform .2s ease, color .2s ease;
}
.card--link:hover .card__arrow {
  color: var(--accent);
  transform: translate(2px, -.3em);
}
.card__text { margin: 0; font-size: .93rem; color: var(--ink-soft); line-height: 1.65; }

/* ─────────────────────────── contact ─────────────────────────── */

.contact {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
  text-align: center;
}
.contact__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 .8rem;
}
.contact__text {
  max-width: 30rem;
  margin: 0 auto 2.2rem;
  color: var(--ink-soft);
}
.contact__links { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: .7rem 1.6rem;
  border: 1px solid var(--accent-vivid);
  border-radius: 999px;
  background: var(--accent-vivid);
  color: #fff;
  font-size: .88rem;
  font-weight: 400;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(226, 84, 43, .22);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: #cf441c;
  border-color: #cf441c;
  box-shadow: 0 5px 18px rgba(226, 84, 43, .32);
}
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: var(--paper-warm); color: var(--ink); border-color: var(--ink-faint); }

/* ─────────────────────────── footer ─────────────────────────── */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.75rem clamp(1.25rem, 5vw, 3rem) 3rem;
  border-top: 1px solid var(--rule);
  font-size: .8rem;
  color: var(--ink-faint);
}

/* ─────────────────────────── reveal on scroll ─────────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease, transform .7s ease;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
}
