/* ==========================================================================
   Noah Elliot — Portfolio
   ========================================================================== */

:root {
  --bg: #0a0b10;
  --bg-alt: #0d0f17;
  --surface: #12151f;
  --surface-2: #171a26;
  --border: #232735;
  --border-soft: #1b1e2a;

  --text: #eef0f6;
  --text-dim: #a7acc0;
  --text-faint: #6c7288;

  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-warm: #ff8a5c;

  --gradient: linear-gradient(120deg, var(--accent), var(--accent-2));

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-soft: 0 20px 60px -25px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(124, 92, 255, 0.15), 0 20px 60px -25px rgba(124, 92, 255, 0.35);

  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- background decor ---------- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(700px 500px at 12% -5%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(700px 500px at 88% 10%, rgba(34, 211, 238, 0.14), transparent 60%),
    var(--bg);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gradient);
  color: #0a0b10;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
  position: relative;
}
.nav a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text) !important;
  background: var(--surface);
}
.nav-cta:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gradient);
  color: #0a0b10;
  box-shadow: 0 10px 30px -12px rgba(124, 92, 255, 0.55);
}
.btn-primary:hover {
  box-shadow: 0 14px 34px -10px rgba(124, 92, 255, 0.7);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.08);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.88rem;
}

.icon-ext { width: 14px; height: 14px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg-collage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}
.collage-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 108%;
  height: 108%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: blur(0px) saturate(1) brightness(1);
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.collage-video.is-active {
  opacity: 1;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(700px 500px at 12% -5%, rgba(124, 92, 255, 0.16), transparent 40%),
    radial-gradient(700px 500px at 88% 10%, rgba(34, 211, 238, 0.1), transparent 40%),
    linear-gradient(180deg, rgba(10, 11, 16, 0.68) 0%, rgba(10, 11, 16, 0.85) 55%, var(--bg) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding: 96px 0 88px;
  min-height: calc(100vh - 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  background: linear-gradient(120deg, #fff, #cfd3e8 55%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  margin-top: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dim);
}
.hero-role .sep { color: var(--text-faint); margin: 0 4px; }

.hero-tagline {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 1.06rem;
  color: var(--text-dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.hero-badges li {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.hero-figure {
  position: relative;
  justify-self: center;
}

.hero-photo-frame {
  width: 280px;
  border-radius: var(--radius-lg);
  padding: 6px;
  background: linear-gradient(160deg, var(--accent), transparent 40%, var(--accent-2));
  box-shadow: var(--shadow-soft);
}
.hero-photo-frame img {
  border-radius: calc(var(--radius-lg) - 6px);
  width: 100%;
  height: auto;
  aspect-ratio: 283 / 466;
  object-fit: cover;
}

.hero-figure-tag {
  position: absolute;
  left: -18px;
  bottom: -20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-soft);
  min-width: 190px;
}
.tag-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 3px;
}
.tag-body {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}
.tag-body em { color: var(--accent); font-style: normal; }

/* ---------- sections ---------- */

.section {
  padding: 96px 0;
  position: relative;
}
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015) 12%, rgba(255,255,255,0.015) 88%, transparent);
  border-block: 1px solid var(--border-soft);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 12px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-grid h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 22px;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-dim);
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.about-card h3 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--text);
}

.fact-list {
  display: grid;
  gap: 18px;
  margin: 0;
}
.fact-list dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.fact-list dd {
  margin: 0 0 3px;
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* ---------- featured games ---------- */

.game-list {
  display: grid;
  gap: 28px;
}

.game-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.game-card:hover {
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: var(--shadow-glow);
}
.game-card.reverse { grid-template-columns: 1fr 1fr; }
.game-card.reverse .game-media { order: 2; }
.game-card.reverse .game-content { order: 1; }

.game-media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--surface-2);
  overflow: hidden;
}
.game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trailer-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-2);
  transition: opacity 0.3s ease;
}

.art-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 11, 16, 0.6);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.art-badge-live {
  color: #0a0b10;
  background: var(--gradient);
  border-color: transparent;
}

.game-content {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.game-meta h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.game-pitch {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 14px;
  max-width: 46ch;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.14);
  color: #c9bfff;
  border: 1px solid rgba(124, 92, 255, 0.3);
}
.tag-muted {
  background: transparent;
  color: var(--text-faint);
  border-color: var(--border);
  font-weight: 500;
  font-family: var(--font-mono);
}

.highlight-list {
  display: grid;
  gap: 10px;
}
.highlight-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.93rem;
  color: var(--text-dim);
}
.highlight-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--gradient);
}
.highlight-list strong { color: var(--text); font-weight: 600; }

.game-content .btn { align-self: flex-start; margin-top: 4px; }

.media-credit {
  font-size: 0.76rem;
  color: var(--text-faint);
  font-style: italic;
  margin-top: -6px;
}

/* ---------- independent projects ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: var(--shadow-glow);
}

.project-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-media img { transform: scale(1.04); }

.project-media-contain img {
  object-fit: contain;
  padding: 26px;
}

.project-body {
  padding: 24px 26px 28px;
}
.project-body h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.project-body p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-2);
}
.link-arrow span { transition: transform 0.2s ease; }
.link-arrow:hover span { transform: translateX(3px); }

/* ---------- skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.skill-group h3 {
  font-size: 0.98rem;
  margin-bottom: 16px;
  color: var(--text);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.chip-list li {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: white;
}

/* ---------- contact ---------- */

.contact-section {
  text-align: center;
}
.contact-wrap {
  max-width: 620px;
}
.contact-section .kicker { justify-content: center; display: flex; }
.contact-section h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 18px;
}

.contact-resume-btn {
  margin-top: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.contact-link svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-2); }
.contact-link:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.back-to-top { color: var(--text-dim); font-weight: 600; }
.back-to-top:hover { color: var(--text); }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-top: 64px;
    min-height: auto;
  }
  .hero-figure { justify-self: start; }
  .hero-photo-frame { width: 220px; }

  .about-grid { grid-template-columns: 1fr; }

  .game-card,
  .game-card.reverse {
    grid-template-columns: 1fr;
  }
  .game-card .game-media,
  .game-card.reverse .game-media { order: 1; }
  .game-card .game-content,
  .game-card.reverse .game-content { order: 2; padding: 28px; }

  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 11, 16, 0.98);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav a { padding: 10px 0; width: 100%; }
  .nav-cta { margin-top: 6px; }
  .nav-toggle { display: flex; }

  .project-grid { grid-template-columns: 1fr; }
  .hero-figure-tag { position: static; margin-top: 16px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}
