/* =========================================================
   ENES BOLAT — Portfolio
   Vanilla CSS · shared across all pages
   Theme: dark "studio" — neutral charcoal, warm bone text,
   one restrained green accent, mono labels for tech metadata.
   ========================================================= */

:root {
  --bg:        #0E0F11;
  --surface:   #16181B;
  --surface-2: #1C1F23;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.16);
  --text:      #ECE8E1;   /* warm bone */
  --muted:     #8B9099;
  --faint:     #5B606A;
  --accent:    #6FE79B;   /* refined green — used sparingly */
  --accent-dim:rgba(111,231,155,.13);
  --gold:      #E6B84C;   /* highlight for Steam games in the Games view */

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);

  /* single type family across the whole site */
  --font-display: "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Hanken Grotesk", system-ui, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* offset anchor targets so the sticky header doesn't cover them (just below the 68px header) */
:where(#about, #experience, #work, #awards, #contact) { scroll-margin-top: 72px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: .002em;
  overflow-x: hidden;
  position: relative;
}

/* subtle film-grain overlay for atmosphere */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .015;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* interactive starfield — sits behind all content */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block; }

/* back-to-top button */
#to-top {
  position: fixed; right: clamp(16px, 3vw, 30px); bottom: clamp(16px, 3vw, 30px); z-index: 200;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(14,15,17,.7); backdrop-filter: blur(6px);
  color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
#to-top.show { opacity: 1; transform: none; pointer-events: auto; }
#to-top:hover { background: var(--accent); color: #0b0c0d; border-color: var(--accent); box-shadow: 0 0 18px rgba(111,231,155,.4); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.05rem;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: .5em;
}
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.nav-links a {
  font-family: var(--font-mono);
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); transition: color .25s var(--ease);
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(111,231,155,.35);
}
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent);
  box-shadow: 0 0 6px rgba(111,231,155,.4);
}
/* language switch (EN / TR) */
.nav-links { margin-left: auto; }                 /* keep links + lang grouped at the right */
.lang-switch { display: inline-flex; align-items: center; gap: 3px; margin-left: 16px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang-btn {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em;
  padding: 4px 9px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--accent); color: #0b0c0d; }

/* ============ HERO (cinematic, parallax) ============ */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh; display: flex; align-items: center;
  margin-top: -68px; padding-top: 68px;          /* sit under the sticky header */
}
/* parallax background */
.hero-bg { position: absolute; inset: -8%; z-index: 0; will-change: transform; }
.hero-bg img, .hero-bg .hero-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
/* banner size: increase the scale below to enlarge the splash art (1 = fit) */
.hero-bg img { object-fit: contain; object-position: right center; transform: translateX(8%) scale(1.20); transform-origin: right center; }
.hero-ph {
  display: grid; place-items: center; color: var(--faint);
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  background:
    radial-gradient(120% 90% at 70% 20%, rgba(111,231,155,.10), transparent 55%),
    radial-gradient(80% 80% at 20% 90%, rgba(111,231,155,.06), transparent 60%),
    linear-gradient(135deg, #15191d, #0d0f11 60%, #0a0b0d);
}
/* readability veil — darker on the left where the text lives, and at the bottom */
.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,9,10,.92) 0%, rgba(8,9,10,.72) 32%, rgba(8,9,10,.18) 62%, rgba(8,9,10,.05) 100%),
    linear-gradient(0deg, rgba(8,9,10,.85) 0%, transparent 32%),
    linear-gradient(180deg, rgba(8,9,10,.6) 0%, transparent 22%);
}

/* left social rail */
.hero-social {
  display: flex; flex-flow: row wrap; gap: 12px; margin-top: 26px;
}
.hero-social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(14,15,17,.5); backdrop-filter: blur(4px);
  color: var(--muted); transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.hero-social a:hover { color: #0b0c0d; background: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.hero-social svg { width: 17px; height: 17px; fill: currentColor; }
.hero-social .ico-txt { font-family: var(--font-mono); font-size: .62rem; font-weight: 700; letter-spacing: .02em; }

/* main content — left-aligned, clearing the social rail */
.hero-inner { position: relative; z-index: 3; width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.hero .eyebrow { margin-bottom: 1.4em; }
.hero h1 {
  font-size: clamp(3.2rem, 11vw, 8.5rem); font-weight: 800; line-height: .92;
  text-transform: uppercase; letter-spacing: -.02em; margin: 0 0 .32em;
}
.hero-tag {
  font-size: clamp(1.3rem, 3.2vw, 2.1rem); font-weight: 700; line-height: 1.12;
  text-transform: uppercase; letter-spacing: -.01em; margin-bottom: .9em;
}
.hero-tag .accent { color: var(--accent); }
.hero .lead { max-width: 48ch; color: var(--text); font-size: clamp(1rem, 1.7vw, 1.15rem); opacity: .9; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2em; }
.btn-hero {
  display: inline-flex; align-items: center; gap: .7em;
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); border: 1px solid var(--accent); border-radius: 6px; padding: 15px 26px;
  background: rgba(111,231,155,.06); transition: all .3s var(--ease);
}
.btn-hero span { transition: transform .3s var(--ease); }
.btn-hero:hover { background: var(--accent); color: #0b0c0d; box-shadow: 0 0 22px rgba(111,231,155,.4); }
.btn-hero:hover span { transform: translateX(4px); }
/* Download CV — gold variant */
.btn-cv { color: var(--gold); border-color: var(--gold); background: rgba(230,184,76,.07); }
.btn-cv:hover { background: var(--gold); color: #0b0c0d; box-shadow: 0 0 22px rgba(230,184,76,.4); }
.btn-cv:hover span { transform: translateY(3px); }

/* decorative real-time render panel */
.hero-stats {
  position: absolute; top: clamp(92px, 13vh, 140px); right: clamp(16px, 3vw, 50px); z-index: 3;
  min-width: 210px; padding: 14px 16px; border-radius: 10px;
  background: rgba(12,14,16,.55); border: 1px solid var(--line-2); backdrop-filter: blur(8px);
  font-family: var(--font-mono);
}
.hero-stats-head { display: flex; align-items: center; gap: .6em; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.hero-stats-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.hero-stats dl { display: grid; gap: 6px; }
.hero-stats dl > div { display: flex; justify-content: space-between; gap: 20px; font-size: .72rem; }
.hero-stats dt { color: var(--faint); letter-spacing: .12em; text-transform: uppercase; }
.hero-stats dd { color: var(--text); }
.hero-stats dd.accent { color: var(--accent); }

/* bottom bar */
.hero-bottom { position: absolute; bottom: clamp(16px, 3vh, 32px); left: 0; right: 0; z-index: 3; max-width: var(--maxw); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-inline: var(--pad); }
.scroll-hint { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.scroll-hint:hover { color: var(--accent); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips .tag { background: rgba(14,15,17,.5); backdrop-filter: blur(4px); }

/* wide screens: nudge the hero text a bit left (banner sits on the right) */
@media (min-width: 1200px) {
  .hero-inner, .hero-bottom { transform: translateX(-42px); }
}

@media (max-width: 860px) {
  .hero-stats { display: none; }
  .hero-bottom .scroll-hint { display: none; }
}

/* mobile: drop the wide splash art — it doesn't crop well in portrait */
@media (max-width: 760px) {
  .hero-bg, .hero-veil { display: none; }
}

.hero .meta {
  margin-top: 2.4em; display: flex; flex-wrap: wrap; gap: 10px;
}
.tag {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 7px 13px;
}
.tag.live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tag.live::before { content: "● "; font-size: .7em; }

/* ---------- section heading ---------- */
/* smaller top padding so anchored sections don't leave a big gap under the header; keep the larger bottom rhythm */
.section { padding-block: clamp(20px, 3vw, 40px) clamp(46px, 8vw, 92px); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 38px;
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }

/* ---------- category filter tabs ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 42px; }
.filter-btn {
  font-size: .82rem; font-weight: 600; letter-spacing: .03em;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
  transition: color .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.filter-btn.active {
  color: #0b0c0d; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 14px rgba(111,231,155,.5), 0 0 30px rgba(111,231,155,.25);
}

/* ---------- project grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 30px); }
.card.feature { grid-column: 1 / -1; }
.card[hidden] { display: none; }

/* "view all work" tile — image collage background (shown only in Featured view) */
.all-tile {
  position: relative; overflow: hidden;
  align-self: start;                       /* banner height, top of the cell */
  aspect-ratio: 16 / 10;                   /* banner-sized, like a card cover */
  display: grid; place-items: center;
  text-align: center; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 14px;
  color: var(--text); font: inherit; transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.all-tile[hidden] { display: none; }
.all-tile:hover { border-color: var(--accent); transform: translateY(-2px); }

.all-tile-collage {
  position: absolute; inset: 0; z-index: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
}
.all-tile-collage img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: blur(5px) saturate(.85); transform: scale(1.15);  /* blur for legibility; scale hides blurred edges */
}
/* dark veil so the label stays readable; lifts a little on hover */
.all-tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(10,11,13,.78), rgba(10,11,13,.86));
  transition: background .3s var(--ease);
}
.all-tile:hover::after { background: linear-gradient(to bottom, rgba(10,11,13,.62), rgba(10,11,13,.74)); }

.all-tile-body {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; white-space: nowrap;
  padding: 16px 26px; border-radius: 18px;
  background: rgba(12,13,15,.5);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.all-tile .all-tile-arrow { font-size: 2rem; color: var(--accent); transition: transform .25s var(--ease); text-shadow: 0 0 14px rgba(111,231,155,.6); }
.all-tile:hover .all-tile-arrow { transform: translateX(4px); }
.all-tile .all-tile-text { font-size: 1.2rem; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.all-tile-body .label { text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.grid-empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 1rem; }
.grid-empty[hidden] { display: none; }
.card .desc { color: var(--muted); font-size: .92rem; line-height: 1.5; padding: 8px 4px 0; max-width: 50ch; }
.ph.banner { aspect-ratio: 21 / 9 !important; }

/* "Steam game" highlight card — gold-framed, banner left / info right (same in every view) */
.card-wide {
  grid-column: auto; order: -1;
  display: flex; align-items: stretch;
  background: var(--surface); border: 1px solid var(--gold); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--gold), 0 0 22px rgba(230,184,76,.20);
  transition: opacity .6s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card-wide:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--gold), 0 0 30px rgba(230,184,76,.42); }
.card-wide .wide-body h3 a { color: inherit; text-decoration: none; }
.card-wide .wide-banner { flex: 0 0 42%; position: relative; overflow: hidden; display: block; }
.card-wide .wide-banner img, .card-wide .wide-banner .ph { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: auto !important; transition: transform .5s var(--ease); }
.card-wide:hover .wide-banner img, .card-wide:hover .wide-banner .ph { transform: scale(1.04); }
.card-wide .wide-body { flex: 1 1 auto; min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; }
.card-wide .wide-body .label { display: inline-flex; align-items: center; gap: .5em; align-self: flex-start; }
.card-wide .wide-body .label .chip-ic { color: var(--gold); }
.card-wide .wide-body h3 { font-size: 1.05rem; margin: .35em 0 .25em; transition: color .25s var(--ease); }
.card-wide:hover .wide-body h3 { color: var(--gold); }
.card-wide .wide-body .desc { color: var(--muted); font-size: .82rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-wide .wide-actions { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; justify-content: flex-start; flex-wrap: wrap; }
.card-wide .wide-actions .btn { padding: 8px 12px; font-size: .68rem; letter-spacing: .08em; display: inline-flex; align-items: center; gap: .5em; }

.card { display: block; }
.card figure {
  position: relative; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.card .ph, .card figure img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.card.feature .ph, .card.feature figure img { aspect-ratio: 21 / 9; }

.ph {  /* image placeholder — replace with <img> */
  display: grid; place-items: center;
  background:
    radial-gradient(120% 80% at 30% 10%, rgba(111,231,155,.10), transparent 55%),
    linear-gradient(135deg, #202428, #14171a 60%, #0f1113);
  color: var(--faint);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
}

.card figure::after {  /* hover scrim */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.card:hover figure::after { opacity: 1; }
.card figure img, .card figure .ph { transition: transform .6s var(--ease); }
.card:hover figure img, .card:hover figure .ph { transform: scale(1.04); }

.card .cap { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 16px 4px 4px; }
.card .cap h3 { font-size: 1.25rem; transition: color .25s var(--ease); }
.card:hover .cap h3 { color: var(--accent); }
.card .cap .label { white-space: nowrap; }
.arrow { transition: transform .3s var(--ease); display: inline-block; }
.card:hover .arrow { transform: translate(3px,-3px); }

/* green hover — same accent treatment as the "view all" tile */
.card { transition: transform .25s var(--ease); }
.card:hover { transform: translateY(-3px); }
.card figure { transition: transform .6s var(--ease), border-color .25s var(--ease); }
.card:hover figure { border-color: var(--accent); }

/* ---------- about teaser (home) ---------- */
.about-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px,4vw,60px); align-items: end; }
.about-teaser p { font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-family: var(--font-display); font-weight: 300; line-height: 1.32; letter-spacing: -.01em; }
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 13px 22px;
  color: var(--text); transition: all .3s var(--ease);
}
.btn:hover { background: var(--accent); color: #0b0c0d; border-color: var(--accent); }
.btn.ghost:hover { transform: translateY(-2px); }

/* =========== PROJECT DETAIL PAGE =========== */
.back { display: inline-flex; gap: .5em; align-items: center; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 36px; }
.back:hover { color: var(--accent); }

.proj-head { padding: 30px 0 44px; display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px,4vw,56px); align-items: end; }
.proj-head h1, .proj-title { font-size: clamp(2.4rem, 7vw, 5rem); font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; }
.proj-head .lead { color: var(--muted); margin-top: 1em; max-width: 50ch; }

.spec { border-top: 1px solid var(--line); }
.spec dl { display: grid; grid-template-columns: auto 1fr; gap: 0 22px; }
.spec dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec dd { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: right; font-size: .95rem; }

.media { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.media .ph { aspect-ratio: 16/9; }
.media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

figure.fig { margin: 0; }
figure.fig figcaption { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--faint); margin-top: 12px; }

.prose { max-width: none; margin: clamp(40px,7vw,80px) 0; }
.prose p + p { margin-top: 1.1em; }
.prose h3 {
  font-size: 1.4rem; margin-bottom: .55em; color: var(--accent); letter-spacing: -.01em;
  display: flex; align-items: center; gap: .6em;
}
.prose h3::before {
  content: ""; flex: none; width: 16px; height: 3px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 12px rgba(111,231,155,.55);
}

/* sketchfab / 3d embed */
.embed-3d { margin: clamp(40px,7vw,80px) 0; }
.embed-3d .frame {
  position: relative; aspect-ratio: 16/9; width: 100%;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #1a1e22, #0f1113);
}
.embed-3d iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-3d .placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.embed-3d .placeholder .label { color: var(--muted); }

/* ArtStation / raw iframe embeds inside a video grid — force into a 16:9 box
   (their inline width/height 1920x1080 would otherwise blow up the page) */
.video-grid figure.fig {
  position: relative; aspect-ratio: 16 / 9; margin: 0;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #1a1e22, #0f1113);
}
.video-grid figure.fig iframe,
.video-grid figure.fig video {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0;
}

/* generic 16:9 embed (YouTube / Sketchfab / model-viewer) — same look as .embed-3d */
.media-embed { margin: clamp(40px,7vw,80px) 0; }
.media-embed .frame {
  position: relative; aspect-ratio: 16/9; width: 100%;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #1a1e22, #0f1113);
}
.media-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-embed .placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }

/* external link buttons (ArtStation / Sketchfab / itch.io / YouTube) */
.ext-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn.solid { background: var(--accent); color: #0b0c0d; border-color: var(--accent); }
.btn.solid:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* before / after comparison slider */
.ba-slider {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  cursor: ew-resize; user-select: none; touch-action: none;
  margin: clamp(24px,4vw,40px) 0;
}
.ba-slider img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none;
}
.ba-slider .ba-before { z-index: 2; clip-path: inset(0 50% 0 0); }   /* left side = before */
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: #fff; z-index: 3; box-shadow: 0 0 0 1px rgba(0,0,0,.3); pointer-events: none;
}
.ba-handle::after {
  content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #15110a;
  display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.ba-tag {
  position: absolute; bottom: 12px; z-index: 3; padding: 5px 11px; border-radius: 999px;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: rgba(7,8,9,.6); backdrop-filter: blur(4px); pointer-events: none;
}
.ba-tag.before { left: 12px; } .ba-tag.after { right: 12px; }

/* grid of multiple 16:9 video embeds (Videos / Trailers page) */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px,2.4vw,28px); margin: clamp(28px,4vw,48px) 0; }
.video-grid .frame {
  position: relative; aspect-ratio: 16/9; width: 100%;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #1a1e22, #0f1113);
}
.video-grid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-grid .placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 18px; }
.video-grid figcaption { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--faint); margin-top: 10px; }

.gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: clamp(14px,2vw,22px); margin: clamp(30px,5vw,60px) 0; }
.gallery .span2 { grid-column: 1 / -1; }

.next-proj { border-top: 1px solid var(--line); margin-top: 40px; padding: 44px 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.next-proj a { font-family: var(--font-display); font-size: clamp(1.6rem,5vw,3rem); font-weight: 700; letter-spacing: -.02em; }
.next-proj a:hover { color: var(--accent); }

/* =========== ABOUT ME =========== */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px,6vw,72px); align-items: start; }
.about-main p { font-size: clamp(1.05rem,2vw,1.22rem); line-height: 1.6; }
.about-main p + p { margin-top: 1.1em; }

.about-side { display: grid; gap: 36px; }
.side-block > .label { display: block; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); font-size: .82rem; font-weight: 600; letter-spacing: .12em; color: var(--text); }
.skills-group { margin-bottom: 22px; }
.skills-group .sub { display: block; margin-bottom: 11px; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: .9rem; font-weight: 500; letter-spacing: .01em;
  padding: 9px 14px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--text);
}

/* tool icons inside chips/tags */
.tag, .chip { display: inline-flex; align-items: center; gap: .55em; }
.chip-ic { width: 15px; height: 15px; flex: none; fill: currentColor; }
.hero-chips .chip-ic { width: 14px; height: 14px; }

.edu { margin-bottom: 20px; }
.edu h4 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; letter-spacing: 0; }
.edu p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.edu .yr { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--accent); }

/* =========== EXPERIENCE =========== */
.exp-list { display: grid; gap: 0; }
.exp-item { display: grid; grid-template-columns: 220px 1fr; gap: clamp(16px,3vw,40px); padding: 30px 0; border-top: 1px solid var(--line); }
.exp-when { padding-top: 4px; }
.exp-body h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 11px; }
.exp-logo { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; padding: 0; border: 1px solid var(--line-2); }
.exp-body h3 .co { color: var(--text); }
.exp-body h3 .role { color: var(--muted); font-weight: 400; font-family: var(--font-body); font-size: .95rem; }
.exp-body ul { list-style: none; display: grid; gap: 9px; }
.exp-body li { position: relative; padding-left: 20px; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.exp-body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .8; }

.award {
  border-top: 1px solid var(--line); padding: 22px 0;
  display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center;
  transition: padding-left .3s var(--ease);
}
.award:last-of-type { border-bottom: 1px solid var(--line); }
.award:hover { padding-left: 10px; }
.award-banner { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.award-banner .ph, .award-banner img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s var(--ease); }
.award:hover .award-banner img, .award:hover .award-banner .ph { transform: scale(1.05); }
.award .yr { display: block; margin-bottom: 4px; font-size: .8rem; font-weight: 600; color: var(--accent); }
.award h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0; transition: color .25s var(--ease); }
.award:hover h3 { color: var(--accent); }
.award .arrow { font-size: .9em; color: var(--muted); }
.award p { color: var(--muted); font-size: .96rem; margin-top: 6px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(48px,8vw,90px) 0 50px; margin-top: 30px; }
.foot-cta h2 { font-size: clamp(2rem,7vw,4.4rem); margin-bottom: .3em; }
.foot-cta a.mail { color: var(--accent); }
.foot-links { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 14px 28px; }
.foot-links a { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.foot-links a:hover { color: var(--text); }
.colophon { margin-top: 40px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- image lightbox / zoom ---------- */
.gallery img, figure.media img { cursor: zoom-in; }
#lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; place-items: center;
  background: rgba(8,9,10,.92); backdrop-filter: blur(6px);
  overscroll-behavior: contain;
}
#lightbox.open { display: grid; }
#lightbox .lb-img {
  max-width: 92vw; max-height: 90vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform-origin: center center; transition: transform .2s var(--ease);
  cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
#lightbox.zoomed .lb-img { cursor: grab; transition: none; }
#lightbox .lb-close {
  position: fixed; top: 18px; right: 22px; z-index: 1001;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(20,22,25,.7); color: var(--text);
  font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
#lightbox .lb-close:hover { background: var(--accent); color: #0b0c0d; border-color: var(--accent); }
#lightbox .lb-hint {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-size: .78rem; letter-spacing: .04em; color: var(--muted);
  background: rgba(20,22,25,.6); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- mobile ---------- */
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  /* Steam highlight + view-all become normal single cells, so Work is one clean 2-up grid */
  .card-wide { grid-column: auto; flex-direction: column; }
  .card-wide .wide-banner { flex: none; aspect-ratio: 16 / 10; }
  .card-wide .wide-body { padding: 11px 12px 14px; }
  .card-wide .wide-body .desc, .card-wide .wide-actions { display: none; }  /* declutter to fit one cell */
  .card-wide .wide-body h3 { font-size: 1rem; line-height: 1.25; }
  .all-tile { grid-column: auto; aspect-ratio: 1 / 1; }                     /* card-sized, not a wide banner */
  .all-tile-body { padding: 12px 16px; white-space: normal; }
  .all-tile .all-tile-text { font-size: 1.02rem; }
  .all-tile .all-tile-arrow { font-size: 1.6rem; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  :root { --pad: 25px; }                              /* roomier side gutters on phones */
  .gallery, .video-grid { grid-template-columns: 1fr; }
  /* keep Work dense: two cards per row instead of one lonely cell */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid > * { min-width: 0; }                          /* never let a card push past its column */
  /* tidy 2-col captions: title stacks above its label, clamped to 2 lines, arrow dropped */
  .card .cap { flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 2px 2px; }
  .card .cap h3 { font-size: 1rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card .cap .arrow { display: none; }
  .card > .desc { display: none; }   /* drop descriptions on the dense mobile grid — cover + title + label only (Steam card keeps its own) */
  .about-teaser, .proj-head, .about-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 260px; }
  .exp-item { grid-template-columns: 1fr; gap: 10px; }
  .exp-when { padding-top: 0; }
  .award { grid-template-columns: 1fr; gap: 14px; }
  .award-banner { max-width: 220px; }
  .proj-head { gap: 28px; }
  .spec dd { text-align: left; }
  .nav-links { position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px var(--pad) 24px; transform: translateY(-120%); transition: transform .4s var(--ease); }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-block; margin-left: auto; }   /* push Menu + lang group to the right */
  .lang-switch { margin-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ArtStation animation posters (replace blocked iframes) */
.art-vid a { position: relative; display: block; }
.art-vid img { display: block; width: 100%; }
.art-vid .art-vid-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .5em; padding: 10px 18px; border-radius: 999px;
  background: rgba(7,8,9,.6); border: 1px solid rgba(255,255,255,.25); color: #fff;
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; white-space: nowrap;
  backdrop-filter: blur(6px); transition: background .2s, border-color .2s, color .2s; pointer-events: none;
}
.art-vid a:hover .art-vid-badge { background: rgba(7,8,9,.82); border-color: var(--accent); color: var(--accent); }
