/* Minimal, open sections with cards reserved for the project collection. */
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101216;
  --bg-elev: #171a20;
  --text: #eef0f4;
  --muted: #a6acb8;
  --accent: #95b5f6;
  --accent-2: #95b5f6;
  --border: rgba(222, 230, 245, .1);
  --shadow: 0 12px 28px rgba(0, 0, 0, .12);
  --shadow-soft: none;
  --radius: 12px;
  --focus: #aac5ff;
}

body,
html[data-theme="dark"] body {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: #334c77; }
button { font-family: inherit; }
.container { width: min(1160px, 100%); }
.site-header,
html[data-theme="dark"] .site-header {
  background: rgba(16, 18, 22, .94);
  backdrop-filter: blur(16px);
}
.nav-wrap { padding-block: 18px; }
.brand-mark {
  background: #202733;
  border: 1px solid #354154;
  color: #b5caf0;
  border-radius: 10px;
  font-size: 15px;
}
.brand-text { font-size: 15px; font-weight: 500; }
.nav { gap: 24px; font-size: 14px; }
.nav a:hover { color: var(--text); }
.nav a::after { height: 1px; }
.hero { padding: clamp(64px, 9vw, 108px) 0 72px; }
.hero-content { gap: 20px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; color: var(--accent); }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.3rem); font-weight: 650; line-height: 1.12; letter-spacing: -.045em; }
.hero-subtitle { max-width: 620px; font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.75; }
.hero-actions { margin-top: 6px; }
.btn { border-radius: 8px; font-size: 14px; font-weight: 550; box-shadow: none; min-height: 44px; }
.btn.primary, .btn.project { background: #93b4f5; color: #101c30; box-shadow: none; }
.btn.primary:hover, .btn.project:hover { background: #b2ccff; box-shadow: none; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: #20252e; box-shadow: none; }
.btn.small { font-size: 14px; }
.section { padding: 56px 0; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.03em; margin-bottom: 18px; }
.section h3 { letter-spacing: -.015em; }
.section p { line-height: 1.8; }
.section-header { margin-bottom: 24px; }
.section-header h2 { margin-bottom: 0; }
.split { gap: 40px; }
.about-card { padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.about-card h3 { margin-top: 0; font-size: 16px; font-weight: 600; }
#about .split { grid-template-columns: 1.25fr 1fr; gap: 64px; }
#about .about-card { padding-top: 7px; }
.focus-list { list-style: none; padding: 0; }
.focus-list li { padding: 13px 0; border-top: 1px solid var(--border); font-size: 14px; }
#about .about-card h3 { font-size: 20px; margin-bottom: 24px; }
#about .focus-list li { display: flex; align-items: center; gap: 18px; padding: 20px 0; font-size: 17px; line-height: 1.5; color: #c5cbd6; }
.focus-glyph { width: 26px; height: 26px; flex: 0 0 26px; color: #95aaca; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: color 200ms ease, transform 200ms ease; }
#about .focus-list li:hover .focus-glyph { color: var(--accent); transform: translateY(-2px); }
.skills-grid { gap: 30px 36px; align-items: stretch; }
.skills-card, .skills-card.core, .skills-card.tooling {
  padding: 22px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
.skills-card h3, .skills-card.core h3, .skills-card.tooling h3 {
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--text); font-size: 15px; font-weight: 500; margin-bottom: 16px;
}
.skill-glyph { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; color: #8e9eb8; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.skills-card ul { list-style: none; padding-left: 32px; font-size: 14px; }
.skills-card li { padding-block: 4px; }
.projects-grid { gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-card, .project-card.featured { border: 1px solid var(--border); box-shadow: none; padding: 26px; gap: 18px; }
.project-card:hover { border-color: #414c60; box-shadow: none; transform: translateY(-2px); }
.project-header { align-items: flex-start; }
.project-header h3 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 600; }
.project-card > p { margin: 0; font-size: 15px; }
.project-meta { font-size: 12px; background: transparent; padding: 3px 0; white-space: nowrap; border-radius: 0; }
.tag-row { gap: 6px 14px; }
.tag { font-size: 12px; background: transparent; color: #9aa8bc; padding: 0; border-radius: 0; }
.tag.filter-chip, .tag.project-tag-btn { padding: 4px 8px; border-radius: 4px; }
.card-actions { padding-top: 4px; }
.game-grid { grid-template-columns: 1fr; gap: 36px; margin-top: 32px; }
.game-card {
  display: grid; grid-template-columns: 1fr 1.15fr; column-gap: 48px;
  padding: 30px 0 0; background: transparent; border: 0;
  border-top: 1px solid var(--border); border-radius: 0;
}
.game-card h3 { grid-column: 1; font-size: 21px; font-weight: 500; }
.game-card > p { grid-column: 1; font-size: 15px; margin-bottom: 0; }
.game-card .itch-embed { grid-column: 2; grid-row: 1 / 4; align-self: center; }
.game-intro { max-width: 820px; }
.game-recognition { grid-column: 1; padding-top: 0; margin-top: 20px; border: 0; }
.game-recognition h4 { font-size: 13px; font-weight: 500; color: #c3cbda; }
.game-recognition-list { font-size: 14px; font-weight: 400; }
.game-recognition-list li { padding-block: 4px; }
.itch-embed { padding: 0; border-radius: 6px; overflow: hidden; }
#contact .split { border-top: 1px solid var(--border); padding-top: 40px; }
#contact .about-card { justify-self: end; padding-top: 8px; }
.contact-actions { gap: 16px; }
.contact-icon-button { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 6px; color: #a6acb8; }
.contact-icon-button:hover { color: var(--accent); background: #1d222b; box-shadow: none; }
.site-footer { margin-top: 32px; padding-block: 22px; }
.footer-content { font-size: 13px; }
.modal-dialog { max-height: calc(100dvh - 40px); overflow-y: auto; }
.modal-content h3 { padding-right: 30px; }
.modal-content li { margin-block: 7px; }
/* Long sections must not depend on an unreachable intersection threshold. */
.section.reveal { opacity: 1; transform: none; }
.hero.reveal, .project-card.reveal { opacity: 1; transform: none; }
.motion-item { opacity: 1; }
.motion-item.motion-entered { animation: portfolio-enter 550ms cubic-bezier(.2, .65, .3, 1) var(--entry-delay, 0ms) backwards; }
@keyframes portfolio-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.skill-glyph { transition: color 200ms ease, transform 200ms ease; }
.project-card .btn { transition: background-color 180ms ease, transform 180ms ease; }
.game-card h3 { transition: color 200ms ease; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .skills-card:hover .skill-glyph { color: var(--accent); transform: translateY(-2px); }
  .game-card:hover h3 { color: var(--accent); }
  .project-card.reveal:hover { transform: translateY(-2px); }
}

@media (max-width: 980px) {
  .game-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-wrap { padding-block: 14px; }
  .nav { gap: 4px; }
  .nav a { min-height: 44px; }
  .hero { padding: 60px 0 44px; }
  .section { padding-block: 38px; }
  .split, #about .split { grid-template-columns: 1fr; gap: 24px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { padding: 22px; }
  .game-card { display: flex; flex-direction: column; padding-top: 24px; }
  .game-card .itch-embed { margin-top: 24px; }
  .game-recognition { margin-top: 24px; }
  #contact .about-card { justify-self: start; padding-top: 0; }
  .footer-content { flex-direction: row; align-items: center; }
}
@media (max-width: 380px) {
  .project-header { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
