/* Kerem Yokuva — portfolio. Dark only. */
:root {
  color-scheme: dark;
  --bg: #020B12;
  --surface: #002E3E;
  --teal: #075C7B;
  --pink: #F6386C;
  --plum: #501B2D;
  --text: #EAF2F5;
  --text-dim: #9FB6C0;
  --link: #4FA3C4;
  --line: rgba(7, 92, 123, 0.55);
  --nav-h: 68px;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --font-display: "Unbounded", "Noto Sans KR", system-ui, sans-serif;
  --font-body: "Figtree", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
:lang(ko) body, body:lang(ko) { word-break: keep-all; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
html { scrollbar-color: var(--teal) var(--bg); }
::selection { background: var(--pink); color: var(--bg); }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.125rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.dim { color: var(--text-dim); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--pink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; color: var(--bg); }

/* ---------- Fixed header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(2, 11, 18, 0.82);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1rem; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"], .nav a.is-active { color: var(--text); background: rgba(7, 92, 123, 0.35); }
.langs { display: flex; gap: 2px; padding-left: 10px; margin-left: 6px; border-left: 1px solid var(--line); }
.langs a { font-size: 0.8rem; padding: 6px 8px; letter-spacing: 0.02em; }
.langs a[aria-current="true"] { color: var(--pink); background: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(0,0,0,.6);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.open { display: flex; box-shadow: 0 24px 40px rgba(0,0,0,.6), 0 0 0 100vmax rgba(2, 11, 18, 0.6); }
  .nav a { padding: 14px 6px; border-radius: 0; border-bottom: 1px solid rgba(7,92,123,.3); }
  .langs { border-left: 0; padding: 10px 0 0; margin: 0; gap: 8px; }
  .langs a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: var(--font-body); transition: transform .15s ease, background-color .15s ease; }
.btn-primary { background: var(--pink); color: var(--bg); }
.btn-primary:hover { color: var(--bg); background: #ff5683; transform: translateY(-1px); }
.btn-ghost { border-color: var(--teal); color: var(--text); }
.btn-ghost:hover { background: rgba(7, 92, 123, 0.35); color: var(--text); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 0;
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(80, 27, 45, 0.95), transparent 70%),
    radial-gradient(40% 50% at 82% 55%, rgba(246, 56, 108, 0.28), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg) 92%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.hero h1 { max-width: 14ch; }
.hero-sub { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text-dim); max-width: 46ch; margin-bottom: 28px; }
.phones { position: relative; height: clamp(380px, 50vw, 640px); }
.phones img { position: absolute; width: 42%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)); }
.phones img:nth-child(1) { left: 4%; transform: rotate(-12deg); bottom: 9%; }
.phones img:nth-child(2) { left: 29%; z-index: 2; bottom: 16%; }
.phones img:nth-child(3) { left: 54%; transform: rotate(11deg); bottom: 8%; }
@media (prefers-reduced-motion: no-preference) {
  .phones img { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
  .phones img:nth-child(1) { animation-delay: .1s; }
  .phones img:nth-child(3) { animation-delay: .2s; }
}
@keyframes rise { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }

/* Timeline rail under hero: a real sequence of years */
.rail { position: relative; z-index: 3; border-top: 1px solid var(--line); background: var(--bg); }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(16px, 4vw, 48px); }
.rail li { padding: 22px 0 26px; position: relative; }
.rail li::before { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px var(--bg); }
.rail b { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1; margin-bottom: 6px; }
.rail span { display: block; color: var(--text-dim); font-size: 0.95rem; line-height: 1.35; }
@media (max-width: 560px) { .rail span { font-size: 0.85rem; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phones { height: 78vw; max-height: 460px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 54ch; margin-bottom: 40px; }
.section-head p { color: var(--text-dim); font-size: 1.1rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 260px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-photo { border-radius: var(--r-lg); width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); }
.facts { margin: 22px 0 0; display: grid; gap: 12px; }
.facts div { border-top: 1px solid var(--line); padding-top: 10px; }
.facts dt { color: var(--text-dim); font-size: 0.85rem; }
.facts dd { margin: 0; font-weight: 600; }
.about-text { max-width: 60ch; }
.about-text h2 + p { font-size: 1.25rem; color: var(--text); font-weight: 600; line-height: 1.5; }
@media (min-width: 761px) { .about-grid > div:first-child { position: sticky; top: calc(var(--nav-h) + 24px); } }
.linkedin { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-weight: 700; }
.linkedin svg { width: 22px; height: 22px; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } .about-photo { max-width: 200px; } }

/* Work list: résumé rows, not a card grid. The year column carries the 2012–2026 arc. */
.work { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.work > li { border-bottom: 1px solid var(--line); }
.work a.row { display: grid; grid-template-columns: 4.5rem 72px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 12px; color: inherit; text-decoration: none; border-radius: var(--r-md); transition: background-color .2s ease; }
.work a.row:hover { background: rgba(80, 27, 45, 0.55); }
.row-year { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text-dim); font-variant-numeric: tabular-nums; position: relative; padding-left: 20px; transition: color .2s ease; }
.row-year::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; border: 2px solid var(--teal); transition: background-color .2s ease, border-color .2s ease; }
.work a.row:hover .row-year, .work a.row:focus-visible .row-year { color: var(--text); }
.work a.row:hover .row-year::before, .work a.row:focus-visible .row-year::before { background: var(--pink); border-color: var(--pink); }
.work img { width: 72px; height: 72px; border-radius: 17px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.row-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; margin: 0 0 4px; }
.out-mark { display: none; }
.out-mark svg { width: 16px; height: 16px; vertical-align: -2px; margin-left: 6px; color: var(--text-dim); }
.row-tag { color: var(--text); margin: 0 0 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.meta li { font-size: 0.85rem; color: var(--text-dim); }
.meta li + li::before { content: "·"; margin: 0 8px; color: var(--teal); }
.meta li.rating { color: var(--pink); font-weight: 600; }
.row-go { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-weight: 700; font-size: 0.95rem; white-space: nowrap; transition: color .2s ease; }
.row-go svg { width: 18px; height: 18px; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.work a.row:hover .row-go { color: var(--pink); }
.work a.row:hover .row-go svg { transform: translateX(4px); }
.work a.row-out:hover .row-go svg { transform: translate(3px, -3px); }
@media (max-width: 760px) {
  .work a.row { grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; padding: 16px 4px; }
  .row-year { grid-column: 1 / -1; font-size: 0.95rem; }
  .work img { width: 56px; height: 56px; border-radius: 13px; }
  .row-go { display: none; }
  .row-out .out-mark { display: inline; }
}

/* Experience timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid var(--teal); max-width: 820px; }
.timeline li { position: relative; padding: 0 0 36px; }
.timeline li::before { content: ""; position: absolute; left: -36px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--pink); }
.timeline li:first-child::before { background: var(--pink); }
.tl-when { color: var(--pink); font-weight: 700; font-size: 0.95rem; }
.tl-where { font-family: var(--font-display); font-size: 1.15rem; margin: 4px 0 2px; }
.tl-role { color: var(--text); font-weight: 600; margin: 0 0 6px; }
.tl-what { margin: 0; max-width: 60ch; color: var(--text-dim); }

/* Contact band */
.band { position: relative; overflow: hidden; isolation: isolate; background: var(--plum); border-radius: var(--r-lg); padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.band-year { position: absolute; z-index: -1; right: -0.04em; bottom: -0.22em; font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 18vw, 13rem); line-height: 1; letter-spacing: -0.04em; color: rgba(246, 56, 108, 0.12); pointer-events: none; }
.band h2 { margin-bottom: 8px; }
.band p { margin: 0; color: #e5c9d2; }
@media (max-width: 700px) { .band { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; margin-top: 40px; color: var(--text-dim); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }

/* ---------- Landing page (per game/app) ---------- */
.lp-hero {
  position: relative; overflow: hidden;
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 88px);
  background:
    radial-gradient(55% 65% at 75% 50%, rgba(80, 27, 45, .9), transparent 70%),
    radial-gradient(30% 40% at 78% 52%, rgba(246, 56, 108, .25), transparent 70%),
    linear-gradient(160deg, var(--surface), var(--bg) 85%);
}
.lp-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.lp-icon { width: 88px; height: 88px; border-radius: 21px; margin-bottom: 22px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.lp-hero h1 {
  max-width: 16ch;
}
.lp-tagline { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 2vw, 1.4rem); margin: 0 0 14px; }
.lp-summary { color: var(--text-dim); font-size: 1.1rem; max-width: 52ch; margin-bottom: 28px; }
.lp-device { display: flex; justify-content: center; }
.lp-device img { width: min(320px, 70vw); filter: drop-shadow(0 30px 50px rgba(0,0,0,.6)); }
.lp-device.wide img { width: 100%; max-width: 520px; border-radius: var(--r-md); border: 10px solid #121a20; }
.lp-device.tablet img { width: min(360px, 80vw); border-radius: 26px; border: 12px solid #121a20; }
@media (prefers-reduced-motion: no-preference) {
  .lp-device img { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
}
@media (max-width: 860px) { .lp-grid { grid-template-columns: 1fr; } .lp-device { order: -1; } .lp-icon { display: none; } }

.lp-facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(0, 46, 62, 0.35); }
.lp-facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lp-facts div { padding: 18px 16px; border-left: 1px solid var(--line); }
.lp-facts div:first-child { border-left: 0; }
.lp-facts dt { color: var(--text-dim); font-size: 0.82rem; }
.lp-facts dd { margin: 2px 0 0; font-weight: 700; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px; }
.feature svg { width: 44px; height: 44px; margin-bottom: 16px; }
.feature p { color: var(--text-dim); margin: 0; }

.lp-band { background: var(--plum); }
.lp-band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.08rem; }
.checks svg { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.lp-band-shot { display: flex; justify-content: center; }
.lp-band-shot img { width: min(300px, 70vw); border-radius: 26px; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.lp-band-shot.wide img { width: 100%; max-width: 520px; border-radius: var(--r-md); }
@media (max-width: 860px) { .lp-band .wrap { grid-template-columns: 1fr; } }

/* Screenshots: at most 4 visible (2 for wide shots); more scroll as a carousel. */
.carousel-head { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.carousel-head h2 { margin-bottom: 0; }
.carousel-nav { display: flex; align-items: center; gap: 12px; }
.carousel-nav[hidden] { display: none; }
.car-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--teal); background: var(--surface); color: var(--text); cursor: pointer; transition: background-color .15s ease, opacity .15s ease; }
.car-btn[data-dir="-1"] svg { transform: scaleX(-1); }
.car-btn:hover:not(:disabled) { background: var(--teal); }
.car-btn:disabled { opacity: .35; cursor: default; }
.car-dots { display: flex; gap: 6px; }
.car-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); transition: background-color .2s ease, width .2s ease; }
.car-dots i.on { background: var(--pink); width: 22px; border-radius: 4px; }
.shots { --per: 4; --gap: 16px; display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.shots::-webkit-scrollbar { display: none; }
.shots.wide { --per: 2; }
.shots a { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); scroll-snap-align: start; }
.shots img { display: block; width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.shots.wide img { border-radius: var(--r-sm); }
@media (prefers-reduced-motion: no-preference) { .shots { scroll-behavior: smooth; } }
@media (max-width: 860px) { .shots { --per: 3; } .shots.wide { --per: 1; } }
@media (max-width: 560px) { .shots { --per: 2; --gap: 12px; } .car-dots { display: none; } }

.lp-cta { text-align: center; }
.lp-cta .wrap { max-width: 720px; }
.lp-cta img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; }
.lp-cta .btn-row { justify-content: center; }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 32px; margin-top: 56px; border-top: 1px solid var(--line); }
.pager a { font-weight: 700; text-decoration: none; }

/* ---------- Prose pages (legal, contact) ---------- */
.page-head { padding: clamp(40px, 6vw, 72px) 0 24px; background: linear-gradient(180deg, var(--surface), var(--bg)); }
.page-head p { color: var(--text-dim); font-size: 1.15rem; max-width: 60ch; margin: 0; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.3rem; margin-top: 2.2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose .note { border-left: 3px solid var(--pink); background: rgba(80,27,45,.5); padding: 12px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* Contact form */
.form { display: grid; gap: 18px; max-width: 640px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--teal); border-radius: var(--r-sm); padding: 12px 14px; width: 100%;
}
.form textarea { min-height: 170px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--pink); outline-offset: 1px; border-color: var(--pink); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .row2 { grid-template-columns: 1fr; } }
.form .hp { display: none; }
.form-status { min-height: 1.6em; font-weight: 600; margin: 0; }
.form-status.ok { color: #7fe0b0; }
.form-status.err { color: #ff8fab; }
.contact-alt { margin-top: 28px; color: var(--text-dim); }

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

/* Related titles on landing pages */
.section.related { padding-top: 0; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.related-list a { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; height: 100%; transition: border-color .15s ease; }
.related-list a:hover { border-color: var(--pink); }
.related-list img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.related-list b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.related-list small { display: block; color: var(--text-dim); font-size: .92rem; margin-top: 2px; }
