:root {
  --night: #1c1238;
  --dusk: #3a1a52;
  --glow: #fbeadf;
  --glow-soft: #e8c9d4;
  --ember: #ff8a3d;
  --teal: #4cc3b6;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scrollbar-color: var(--ember) var(--night); }

body {
  margin: 0;
  /* WebGL açılmazsa da gökyüzü kalır. */
  background: linear-gradient(to top, #f2a03c 0%, #e5552c 18%, #c0306e 40%, #55205f 68%, var(--night) 100%) fixed;
  color: var(--glow);
  font: 400 1.0625rem/1.6 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  font-optical-sizing: auto;
  caret-color: var(--ember);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ember); color: var(--night); }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ember); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 20;
  background: var(--glow); color: var(--night); padding: 0.5rem 1rem;
}
.skip:focus { top: 1rem; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
main, .top { position: relative; z-index: 1; }

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.25rem var(--gutter) 2rem;
  background: linear-gradient(rgb(28 18 56 / 0.7), transparent);
}
.mark { font-weight: 600; text-decoration: none; }
.top nav { display: flex; gap: clamp(1rem, 2.4vw, 2rem); }
.top nav a { text-decoration: none; padding: 0.4rem 0; }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--ember); }

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.02em; }

/* ---------- giriş ---------- */
.intro {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem var(--gutter) 4rem;
  max-width: 56rem;
}
.intro h1 { font-size: clamp(3.25rem, 8vw, 6rem); line-height: 0.95; font-variation-settings: 'opsz' 60; }
.intro h1 i { color: var(--glow-soft); }
.statement { margin: 2rem 0 0; max-width: 32ch; font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.45; }
.begin {
  margin-top: 2.5rem; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; font-weight: 600; padding: 0.6rem 0;
}
.begin svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 300ms var(--ease-out); }
.begin:hover svg { transform: translateY(3px); }

/* ---------- basamaklar ---------- */
.step {
  min-height: 92vh;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) 9vh;
}
.step-cap {
  position: relative;
  display: grid; gap: 0.1rem;
  max-width: 22rem;
  font-size: 0.9375rem; line-height: 1.45;
  text-shadow: 0 1px 14px rgb(20 8 36 / 0.65);
}
.step-cap::before {
  content: ''; position: absolute; inset: -3rem -4rem -2.5rem -6rem; z-index: -1;
  background: radial-gradient(closest-side, rgb(24 10 40 / 0.62), transparent);
  pointer-events: none;
}
.step-no { font-variant-numeric: tabular-nums; color: var(--glow-soft); font-size: 0.875rem; margin-bottom: 0.5rem; }
.step h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.05; font-style: italic; margin-bottom: 0.5rem; }
.cap-title { display: none; }
.cap-line, .cap-credit { color: var(--glow-soft); }
.cap-credit { font-size: 0.8125rem; margin-top: 0.35rem; }
.step-open {
  justify-self: start; margin-top: 0.9rem;
  font: inherit; font-weight: 600; color: var(--glow);
  background: none; border: 0; padding: 0.6rem 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-color: var(--ember);
}
.step-open:hover { color: #fff; }
.fallback { display: none; }
html:not(.gl) .fallback { display: block; width: min(320px, 70vw); height: auto; margin-bottom: 1.25rem; }

/* ---------- zirve ---------- */
.summit { padding-top: 30vh; }
.summit section { padding: 5rem var(--gutter); max-width: 72rem; }
h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1; margin-bottom: 2rem; }

.about { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 60ch); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about p { margin: 0 0 1rem; }
.portrait { width: 100%; height: auto; display: block; border-radius: 999px 999px 0 0; }

.show-list { list-style: none; margin: 0; padding: 0; max-width: 60rem; }
.show-list li {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem;
  padding: 1rem 0; border-top: 1px solid rgb(251 234 223 / 0.25);
  font-variant-numeric: tabular-nums;
}
.show-list .y, .show-list .k, .show-list .v { color: var(--glow-soft); }
.show-list .t { font-style: italic; font-size: 1.125rem; }

.contact p { color: var(--glow-soft); margin: 0 0 1rem; }
.mail { font-size: clamp(1.5rem, 4.2vw, 3rem); font-style: italic; overflow-wrap: anywhere; text-decoration-color: var(--ember); }
.insta { display: block; margin-top: 1.25rem; color: var(--glow-soft); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding: 3rem var(--gutter); font-size: 0.8125rem; color: var(--glow-soft);
}

/* ---------- eser penceresi ---------- */
.viewer {
  border: 0; padding: clamp(1rem, 3vw, 2.5rem);
  background: #24173f; color: var(--glow);
  max-width: min(980px, 94vw); max-height: 94dvh;
  box-shadow: 0 30px 90px -20px rgb(0 0 0 / 0.7);
}
.viewer::backdrop { background: rgb(18 8 32 / 0.78); }
.viewer[open] { animation: rise 380ms var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.viewer figure { margin: 0; display: grid; grid-template-columns: auto minmax(14rem, 18rem); gap: 2rem; align-items: end; }
.viewer img { max-height: min(68dvh, 620px); max-width: 100%; width: auto; height: auto; display: block; }
.viewer figcaption { display: grid; font-size: 0.9375rem; }
.viewer .cap-title { display: block; font-size: 1.25rem; }
.viewer-bar { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.5rem; color: var(--glow-soft); font-variant-numeric: tabular-nums; }
.viewer-bar button {
  font: inherit; color: var(--glow); background: none; border: 0; cursor: pointer;
  min-width: 44px; min-height: 44px; display: grid; place-items: center;
}
.viewer-bar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.viewer-bar button:hover { color: var(--ember); }
.viewer-bar .close { margin-left: auto; text-decoration: underline; text-underline-offset: 0.25em; padding: 0 0.5rem; }

@media (max-width: 760px) {
  .top { flex-direction: column; gap: 0.25rem; }
  .step { min-height: 88vh; padding-bottom: 6vh; }
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 220px; }
  .show-list li { grid-template-columns: 3.25rem 1fr; }
  .show-list .v { grid-column: 2; }
  .viewer figure { grid-template-columns: 1fr; gap: 1rem; }
  .viewer img { max-height: 56dvh; }
}
