/* ============================================================
   Brandon Wlazelek — brandonwlazelek.com
   Minimal dark · monochrome white-on-black (Resend-style tone)
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --bg-raised: #101017;
  --surface: #14141c;
  --surface-2: #191925;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f8;
  --text-dim: #9b9ba8;
  --text-faint: #62626e;
  --accent: #f4f4f5;
  --accent-soft: rgba(255, 255, 255, 0.09);
  --accent-glow: rgba(255, 255, 255, 0.22);
  --accent-bright: #ffffff;
  --ok: #4ade80;
  --err: #f87171;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --nav-h: 64px;
  --radius: 12px;
  --container: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono { font-family: var(--font-mono); }
.dim { color: var(--text-dim); }

::selection { background: var(--accent); color: #0a0a0f; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

code {
  background: var(--accent-soft);
  color: var(--accent-bright);
  padding: 0.1em 0.45em;
  border-radius: 6px;
  font-size: 0.9em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden;
}

.skip-link {
  position: fixed;
  top: -48px; left: 16px;
  z-index: 200;
  background: var(--accent);
  color: #0a0a0f;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  box-shadow: 0 0 0 rgba(255, 255, 255, 0);
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.monogram {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -1px;
}
.monogram span { color: var(--accent); }
.monogram:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  background: rgba(10, 10, 15, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a {
  color: var(--text);
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 96px 24px 48px;
  max-width: 780px;
  pointer-events: none;
}
.hero-content a, .hero-content .btn { pointer-events: auto; }

.hero-eyebrow {
  color: var(--accent-bright);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 14px;
  background: linear-gradient(180deg, #ffffff 30%, #9d9da8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
}
.hero-tagline {
  color: var(--text-dim);
  font-size: clamp(15px, 2vw, 17px);
  max-width: 560px;
  margin: 0 auto 34px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
  z-index: 2;
}
.scroll-hint:hover { border-color: var(--accent); }
.scroll-hint-dot {
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollNudge 1.8s ease-in-out infinite;
}
@keyframes scrollNudge {
  0%, 100% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(10px); opacity: 0.25; }
}

/* ============ Sections ============ */
.section { padding: 110px 0 30px; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 36px;
}
.section-num {
  color: var(--text-faint);
  font-size: 0.55em;
  font-weight: 500;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
  transform: translateY(-6px);
}
.section-lede {
  color: var(--text-dim);
  max-width: 640px;
  margin: -16px 0 32px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-copy p { margin: 0 0 18px; color: var(--text-dim); font-size: 17px; }
.about-copy p:first-child { color: var(--text); }

.about-stats {
  display: flex;
  gap: 36px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-bright);
}
.stat-label { font-size: 13px; color: var(--text-faint); }

.about-photo { display: flex; justify-content: center; }
.photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  width: min(100%, 320px);
  aspect-ratio: 1215 / 1280;
  max-width: 320px;
  border: 1px solid var(--border-strong);
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 55%);
  pointer-events: none;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

/* ============ Experience timeline ============ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--border) 85%);
}
.timeline-item {
  position: relative;
  padding: 0 0 40px;
}
.timeline-item:last-child { padding-bottom: 8px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px; top: 7px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.timeline-role {
  font-size: 18px;
  font-weight: 650;
  margin: 0;
}
.timeline-meta {
  font-size: 13.5px;
  color: var(--text-faint);
  margin: 4px 0 0;
}
.timeline-meta .tl-org { color: var(--text-dim); font-weight: 500; }

/* ============ Projects ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 255, 255, 0.10);
}
.project-metric {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: -0.02em;
}
.project-name {
  font-size: 17px;
  font-weight: 650;
  margin: 0;
}
.project-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 20px;
}

/* ============ Skills ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.skill-group h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-group h3::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips span {
  font-size: 13px;
  color: var(--text-dim);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.skill-chips span:hover {
  color: var(--accent-bright);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ============ Terminal ============ */
.terminal-window {
  background: #0c0c13;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 255, 255, 0.07);
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tdot { width: 12px; height: 12px; border-radius: 50%; }
.tdot-r { background: #ff5f57; }
.tdot-y { background: #febc2e; }
.tdot-g { background: #28c840; }
.terminal-title {
  margin-left: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.terminal-body {
  height: 380px;
  overflow-y: auto;
  padding: 18px 20px 8px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  overscroll-behavior: contain;
}
.terminal-body::-webkit-scrollbar { width: 8px; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }

.t-line { white-space: pre-wrap; word-break: break-word; margin: 0; }
.t-cmd .t-ps1 { color: var(--accent-bright); }
.t-out { color: var(--text-dim); }
.t-out a { color: var(--accent-bright); text-decoration: underline; }
.t-out .t-key { color: var(--text); font-weight: 500; }
.t-accent { color: var(--accent-bright); }
.t-ok { color: var(--ok); }
.t-err { color: var(--err); }
.t-matrix { color: #22c55e; }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}
.terminal-prompt { color: var(--accent-bright); white-space: nowrap; }
#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  caret-color: var(--accent);
  padding: 0;
}

.terminal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.terminal-chips button {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.terminal-chips button:hover {
  color: var(--accent-bright);
  border-color: rgba(255, 255, 255, 0.5);
  background: var(--accent-soft);
}

/* blinking cursor */
.t-cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ Arcade ============ */
.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}
.arcade-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-ui);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.arcade-card:hover, .arcade-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.12);
}
.arcade-card-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 6px;
  filter: saturate(0.85);
}
.arcade-card-name {
  font-weight: 650;
  font-size: 15.5px;
}
.arcade-card-size {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.arcade-card-play {
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-bright);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.arcade-card:hover .arcade-card-play,
.arcade-card:focus-visible .arcade-card-play { opacity: 1; }

.arcade-subhead {
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 500;
  margin: 36px 0 16px;
}
.arcade-grid-demos .arcade-card { padding: 14px 16px; }
.arcade-grid-demos .arcade-card-icon { font-size: 18px; margin-bottom: 2px; }

.flappy-card {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--surface), rgba(255, 255, 255, 0.07));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 26px 30px;
}
.flappy-badge {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.flappy-info h3 { margin: 0 0 6px; font-size: 20px; }
.flappy-info p { margin: 0; color: var(--text-dim); max-width: 520px; font-size: 14.5px; }

/* ============ Awards ============ */
.awards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.award-card-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.award-degree { margin: 0; font-size: 18px; font-weight: 650; }
.award-school { margin: 4px 0 14px; color: var(--text-dim); }
.award-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-dim);
}
.award-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.award-list li:last-child { border-bottom: none; }

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.contact-lede { color: var(--text-dim); margin: 0 0 22px; font-size: 17px; }
.contact-email {
  font-size: 18px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 26px;
}
.social-links { display: flex; gap: 12px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}
.social-links a:hover {
  color: var(--accent-bright);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
  text-decoration: none;
}
.social-links svg { width: 20px; height: 20px; fill: currentColor; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.form-row input, .form-row textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-status { font-size: 13px; margin: 14px 0 0; min-height: 1em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

/* ============ Footer ============ */
.footer {
  margin-top: 90px;
  border-top: 1px solid var(--border);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-dim);
}
.footer-inner p { margin: 0; }
.back-to-top { font-size: 13px; }

/* ============ Modal (arcade player) ============ */
.modal { position: fixed; inset: 0; z-index: 150; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative;
  margin: 5vh auto;
  max-width: min(94vw, 1280px);
  width: fit-content;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  padding: 0 0 10px;
  animation: modalIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
}
.modal-header h3 { margin: 0; font-size: 15px; color: var(--accent-bright); }
.modal-close {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  border-radius: 8px;
  width: 34px; height: 34px;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.modal-close:hover { color: var(--text); border-color: var(--accent); }
.modal-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  margin: 0 10px;
  border-radius: 8px;
  overflow: auto;
  min-width: 320px;
  min-height: 200px;
  max-width: calc(94vw - 20px);
  max-height: 78vh;
}
.modal-stage ruffle-player, .modal-stage canvas { border-radius: 6px; }
.modal-stage .stage-msg {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 48px 32px;
  text-align: center;
  max-width: 440px;
}
.modal-hint {
  text-align: center;
  font-size: 11px;
  margin: 10px 0 4px;
}

body.modal-open { overflow: hidden; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { order: -1; }
  .photo-frame { max-width: 240px; }
  .awards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 80px 0 20px; }
  .terminal-body { height: 320px; font-size: 12.5px; }
  .terminal-input-row { font-size: 12.5px; }
  #terminal-input { font-size: 16px; } /* prevent iOS zoom */
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .flappy-card { flex-direction: column; align-items: flex-start; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .scroll-hint-dot { animation: none; }
}
