/* samibakirci.com */

:root {
  --bg: #fbfaf7;
  --text: #27251f;
  --muted: #6f6a60;
  --faint: #9a948a;
  --rule: #e6e2d9;
  --link: #58534a;
  --underline: rgba(88, 83, 74, 0.32);
  --accent: #3f7d60;
  --tile: #eeebe4;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --text: #ebe7de;
    --muted: #a7a195;
    --faint: #7b756a;
    --rule: #2d2b27;
    --link: #cdc7bb;
    --underline: rgba(205, 199, 187, 0.3);
    --accent: #86c3a3;
    --tile: #211f1c;
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (max-width: 540px) {
  body { font-size: 18px; }
}

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

p { margin: 0 0 1.1rem; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover { color: var(--text); text-decoration-color: currentColor; }

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

h1, h2, h3 { font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }

h1 { font-size: 2.15rem; margin: 0 0 2.4rem; }

h2 { font-size: 1.3rem; font-weight: 600; margin: 3.4rem 0 1.05rem; }

em { font-style: italic; }

/* ---------------------------------------------------------------- layout */

.home { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }

.copy {
  width: 100%;
  max-width: 37rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 4rem;
}

/* Phones and tablets: photo 00 opens the page as a banner. */
.visual {
  order: -1;
  position: relative;
  margin: 0;
  height: 44vh;
  max-height: 440px;
  min-height: 260px;
  overflow: hidden;
  background: var(--tile);
}

.visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.visual figcaption {
  position: absolute;
  left: 1.25rem;
  bottom: 0.9rem;
  margin: 0;
  font: 12px/1.4 var(--sans);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1099px) {
  .copy { padding-top: 2.8rem; }
}

@media (min-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1fr) 36vw; }
  .copy { padding: 6.5rem 2.5rem 5rem; }
  .visual {
    order: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    max-height: none;
  }
  .visual img { object-position: 50% 60%; }
  .visual figcaption { bottom: 1.1rem; }
}

/* ------------------------------------------------------------------- bio */

.bio-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.4rem;
  font: 13px/1 var(--sans);
  color: var(--muted);
}

.bio-bar > span { padding-bottom: 0.7rem; }

.bio-switch { display: flex; gap: 0.95rem; }

.bio-switch button {
  font: inherit;
  color: var(--faint);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  padding: 0 0 0.7rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.bio-switch button:hover { color: var(--text); }

.bio-switch button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--text); }

figure.inline { margin: 1.8rem 0; }

figure.inline img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--tile);
}

figcaption {
  margin-top: 0.55rem;
  font: 13px/1.45 var(--sans);
  color: var(--muted);
}

/* ----------------------------------------------------------------- notes */

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.notes li {
  position: relative;
  break-inside: avoid;
  padding-left: 1.05rem;
  margin: 0 0 0.5rem;
}

.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--text);
}

@media (max-width: 540px) {
  .notes { columns: 1; }
}

/* ------------------------------------------------------------------ rows */

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

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  text-decoration: none;
}

.row .sub {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.86em;
  color: var(--muted);
}

.row .when, .row time {
  flex: none;
  font: 14px/1.4 var(--sans);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

a.row > span:first-child { transition: color 0.15s ease; }

a.row:hover > span:first-child {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--underline);
}

a.row:hover .sub { text-decoration: none; }

.after {
  margin: 1rem 0 0;
  font: 14px/1.55 var(--sans);
  color: var(--muted);
}

.after .dot { margin: 0 0.3rem; color: var(--faint); }

/* --------------------------------------------------------------- gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.gallery a {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--tile);
  cursor: zoom-in;
}

.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
}

.gallery a:hover img { transform: scale(1.035); }

@media (max-width: 420px) {
  .gallery { gap: 4px; }
}

/* ------------------------------------------------------------- lightbox */

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0f0e0d;
  color: #f1ede6;
}

.lightbox[open] { display: grid; place-items: center; }

.lightbox::backdrop { background: transparent; }

.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 7rem);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  max-height: calc(100dvh - 7rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox figcaption { color: rgba(241, 237, 230, 0.75); text-align: center; }

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: rgba(241, 237, 230, 0.7);
  font: 300 2.4rem/1 var(--sans);
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.lightbox button:hover { color: #fff; }

.lb-close { top: 0.6rem; right: 0.6rem; font-size: 2rem !important; }
.lb-prev { left: 0.4rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.4rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox figure { max-width: 100vw; }
  .lb-prev, .lb-next { top: auto; bottom: 0.6rem; transform: none; }
}

/* ------------------------------------------------------------ elsewhere */

.elsewhere { margin-top: 0; }

.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0;
  padding: 0;
  font: 14px/1.6 var(--sans);
}

/* ---------------------------------------------------------- note pages */

.page {
  max-width: 37rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

.back {
  display: inline-block;
  margin-bottom: 3.2rem;
  font: 14px/1 var(--sans);
  color: var(--muted);
  text-decoration: none;
}

.back:hover { color: var(--text); }

.page h1 { margin-bottom: 1.8rem; }

.page h2 { font-size: 1.2rem; margin: 2.4rem 0 0.8rem; }

.page ul { padding-left: 1.1rem; margin: 0 0 1.2rem; }

.page li { margin: 0 0 0.55rem; padding-left: 0.2rem; }

.page li::marker { color: var(--faint); }

.page blockquote {
  margin: 1.6rem 0;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

.page figure { margin: 2rem 0; }

.page figure img { display: block; width: 100%; height: auto; background: var(--tile); }

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

.page .end { margin-top: 3.4rem; }

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

.lost { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }

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