/* ============================================================
   bogazci.com — personal hub for Yavuz Bogazci
   Plain CSS · self-hosted Inter · static deploy via FTP
   ============================================================ */

@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-VariableFont_opsz,wght.woff2') format('woff2-variations'),
       url('fonts/Inter-VariableFont_opsz,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2-variations'),
       url('fonts/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper:  #FAFAFA;
  --ink:    #1B1E24;
  --ink-2:  rgba(27, 30, 36, 0.60);
  --ink-3:  rgba(27, 30, 36, 0.42);
  --ink-4:  rgba(27, 30, 36, 0.18);
  --red:    #E6361F;
  --font:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--red); color: #fff; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  overflow-x: clip;
}

/* ============================================================
   Hub — single viewport, 2 columns (text · portrait)
   ============================================================ */
.hub {
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  max-width: 1640px;
  margin-inline: auto;
  /* Edge-to-edge on iPhone: background fills the entire display (incl.
     under notch / home indicator), content padding respects the safe
     area so it doesn't disappear behind the hardware cutouts. */
  padding:
    max(clamp(40px, 6vh, 72px), env(safe-area-inset-top))
    max(clamp(32px, 6vw, 96px), env(safe-area-inset-right))
    max(clamp(40px, 6vh, 72px), env(safe-area-inset-bottom))
    max(clamp(32px, 6vw, 96px), env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr clamp(300px, 30vw, 440px);
  grid-template-rows: auto auto 1fr auto;
  column-gap: clamp(40px, 5vw, 72px);
  row-gap: clamp(24px, 3vh, 40px);
}

/* HEADER — monogram · name · sub */
.hub__header {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 36px);
}

.monogram {
  display: flex;
  align-items: center;
  gap: 12px;
}
.monogram__mark {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.025em;
  line-height: 1;
}
.monogram__url {
  font-size: 13px;
  color: var(--ink-2);
  font-style: italic;
}

.name {
  font-weight: 700;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 14ch;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.kicker {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.45;
  font-weight: 400;
  max-width: 56ch;
}
.kicker em.practitioner {
  font-style: italic;
  font-weight: 500;
  color: var(--red);
}
.kicker strong { font-weight: 600; }

/* PORTRAIT — right column, spans 2 rows.
   Width is explicit (calc with inset clamp); height is derived from
   aspect-ratio. NO align-self: stretch, otherwise both dimensions would be
   determined by the grid and the 380:460 aspect would be ignored, which
   stretches the box and distorts the framed portrait.
   align-self: start keeps it top-aligned inside the spanned rows. */
.hub__portrait {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  justify-self: end;
  width: calc(100% - clamp(20px, 2.5vw, 56px));
  aspect-ratio: 380 / 460;
  max-height: 600px;
  overflow: hidden;
  background: var(--ink-4);
}
.hub__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* MAIN — bio */
.hub__main {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 3vw, 48px);
  align-content: start;
}
.bio {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.7;
  color: var(--ink);
}
.bio--quiet { color: var(--ink-2); }
.book-title {
  font-weight: 700;
  letter-spacing: -0.012em;
}
.book-title .red { color: var(--red); }

/* PROPERTIES — two prominent cards routing onward */
.hub__properties {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(8px, 2vh, 24px);
}

.property {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vh, 16px);
  padding: clamp(22px, 2.6vw, 36px);
  background: #fff;
  border: 1px solid var(--ink-4);
  transition:
    border-color 0.3s ease,
    transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.3s ease;
}
.property:hover,
.property:focus-visible {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(27, 30, 36, 0.22);
  outline: none;
}
.property__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.property__title {
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
}
.property__title--book .red { color: var(--red); }
.property__desc {
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.55;
  color: var(--ink-2);
  flex: 1 0 auto;
}
.property__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-top: 4px;
}
.property__arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.property:hover .property__arrow,
.property:focus-visible .property__arrow {
  transform: translateX(6px);
  color: var(--red);
}

/* FOOTER — links · copyright */
.hub__nav {
  grid-column: 1 / -1;
  grid-row: 4;
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid var(--ink-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 32px);
  flex-wrap: wrap;
}
.links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 24px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1;
  color: var(--ink);
  transition: color 0.25s;
}
.links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.links a:hover,
.links a:focus-visible { color: var(--red); outline: none; }
.links a:hover::after,
.links a:focus-visible::after { transform: scaleX(1); }

.links svg { display: block; }

/* IAMYB wordmark: IAM light, YB bold (logo convention) */
.iamyb { letter-spacing: -0.02em; }
.iamyb .iam { font-weight: 300; }
.iamyb .yb  { font-weight: 700; }

.colophon {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}
.colophon a:hover { color: var(--red); }

/* ============================================================
   Responsive — collapse portrait under text on mobile
   ============================================================ */
@media (max-width: 900px) {
  /* Switch the hub to a simple flex column on mobile. Grid template-rows
     + grid-row overrides created edge-cases where the portrait kept its
     desktop row span (rows 1–2) and overlapped the bio. Flex column is
     bulletproof: items stack in DOM order. */
  .hub {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
    column-gap: 0;
    gap: clamp(24px, 4vh, 40px);
  }
  .hub__header,
  .hub__portrait,
  .hub__main,
  .hub__properties,
  .hub__nav {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }
  .hub__properties {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 0;
  }
  .hub__portrait {
    /* Defensive reset: nuke every base property that has historically
       collided with the <img> sizing in flex column. overflow:visible
       so even if the figure box ends up shorter than the img, the
       image is still visible at its real proportions. */
    display: block !important;
    aspect-ratio: auto !important;
    max-height: none !important;
    height: auto !important;
    width: 320px !important;
    max-width: calc(100% - 32px) !important;
    margin: 0 auto !important;
    overflow: visible !important;
    background: transparent !important;
    align-self: center;
  }
  .hub__portrait img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: cover;
    object-position: center center;
  }
  .hub__main {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hub {
    padding: clamp(28px, 5vh, 48px) clamp(18px, 5vw, 24px);
  }
  .name {
    font-size: clamp(36px, 11vw, 56px);
    letter-spacing: -0.03em;
    max-width: 100%;
  }
  .kicker {
    font-size: 15px;
    line-height: 1.5;
  }
  .signature__text {
    font-size: 17px;
  }
  .hub__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .links {
    column-gap: 22px;
    row-gap: 0;
  }
  .colophon {
    white-space: normal;
    line-height: 1.5;
  }
}

@media (max-width: 380px) {
  .name { font-size: clamp(30px, 10vw, 40px); }
  .kicker { font-size: 14.5px; }
}

/* Entrance — quiet fade-up */
.hub__header > *,
.hub__portrait,
.hub__main > *,
.hub__properties > *,
.hub__nav > * {
  opacity: 0;
  transform: translateY(8px);
  animation: fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.monogram        { animation-delay: 0.05s; }
.name            { animation-delay: 0.15s; }
.kicker          { animation-delay: 0.28s; }
.hub__portrait   { animation-delay: 0.20s; }
.bio:first-of-type    { animation-delay: 0.42s; }
.bio:nth-of-type(2)   { animation-delay: 0.52s; }
.property:nth-of-type(1) { animation-delay: 0.68s; }
.property:nth-of-type(2) { animation-delay: 0.78s; }
.links           { animation-delay: 0.90s; }
.colophon        { animation-delay: 0.98s; }

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .hub__header > *, .hub__portrait, .hub__main > *, .hub__properties > *, .hub__nav > * {
    opacity: 1; transform: none;
  }
}

/* ============================================================
   Legal pages — imprint, privacy
   Scrollable text layout, same typography system as the hub.
   ============================================================ */
.legal-body {
  display: block;
}
.legal {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding:
    max(clamp(32px, 5vh, 64px), env(safe-area-inset-top))
    max(clamp(24px, 5vw, 48px), env(safe-area-inset-right))
    max(clamp(56px, 8vh, 96px), env(safe-area-inset-bottom))
    max(clamp(24px, 5vw, 48px), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vh, 48px);
}

.legal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal__header .monogram { display: flex; }
.legal__back {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.25s;
}
.legal__back:hover,
.legal__back:focus-visible { color: var(--red); outline: none; }

.legal__article {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vh, 32px);
}
.legal__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.legal__title {
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.legal__lede {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

.legal__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: clamp(16px, 2vh, 24px);
  border-top: 1px solid var(--ink-4);
}
.legal__section h2 {
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.legal__section p,
.legal__section li {
  font-size: clamp(14px, 1vw, 15.5px);
  line-height: 1.7;
  color: var(--ink);
  max-width: 70ch;
}
.legal__section a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-4);
  text-underline-offset: 3px;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.legal__section a:hover,
.legal__section a:focus-visible {
  color: var(--red);
  text-decoration-color: var(--red);
  outline: none;
}
.legal__section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal__section ul li {
  padding-left: 18px;
  position: relative;
}
.legal__section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 8px;
  height: 1px;
  background: var(--ink-3);
}
.legal__section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  background: rgba(27, 30, 36, 0.06);
  border-radius: 3px;
}
.legal__button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.legal__button:hover,
.legal__button:focus-visible {
  background: var(--red);
  border-color: var(--red);
  outline: none;
  transform: translateY(-1px);
}

.legal__footer {
  padding-top: clamp(24px, 3vh, 32px);
  border-top: 1px solid var(--ink-4);
}
.legal__footer .colophon {
  white-space: normal;
  line-height: 1.6;
}
.legal__footer .colophon a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   Consent banner — opt-in for analytics
   ============================================================ */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding:
    clamp(12px, 2vw, 20px)
    max(clamp(16px, 4vw, 32px), env(safe-area-inset-right))
    max(clamp(16px, 2vw, 20px), env(safe-area-inset-bottom))
    max(clamp(16px, 4vw, 32px), env(safe-area-inset-left));
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 -8px 32px -16px rgba(0, 0, 0, 0.3);
  animation: consent-slide-up 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.consent-banner__inner {
  max-width: 1640px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}
.consent-banner__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  grid-column: 1;
}
.consent-banner__desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(250, 250, 250, 0.75);
  grid-column: 1;
  max-width: 64ch;
}
.consent-banner__desc a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: rgba(250, 250, 250, 0.4);
  text-underline-offset: 3px;
}
.consent-banner__desc a:hover { text-decoration-color: var(--red); color: var(--red); }
.consent-banner__actions {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  gap: 10px;
  align-items: center;
}
.consent-banner__btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 10px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.consent-banner__btn--deny {
  background: transparent;
  color: rgba(250, 250, 250, 0.75);
  border-color: rgba(250, 250, 250, 0.25);
}
.consent-banner__btn--deny:hover,
.consent-banner__btn--deny:focus-visible {
  color: var(--paper);
  border-color: var(--paper);
  outline: none;
}
.consent-banner__btn--accept {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.consent-banner__btn--accept:hover,
.consent-banner__btn--accept:focus-visible {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  outline: none;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .consent-banner__inner {
    grid-template-columns: 1fr;
  }
  .consent-banner__actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-end;
  }
}

@keyframes consent-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
