:root {
  --bg: #070a0f;
  --surface: #111821;
  --surface-strong: #172331;
  --surface-glow: #1a2d33;
  --text: #eef7f4;
  --muted: #9fb0ad;
  --line: #263542;
  --accent: #2dd4bf;
  --accent-dark: #89f5e6;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --rust: #f59e7d;
  --gold: #f4c95d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(45, 212, 191, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 14%, rgba(245, 158, 125, 0.14), transparent 28rem),
    linear-gradient(180deg, #091018, var(--bg) 36rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(38, 53, 66, 0.82);
  background: rgba(7, 10, 15, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #04100e;
  font-size: 0.88rem;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.top-nav a {
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--accent-dark);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(58px, 8vw, 110px) 0 44px;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.55rem, 6vw, 5.85rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.hero-text,
.hero-subline,
.intro-text {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-subline {
  margin: 22px 0 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.hero-text {
  margin-top: 18px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 18px;
  background: rgba(23, 35, 49, 0.86);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #031310;
}

.profile-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 35, 49, 0.92), rgba(17, 24, 33, 0.92));
  box-shadow: var(--shadow);
}

.profile-photo {
  width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: var(--surface-strong);
}

.profile-panel div {
  padding: 18px;
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.42);
}

.profile-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section {
  padding: clamp(56px, 9vw, 100px) 0;
  border-top: 1px solid var(--line);
}

.highlights {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0 0 clamp(56px, 8vw, 86px);
}

.highlight-card {
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.14), rgba(23, 35, 49, 0.82));
}

.highlight-value,
.highlight-label {
  display: block;
}

.highlight-value {
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 900;
  line-height: 1.12;
}

.highlight-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.section-heading {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin-bottom: 30px;
}

.section-lede {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.intro-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.skills-grid,
.repo-grid,
.credential-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skill-card,
.repo-card,
.credential-card,
.private-preview {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(23, 35, 49, 0.88), rgba(17, 24, 33, 0.96));
}

.skill-card {
  display: flex;
  flex-direction: column;
}

.skill-card ul {
  margin-top: auto;
}

.skill-card p,
.repo-card p,
.credential-card p,
.timeline-item p {
  color: var(--muted);
}

.timeline {
  display: grid;
  max-width: 920px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 28px;
}

.timeline-item::before {
  position: absolute;
  top: 15px;
  bottom: -3px;
  left: 6px;
  width: 2px;
  background: var(--line);
  content: "";
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border: 3px solid var(--accent);
  border-radius: 999px;
  background: var(--bg);
}

.timeline-date,
.timeline-company {
  margin: 0;
  font-weight: 750;
}

.timeline-date {
  color: var(--rust);
  font-size: 0.84rem;
}

.timeline-company {
  margin-top: 4px;
}

.timeline-item h3 {
  margin-top: 4px;
}

.timeline-item p:last-child {
  margin-bottom: 0;
}

.credentials-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 18px;
  align-items: stretch;
}

.credential-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.subheading {
  margin-bottom: 16px;
}

.credential-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.credential-grid .credential-card {
  grid-template-rows: 28px minmax(58px, auto) minmax(44px, auto) 1fr;
}

.credential-grid .credential-card .tag {
  width: max-content;
}

.credential-card p {
  margin: 0;
}

.credential-card h3 + h3 {
  margin-top: 10px;
}

.side-stack {
  display: grid;
  gap: 16px;
  padding-top: calc(1.12rem * 1.25 + 16px);
}

.skill-card ul {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}

.skill-card li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
}

.skill-card li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  content: "";
}

.private-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.private-preview {
  display: grid;
  gap: 10px;
}

.private-preview p {
  margin: 0;
  color: var(--muted);
}

.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  background: rgba(23, 35, 49, 0.86);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.filter-button:focus-visible,
.button:focus-visible,
.top-nav a:focus-visible,
.repo-card a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.filter-button span {
  margin-left: 4px;
  opacity: 0.7;
}

.repo-status {
  min-height: 28px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 650;
}

.repo-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.repo-proof {
  margin-top: 0;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 750;
}

.repo-card h3 a {
  text-decoration-color: rgba(15, 118, 110, 0.35);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.repo-card h3 a:hover {
  color: var(--accent-dark);
}

.repo-card h3 {
  overflow-wrap: anywhere;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(159, 176, 173, 0.12);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.accent {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tag.warning {
  background: rgba(244, 201, 93, 0.16);
  color: #ffe08a;
}

.tag.private {
  background: rgba(245, 158, 125, 0.16);
  color: #ffc0aa;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.game-art {
  position: relative;
  display: flex;
  min-height: 210px;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px;
  isolation: isolate;
}

.game-art::before,
.game-art::after {
  position: absolute;
  z-index: -1;
  content: "";
}

.game-art::before {
  inset: 0;
  opacity: 0.55;
  background-image: linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  transform: perspective(240px) rotateX(30deg) scale(1.5);
}

.game-art::after {
  width: 280px;
  height: 280px;
  right: -28px;
  top: -108px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(255,255,255,.04), 0 0 0 70px rgba(255,255,255,.025);
}

.undead-game .game-art {
  background: radial-gradient(circle at 68% 18%, #576d4a 0, transparent 38%), linear-gradient(135deg, #111e19, #283922 58%, #0b1413);
  color: #d7edb9;
}

.accord-game .game-art {
  background: radial-gradient(circle at 65% 22%, #735a44 0, transparent 38%), linear-gradient(135deg, #182231, #38333a 58%, #141b25);
  color: #f3d9ae;
}

.game-art span {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.game-art strong {
  font-size: clamp(5rem, 13vw, 9rem);
  line-height: 0.72;
  letter-spacing: -0.12em;
  opacity: 0.25;
}

.game-content {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 26px;
}

.game-content h3 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.game-content p {
  margin: 0 0 auto;
  color: var(--muted);
}

.game-content .button span {
  margin-left: 0.4em;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .hero,
  .intro-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .skills-grid,
  .repo-grid,
  .credential-grid,
  .private-preview-grid,
  .highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-section {
    display: grid;
  }

  .credentials-layout {
    grid-template-columns: 1fr;
  }

  .side-stack {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  section[id] {
    scroll-margin-top: 0;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  main,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
  }

  .skills-grid,
  .repo-grid,
  .credential-grid,
  .private-preview-grid,
  .highlights,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
