/* Shared styles for aak581.github.io (portfolio and games pages). */
:root {
  --bg: #0b0d12;
  --bg-2: #11141b;
  --card: #141821;
  --border: #232938;
  --text: #e7e9ee;
  --muted: #9aa3b5;
  --accent: #8b9cff;
  --accent-2: #5eead4;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fb;
    --bg-2: #eef0f6;
    --card: #ffffff;
    --border: #e1e5ee;
    --text: #141821;
    --muted: #5b6475;
    --accent: #4f5fe0;
    --accent-2: #0f9f8c;
    --shadow: 0 10px 30px rgba(20, 24, 33, 0.08);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: 0.5rem 0.8rem; z-index: 10; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
nav .brand { color: var(--text); font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
nav ul a { color: var(--muted); font-size: 0.95rem; }
nav ul a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 560px) { nav ul { gap: 0.85rem; } nav ul li.opt { display: none; } nav .brand { font-size: 0.95rem; } nav ul a { font-size: 0.9rem; } }

/* hero */
.hero { padding: 4.5rem 1.25rem 3rem; position: relative; }
/* Soft glow behind the hero: full-bleed and fading to transparent well inside its own box,
   so no edge of the layer is ever visible. */
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 640px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 22% 28%, color-mix(in srgb, var(--accent) 20%, transparent), transparent),
    radial-gradient(closest-side at 78% 12%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent);
}
body { position: relative; }
.hero-top { display: flex; align-items: center; gap: 1.1rem; }
.avatar { width: 76px; height: 76px; border-radius: 50%; border: 2px solid var(--border); flex: none; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
.role { color: var(--muted); margin: 0.35rem 0 0; }
.lead { font-size: 1.15rem; max-width: 46rem; margin: 1.6rem 0 1.8rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 1rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-weight: 550;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b0d12; }
@media (prefers-color-scheme: light) { .btn.primary { color: #fff; } }
.btn svg { width: 18px; height: 18px; }

/* sections */
/* section.wrap: .wrap's side padding would otherwise cancel the vertical rhythm */
section.wrap { padding-top: 3.25rem; padding-bottom: 0.25rem; }
h2 { font-size: 1.5rem; margin: 0 0 1.4rem; letter-spacing: -0.01em; }
h2 .num { font-family: var(--mono); color: var(--accent-2); font-size: 0.95rem; margin-right: 0.5rem; }

/* work */
.job { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.6rem; box-shadow: var(--shadow); }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; align-items: baseline; }
.job-head h3 { margin: 0; font-size: 1.15rem; }
.job-head .meta { color: var(--muted); font-size: 0.95rem; }
.job ul { margin: 1rem 0 0; padding-left: 1.15rem; }
.job li { margin: 0.5rem 0; }
.job li::marker { color: var(--accent); }
.also { color: var(--muted); font-size: 0.95rem; margin: 1rem 0 0; }

/* projects */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.card .media { aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--border); overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.card:hover .media img { transform: scale(1.03); }
.card .media.type {
  display: grid; place-items: center; text-align: center; padding: 1rem;
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%),
    radial-gradient(circle at 80% 85%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 55%),
    var(--bg-2);
}
.card .media.type span { font-family: var(--mono); font-size: 1.35rem; font-weight: 600; letter-spacing: 0.02em; }
.card .media.type small { display: block; font-family: var(--mono); color: var(--muted); font-size: 0.8rem; margin-top: 0.35rem; }
.card .body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; padding-top: 0.3rem; }
.tags li { list-style: none; font-family: var(--mono); font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.tags { padding-left: 0; margin-bottom: 0; }
.links { display: flex; gap: 1rem; font-weight: 550; font-size: 0.95rem; }
.links .muted { color: var(--muted); font-weight: 500; }

/* games */
.game { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 1.5rem; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.game img { width: 100%; border-radius: 10px; display: block; border: 1px solid var(--border); aspect-ratio: 315 / 250; object-fit: cover; }
.game .label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.game h3 { margin: 0.3rem 0 0.4rem; font-size: 1.35rem; }
.game p { color: var(--muted); margin: 0 0 1rem; }
.game .play img { height: 56px; width: auto; border: 0; aspect-ratio: auto; }
.game .row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.game + .game { margin-top: 2.2rem; }
@media (max-width: 680px) { .game { grid-template-columns: 1fr; } }

/* lists */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 0.8rem; font-size: 1.05rem; }
.panel ul { margin: 0; padding-left: 1.1rem; }
.panel li { margin: 0.45rem 0; }
.panel li::marker { color: var(--accent); }
.skills dt { font-weight: 600; margin-top: 0.7rem; }
.skills dt:first-child { margin-top: 0; }
.skills dd { margin: 0.15rem 0 0; color: var(--muted); }

/* contact */
section.contact { text-align: center; padding-top: 4rem; padding-bottom: 4rem; }
.contact p { color: var(--muted); max-width: 34rem; margin: 0 auto 1.4rem; }
.contact .cta { justify-content: center; }

footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 1.2rem 1.25rem; }
footer a { color: var(--muted); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .card .media img { transition: none; }
}

/* games page */
.card .media.cover { aspect-ratio: 315 / 250; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.games-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.game .badge-itch img { height: 44px; width: auto; display: block; border: 0; border-radius: 0; aspect-ratio: auto; object-fit: contain; }
nav ul a[aria-current="page"] { color: var(--text); }

