@font-face {
  font-family: SpaceMono;
  src: url('theme/SpaceMono-Regular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: SpaceMono;
  src: url('theme/SpaceMono-Bold.ttf') format('truetype');
  font-weight: 700;
}

:root {
  --ink: #121212;
  --ink-soft: #1e1e1e;
  --paper: #f5f5f5;
  --paper-muted: #c8c8c8;
  --acid: #a488bf;
  --teal: #49c1b8;
  --line: rgba(164, 136, 191, .3);
  --measure: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background-color: var(--ink); background-image: linear-gradient(rgba(18,18,18,.34), rgba(18,18,18,.34)), url('media/pp-pattern-tile.png'); background-size: auto, 627px 627px; color: var(--paper); font-family: SpaceMono, monospace; font-size: 1rem; line-height: 1.7; }
body > p:first-of-type, body > ul:first-of-type, body > p:last-of-type, main, footer { width: min(100% - 2rem, var(--measure)); margin-inline: auto; }
body > p:first-of-type, body > ul:first-of-type { padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--paper-muted); font-size: .78rem; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
body > p:first-of-type a, body > ul:first-of-type a { color: inherit; text-decoration: none; }
body > p:first-of-type a:hover, body > p:first-of-type a:focus-visible, body > ul:first-of-type a:hover, body > ul:first-of-type a:focus-visible { color: var(--teal); }
body > ul:first-of-type { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.25rem; margin-top: 0; padding-left: 0; list-style: none; }
main { padding: 2rem clamp(1rem, 4vw, 3rem) 5rem; border-inline: 1px solid rgba(164, 136, 191, .2); background: linear-gradient(180deg, rgba(18, 18, 18, .96), rgba(18, 18, 18, .88)); text-align: center; }
h1, h2, h3 { margin: 0 0 1rem; line-height: 1.1; }
h1, h2, h3, .hero-title, .card-title { font-family: SpaceMono, monospace; font-weight: 700; letter-spacing: -.06em; }
h1 { max-width: 920px; color: var(--paper); font-size: clamp(2.8rem, 8vw, 7rem); text-shadow: .08em .08em 0 rgba(164, 136, 191, .2); }
h2 { margin-top: 5rem; color: var(--teal); font-size: clamp(1.6rem, 4vw, 3rem); letter-spacing: .12em; text-transform: uppercase; }
p, li { max-width: 68ch; margin-inline: auto; color: var(--paper-muted); }
a { color: var(--teal); text-underline-offset: .25em; }
a:hover, a:focus-visible { color: var(--acid); }
ul { padding-left: 1.5rem; }

.hero { position: relative; display: grid; min-height: min(72vh, 720px); margin: 1rem 0 5rem; overflow: hidden; place-items: center; border: 2px solid var(--acid); background: var(--ink-soft); box-shadow: 0 0 0 6px rgba(164, 136, 191, .08), 0 1.5rem 3rem rgba(0, 0, 0, .35); }
.hero::before { content: ''; position: absolute; inset: -20%; background-image: url('media/pp-pattern-tile.png'); background-size: 627px 627px; opacity: .62; animation: pattern-scroll 32s linear infinite; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,18,18,.92), rgba(18,18,18,.25)); }
.hero-logo { position: relative; z-index: 1; width: min(82%, 760px); height: auto; filter: drop-shadow(0 0 1.5rem rgba(18,18,18,.85)); }

@keyframes pattern-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-313px, -313px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.hero-content { position: relative; z-index: 1; width: min(100% - 3rem, 980px); padding: 3rem 0; }
.hero-content > span { display: block; }
.eyebrow { color: var(--teal); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.hero-title { margin: 1rem 0; color: var(--paper); font-size: clamp(3rem, 9vw, 8.5rem); line-height: 1; letter-spacing: -.08em; }
.hero-intro { max-width: 42rem; font-size: clamp(1rem, 2vw, 1.35rem); }

.profile-grid, .service-grid { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); width: min(100%, 1040px); margin: 2rem auto 3rem; background: var(--line); }
.project-grid { grid-template-columns: repeat(2, 1fr); }
.profile-card, .service-card, .project-card { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); background: linear-gradient(145deg, rgba(30, 30, 30, .98), rgba(24, 20, 30, .98)); text-align: center; }
.project-card { display: flex; flex-direction: column; }
.project-card { width: min(100%, 760px); margin: 1.5rem auto 2.5rem; }
.profile-card:hover, .project-card:hover, .service-card:hover { background: #28212f; transform: translateY(-2px); }
.card-title { display: block; margin-bottom: 1rem; color: var(--paper); font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.1; }
.project-image { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: contain; margin: 0 0 1.5rem; padding: 1rem; background: var(--ink); }
.project-image.product-image-wide { object-fit: cover; padding: 0; }
.project-image.product-logo { aspect-ratio: 16 / 7; object-fit: contain; }
.card-link { width: 100%; margin-top: auto; }
.project-card p { margin-bottom: 1.5rem; }

main > p a[href*="instagram.com"], main > p a[href*="github.com"], main > p a[href*="store.steampowered.com"], main > p a[href*="discord.gg"] { display: inline-block; margin: .35rem; padding: .7rem 1rem; border: 1px solid var(--teal); background: var(--ink-soft); color: var(--paper); font-weight: 700; text-decoration: none; }
main > p a[href*="instagram.com"]:hover, main > p a[href*="instagram.com"]:focus-visible, main > p a[href*="github.com"]:hover, main > p a[href*="github.com"]:focus-visible, main > p a[href*="store.steampowered.com"]:hover, main > p a[href*="store.steampowered.com"]:focus-visible, main > p a[href*="discord.gg"]:hover, main > p a[href*="discord.gg"]:focus-visible { background: var(--teal); color: var(--ink); }

form { max-width: 760px; margin-top: 1.5rem; }
form input, form textarea { width: 100%; margin: 0 0 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 0; background: var(--ink-soft); color: var(--paper); font: inherit; }
form label { display: block; color: var(--paper-muted); }
form input:focus, form textarea:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
button { border: 1px solid var(--teal); border-radius: 0; padding: .8rem 1.25rem; background: var(--teal); color: var(--ink); font: 700 .85rem SpaceMono, monospace; text-transform: uppercase; cursor: pointer; }
button:hover, button:focus-visible { background: var(--acid); border-color: var(--acid); }

.contact-gate { width: min(100%, 760px); margin: 2rem auto; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--acid); background: rgba(30, 30, 30, .96); }
.contact-gate.locked .contact-email, .contact-gate.locked .contact-form { display: none; }
.game-instructions, .game-status { display: block; max-width: 56ch; margin: 0 auto; color: var(--paper-muted); }
.game-board { display: block; width: min(100%, 27rem); margin: 1.5rem auto; padding: 1rem; border: 1px solid var(--line); background: var(--ink); color: var(--teal); font: 700 clamp(.8rem, 2vw, 1.1rem)/1.35 SpaceMono, monospace; letter-spacing: .1em; text-align: center; white-space: pre; }
.game-controls { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-areas: ". up ." "left down right"; gap: .5rem; width: min(100%, 14rem); margin: 0 auto 2rem; }
.game-up { grid-area: up; }
.game-left { grid-area: left; }
.game-down { grid-area: down; }
.game-right { grid-area: right; }
.game-controls button { min-height: 3rem; }
.contact-email { margin: 1.5rem 0 .25rem; color: var(--teal); font-weight: 700; }
.contact-mailto { margin-bottom: 1.5rem; }
.contact-mailto a { color: var(--teal); }

footer { padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--paper-muted); font-size: .75rem; }
body > p:last-of-type { padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--paper-muted); font-size: .75rem; text-align: center; }
@media (max-width: 760px) {
  body > p:first-of-type, body > ul:first-of-type { width: min(100% - 1rem, var(--measure)); line-height: 1.8; }
  body > ul:first-of-type { gap: .25rem .75rem; font-size: .68rem; }
  main { width: min(100% - 1rem, var(--measure)); padding: 1rem .75rem 3rem; }
  main > h1 { font-size: clamp(2.2rem, 12vw, 4.5rem); overflow-wrap: anywhere; }
  h2 { margin-top: 3.5rem; font-size: clamp(1.5rem, 9vw, 2.6rem); }
  p, li { max-width: 100%; overflow-wrap: anywhere; }
  .hero { min-height: 48vh; margin-bottom: 3rem; }
  .hero-logo { width: min(76%, 360px); }
  .profile-grid, .project-grid, .service-grid { grid-template-columns: 1fr; }
  .project-card, .service-card, .profile-card { width: 100%; margin-inline: auto; padding: 1rem; }
  .project-image { aspect-ratio: 16 / 9; padding: .5rem; }
  .project-image.product-image-wide { padding: 0; }
  .card-link, button { min-height: 3rem; width: 100%; }
  .game-board { padding: .75rem .5rem; font-size: .78rem; letter-spacing: .06em; }
  main > p a[href*="instagram.com"], main > p a[href*="github.com"], main > p a[href*="store.steampowered.com"], main > p a[href*="discord.gg"] { display: block; margin: .5rem auto; max-width: 18rem; }
}
