/* Layout: dark "night villa" look — one cherry accent, Montserrat throughout */
:root {
  --bg: #0c0e0d;
  --surface: #141716;
  --surface-2: #1b1f1d;
  --line: #2a2f2c;
  --fg: #e8ebe6;
  --muted: #9aa29d;
  --accent: #e8314f;      /* cherry */
  --safe: #62c27e;
  --warn: #e3bb4d;
  --danger: #dd5b4f;
  --f-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-body: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Montserrat", "Segoe UI", system-ui, sans-serif;  /* small labels: semibold */
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-weight: 400;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 7vw, 5rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); line-height: 1.15; }
p { margin: 0; }
.label {
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.label.amber { color: var(--accent); }
.prose { max-width: 66ch; display: grid; gap: 1.1em; color: #d3d8d3; }
.prose strong { color: var(--fg); }

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand span { font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; }
.nav a {
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { color: var(--fg); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line); color: var(--fg);
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
}

/* ---------- sections ---------- */
section { padding-block: clamp(56px, 9vw, 104px); }
section + section { border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; padding: 11px 18px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--fg); background: var(--surface);
  transition: border-color .15s, color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #f24d68; border-color: #f24d68; color: #fff; }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- home hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  /* the flashlight cone */
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(232,49,79,.14), transparent 62%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: end; position: relative; }
.hero-text { display: grid; gap: 22px; min-width: 0; }
.hero h1 span { display: block; color: var(--accent); }
.role { font-family: var(--f-mono); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); }
.portrait { position: relative; max-width: 380px; justify-self: end; width: 100%; }
.portrait img { width: 100%; aspect-ratio: 413/502; object-fit: cover; object-position: 50% 30%; border-radius: 4px; filter: grayscale(.25) contrast(1.05); }
.socials { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.socials a { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.socials a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { justify-self: start; max-width: 260px; order: -1; }
}

/* ---------- stats (styled like the Home Invader noise meter) ---------- */
.stats { display: grid; gap: 40px; }
.stat-group { display: grid; gap: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stat { background: var(--surface); padding: 22px 20px; display: grid; gap: 6px; align-content: start; }
.stat b { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.meter { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--safe) 0 45%, var(--warn) 45% 78%, var(--danger) 78% 100%); opacity: .85; }

/* ---------- game cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: grid; gap: 14px; align-content: start; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { font-size: 1.55rem; }
.card .go { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-top: auto; }
.card.feature { grid-column: 1 / -1; background: linear-gradient(135deg, #22111a, var(--surface) 60%); }
.card.feature h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ---------- page heads ---------- */
.page-head { padding-block: clamp(48px, 8vw, 88px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head .wrap { display: grid; gap: 18px; }
.page-head .intro { max-width: 70ch; color: #d3d8d3; font-size: 1.08rem; }

/* ---------- galleries ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.gallery .shot { border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .3s, opacity .3s; }
.gallery .shot:hover img { transform: scale(1.03); }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .gallery, .gallery.wide { grid-template-columns: 1fr; } }

/* ---------- project timeline ---------- */
.timeline { display: grid; }
.proj { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px 40px; padding-block: 40px; border-top: 1px solid var(--line); }
.proj:first-child { border-top: 0; padding-top: 0; }
.proj .year { font-family: var(--f-mono); font-size: .9rem; color: var(--accent); letter-spacing: .08em; padding-top: 6px; }
.proj-body { display: grid; gap: 16px; min-width: 0; }
.proj .tag { display: inline-block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; margin-right: 6px; }
.proj .tag.hot { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
@media (max-width: 640px) { .proj { grid-template-columns: 1fr; gap: 10px; } }

ul.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 70ch; }
ul.ticks li { position: relative; padding-left: 22px; color: #d3d8d3; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--accent); }

/* ---------- diary index ---------- */
.diary-list { display: grid; border-top: 1px solid var(--line); }
.diary-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px 4px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: padding .2s, color .15s;
}
.diary-list a:hover { padding-left: 16px; color: var(--accent); }
.diary-list h3 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
.diary-list .label { white-space: nowrap; }

/* ---------- diary pages ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 64px); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 6px 10px; }
.toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.toc > div { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px; display: grid; gap: 12px; align-content: start; }

.block { display: grid; gap: 22px; padding-block: 48px; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; padding-top: 0; }
.block .num { font-family: var(--f-mono); color: var(--accent); font-size: .85rem; letter-spacing: .1em; }
.block h4 { margin: 8px 0 0; font-family: var(--f-body); font-size: 1.05rem; font-weight: 600; color: var(--fg); }
figure { margin: 0; display: grid; gap: 10px; max-width: 900px; }
figure .shot { border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
figure img { width: 100%; }
figcaption { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .06em; color: var(--muted); }

.zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 760px; }
.zone { border-radius: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid; display: grid; gap: 4px; }
.zone b { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.zone span { font-size: .92rem; color: var(--muted); }
.zone.g { border-top-color: var(--safe); } .zone.g b { color: var(--safe); }
.zone.y { border-top-color: var(--warn); } .zone.y b { color: var(--warn); }
.zone.r { border-top-color: var(--danger); } .zone.r b { color: var(--danger); }
@media (max-width: 560px) { .zones { grid-template-columns: 1fr; } }

.qa { display: grid; gap: 6px; max-width: 66ch; }
.qa dt { font-weight: 600; color: var(--fg); }
.qa dd { margin: 0 0 14px; color: #d3d8d3; }

.next-link { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 48px; }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.site-foot .name { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; line-height: 1; }

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

/* ---------- YouTube players ---------- */
.yt { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.proj.has-video { grid-template-columns: 140px minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) {
  .proj.has-video { grid-template-columns: 140px minmax(0, 1fr); }
  .proj.has-video .yt { grid-column: 2; }
  .proj.has-video .proj-body { grid-column: 2; }
}
@media (max-width: 640px) {
  .proj.has-video { grid-template-columns: 1fr; }
  .proj.has-video .yt, .proj.has-video .proj-body { grid-column: auto; }
}

/* Small labels, buttons, tags: Montserrat SemiBold */
.label, .role, .nav a, .menu-btn, .btn, .socials a, .stat span, .card .go, .proj .year, .proj .tag,
.chip, figcaption, .zone b, .block .num { font-weight: 600; }
.btn.primary { font-weight: 700; }
.yt.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.proj-body > p:not(.label) { color: #d3d8d3; max-width: 62ch; }

/* Highlighted words in the intro */
.prose strong.hl { color: var(--accent); font-weight: 700; }

/* Social links in their brand colors */
.socials a { font-weight: 700; border-bottom-width: 2px; }
.socials a.s-artstation { color: #3cc4ff; border-color: #3cc4ff55; }
.socials a.s-itch       { color: #ff6b6b; border-color: #ff6b6b55; }
.socials a.s-linkedin   { color: #5aa7ff; border-color: #5aa7ff55; }
.socials a.s-steam      { color: #8fd0ff; border-color: #8fd0ff55; }
.socials a.s-instagram  { color: #ff5c9a; border-color: #ff5c9a55; }
.socials a.s-youtube    { color: #ff4d4d; border-color: #ff4d4d55; }
.socials a:hover { border-color: currentColor; filter: brightness(1.15); }

/* ---------- Highlighted game tiles (image swaps on hover) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: grid; gap: 4px; text-decoration: none; text-align: center; }
.tile-img { position: relative; aspect-ratio: 6 / 5; max-width: 100%; overflow: hidden; border-radius: 4px; background: var(--surface-2); margin-bottom: 10px; }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease, transform .6s ease; }
.tile-img img.alt { opacity: 0; }
.tile:hover .tile-img img.alt, .tile:focus-visible .tile-img img.alt, .tile.swap .tile-img img.alt { opacity: 1; }
.tile:hover .tile-img img, .tile:focus-visible .tile-img img { transform: scale(1.03); }
.tile-name { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .02em; }
.tile-sub { font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile:hover .tile-name { color: var(--accent); }

/* ---------- Designer Diary banners ---------- */
.banner-list { display: grid; gap: 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.banner {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: clamp(120px, 15vw, 170px); padding: 24px 16px; text-decoration: none; overflow: hidden;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.banner::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .62); transition: background .35s ease; }
.banner .b-text { position: relative; z-index: 1; display: grid; gap: 8px; }
.banner h3 { color: #fff; font-size: clamp(1.3rem, 3.2vw, 2rem); text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.banner .label { color: rgba(255,255,255,.75); }
.banner:hover::after, .banner:focus-visible::after { background: rgba(0, 0, 0, .38); }
.banner:hover img { transform: scale(1.04); }
.banner:hover h3 { color: #fff; }

/* ---------- Document pages (PDFs shown as images) ---------- */
.doc-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; max-width: 880px; width: 100%; margin-inline: auto; }
.doc-pages { display: grid; gap: 18px; max-width: 880px; width: 100%; margin-inline: auto; }
.doc-pages img { width: 100%; background: #fff; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
section[id] { scroll-margin-top: 80px; }

/* ---------- Home hero background image ---------- */
.hero { background: url("images/hero-bg.jpg") center / cover no-repeat; }
.hero-tint {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(12,14,13,.45) 0%, rgba(12,14,13,.62) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(12,14,13,.82) 0%, rgba(12,14,13,.35) 100%);
}
.hero::before { z-index: 0; }
.hero-grid { z-index: 1; }

/* ---------- SoundCloud players ---------- */
.sc { max-width: 960px; width: 100%; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.sc iframe { display: block; width: 100%; border: 0; }

/* Photo spans the same height as the text column (from AVNEET DHAKA down to the links) */
.hero-label { position: relative; z-index: 1; margin-bottom: 22px; }
.hero-grid { align-items: stretch; }
.portrait { align-self: stretch; justify-self: end; height: 100%; max-width: 400px; }
.portrait img { height: 100%; aspect-ratio: auto; object-position: 50% 35%; }
@media (max-width: 760px) {
  .portrait { height: auto; max-width: 260px; justify-self: start; }
  .portrait img { aspect-ratio: 413 / 502; height: auto; }
}

/* All social links in the cherry accent */
.socials a, .socials a.s-artstation, .socials a.s-itch, .socials a.s-linkedin,
.socials a.s-steam, .socials a.s-instagram, .socials a.s-youtube {
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.socials a:hover { border-color: var(--accent); filter: brightness(1.15); }

/* ---------- Projects v2: video left, big year, per-game colors ---------- */
.proj, .proj.has-media { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px 48px; align-items: start; padding-block: 56px; }
.proj:not(.has-media) { grid-template-columns: minmax(0, 1fr); }
.proj .yt, .proj .proj-body { grid-column: auto !important; }
.big-year {
  font-family: var(--f-display); font-weight: 800; line-height: .9; letter-spacing: -.02em;
  font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-variant-numeric: tabular-nums;
  color: transparent; -webkit-text-stroke: 1.5px var(--c);
}
@supports not (-webkit-text-stroke: 1px black) { .big-year { color: var(--c); } }
.proj h3 { color: var(--c); }
.proj ul.ticks li::before { background: var(--c); }
.proj .tag.hot { color: var(--c); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.proj .btn.primary { background: var(--c); border-color: var(--c); color: var(--c-ink); }
.proj .btn.primary:hover { filter: brightness(1.12); background: var(--c); color: var(--c-ink); }
.proj .btn:not(.primary):hover { border-color: var(--c); color: var(--c); }
.proj .yt { border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
@media (max-width: 860px) {
  .proj, .proj.has-media { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 40px; }
}
.proj:first-child { padding-top: 0; }
@media (min-width: 861px) { .proj > .yt { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); } }

/* Years: solid game color (no outline), a bit smaller */
.big-year { color: var(--c); -webkit-text-stroke: 0; font-size: clamp(2rem, 4vw, 3rem); }
