:root {
  --bg: #ffffff;
  --surface: #f6f4f3;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e8e5e3;
  --accent: #c8102e;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.page { max-width: 1040px; margin-inline: auto; padding-inline: 28px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* Floating dock (appears after scrolling) */
.dock {
  position: fixed; left: 50%; bottom: 22px; z-index: 10;
  display: flex; gap: 2px; padding: 5px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.dock.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.dock a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; transition: color .15s, background .15s;
}
.dock a:hover { color: var(--ink); }
.dock a.active { color: var(--accent); background: var(--surface); }

/* Intro */
.intro {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(48px, 9vw, 110px) 0 clamp(64px, 9vw, 110px);
  animation: rise .7s ease both;
}
h1 {
  font-size: clamp(3rem, 8.5vw, 5.8rem);
  line-height: .98; font-weight: 700; letter-spacing: -0.05em;
  margin-bottom: 32px;
}
.red { color: var(--accent); }
.bio { font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.5; letter-spacing: -0.015em; max-width: 25em; }
.bio + .bio { margin-top: 14px; }
.bio strong { font-weight: 600; }
.inline { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.inline:hover { text-decoration-thickness: 2px; }

.links { display: flex; gap: 24px; margin-top: 36px; font-weight: 600; }
.links a { text-decoration: none; border-bottom: 2px solid var(--line); padding-bottom: 2px; transition: border-color .15s, color .15s; }
.links a:first-child { border-bottom-color: var(--accent); }
.links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background: var(--surface);
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Blocks */
.block { padding: 56px 0 24px; border-top: 1px solid var(--line); }
h2 { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 24px; }

/* Game card */
.game {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 400px; border-radius: 22px; color: #f4ece9;
  background:
    radial-gradient(60% 70% at 82% 18%, rgba(200, 16, 46, .28), transparent 70%),
    linear-gradient(180deg, #170a0c 0%, #0a0506 100%);
  display: flex; align-items: flex-end;
  transition: box-shadow .3s;
}
.game:hover { box-shadow: 0 18px 50px rgba(200, 16, 46, .18); }
.game-text { position: relative; z-index: 1; padding: clamp(28px, 5vw, 56px); max-width: 50%; }
.meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(244, 236, 233, .6);
}
.meta .hot { color: #ff4d62; }
.meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 14px 3px 0; border-radius: 50%; background: rgba(244, 236, 233, .4); vertical-align: middle; }
.game h3 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); line-height: .98; font-weight: 700; letter-spacing: -0.045em; }
.desc { margin-top: 16px; color: rgba(244, 236, 233, .75); font-size: 1.05rem; line-height: 1.5; }
.soon { margin-top: 22px; font-size: .85rem; color: rgba(244, 236, 233, .45); }
.shot {
  position: absolute; right: 0; top: 0; z-index: 0;
  width: 55%; height: 100%; object-fit: cover; object-position: 58% 55%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
  mask-image: linear-gradient(to right, transparent, #000 45%);
  opacity: .9;
}

/* Projects */
.rows { list-style: none; padding: 0; margin-top: 28px; }
.row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.row p { color: var(--muted); font-size: 1rem; }
.status { font-size: .95rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.status.plain { color: var(--muted); font-weight: 500; }

/* About / contact */
.about { max-width: 34em; padding-bottom: 32px; }
.about p + p { margin-top: 1.1em; }

.mail {
  display: inline-block; margin-top: 18px;
  font-size: clamp(1.3rem, 4.5vw, 1.8rem); font-weight: 600; letter-spacing: -0.03em;
  color: var(--accent); text-decoration: none; border-bottom: 2px solid var(--accent);
}
.mail:hover { opacity: .75; }

.socials { margin-top: 28px; color: var(--muted); font-size: 1rem; }
.socials a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.socials a:hover { color: var(--accent); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }

.foot {
  display: flex; margin-bottom: 70px; justify-content: space-between;
  margin-top: 40px; padding-block: 28px 44px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .92rem;
}

@media (max-width: 800px) {
  .intro { grid-template-columns: 1fr; }
  .portrait { order: -1; max-width: 300px; aspect-ratio: 1; border-radius: 24px; }
  .portrait img { object-position: 50% 30%; }
}

@media (max-width: 700px) {
  .game { min-height: 430px; align-items: flex-start; }
  .game-text { max-width: 100%; }
  .shot {
    width: 100%; height: 55%; top: auto; bottom: 0; object-position: 58% 50%;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%);
    mask-image: linear-gradient(to bottom, transparent, #000 45%);
  }
}

@media (max-width: 600px) {
  .page { padding-inline: 20px; }
  .row { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { animation: none; }
}
