:root {
  --ink: #101b2a;
  --paper: #f4e8cf;
  --cream: #fff6e4;
  --teal: #155c62;
  --teal-dark: #0c3e45;
  --aqua: #2b9794;
  --coral: #ef5b52;
  --gold: #f4c04a;
  --line: #17202e;
  --shadow: 7px 7px 0 var(--ink);
  --mono: "Courier New", Courier, monospace;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .05;
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, #000 2px 3px);
}

a { color: inherit; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--gold);
  border: 3px solid var(--ink);
}

.skip-link:focus { top: 1rem; }

.topbar {
  height: 70px;
  position: fixed;
  inset: 0 0 auto;
  z-index: 15;
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 4.5rem);
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--cream);
  background: var(--coral);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-weight: 900;
  line-height: 1;
}

.topbar nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.6rem);
  margin: 0 auto;
}

.topbar nav a {
  padding: .4rem .2rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}

.topbar nav a:hover,
.topbar nav a:focus-visible { border-color: var(--coral); }

.status-light {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.status-light span {
  width: 10px;
  height: 10px;
  background: #40b57a;
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 2px rgba(64,181,122,.25);
  animation: blink 2s steps(1) infinite;
}

@keyframes blink { 50% { opacity: .35; } }

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr);
  align-items: center;
  gap: clamp(3rem, 6vw, 8rem);
  padding: 135px clamp(1.25rem, 6vw, 7.5rem) 105px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: 10%;
  right: -14vw;
  width: 44vw;
  aspect-ratio: 1;
  z-index: -1;
  opacity: .35;
  border: 2px dashed var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 6vw rgba(21,92,98,.08), 0 0 0 12vw rgba(21,92,98,.04);
}

.eyebrow,
.terminal-kicker {
  margin: 0 0 1.25rem;
  color: var(--teal);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.eyebrow::before { content: "> "; color: var(--coral); }

h1, h2, h3, p { margin-top: 0; }

.hero h1,
.section h2 {
  margin-bottom: 1.5rem;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .015em;
  line-height: .96;
  text-transform: uppercase;
}

.hero h1 { font-size: clamp(4rem, 7.3vw, 8.2rem); }
.hero h1 span, .about h2 span, .contact h2 span { color: var(--coral); }

.hero-intro {
  max-width: 620px;
  margin-bottom: 2rem;
  font-size: clamp(1rem, 1.25vw, 1.25rem);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.pixel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 52px;
  padding: .75rem 1.15rem;
  cursor: pointer;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .12s, box-shadow .12s;
}

.pixel-button.primary { color: var(--cream); background: var(--coral); }
.pixel-button:hover, .pixel-button:focus-visible { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }

.quick-stats {
  display: flex;
  margin: 3.2rem 0 0;
}

.quick-stats div { padding: 0 1.7rem; border-left: 2px solid rgba(16,27,42,.3); }
.quick-stats div:first-child { padding-left: 0; border-left: 0; }
.quick-stats dt { font-family: var(--display); font-size: 1.5rem; line-height: 1; }
.quick-stats dd { margin: .3rem 0 0; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.window {
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.window-bar {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .25rem .45rem .25rem .7rem;
  color: var(--cream);
  background: var(--teal);
  border-bottom: 3px solid var(--ink);
}

.window-bar h2, .window-bar h3, .window-bar h1 { margin: 0; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; }
.window-controls { display: flex; gap: 4px; }
.window-controls span { display: grid; width: 23px; height: 23px; place-items: center; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); font-weight: 900; line-height: 1; }

.game-window { position: relative; transform: rotate(1.2deg); }
.game-window::before {
  content: "PLAY ME";
  position: absolute;
  right: -20px;
  top: -42px;
  z-index: 2;
  padding: .35rem .7rem;
  color: var(--ink);
  background: var(--gold);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: .65rem;
  font-weight: 900;
  transform: rotate(4deg);
}

.game-screen { position: relative; background: #102632; }
#piggy-game { display: block; width: 100%; height: auto; image-rendering: pixelated; }
#piggy-game:focus-visible { outline: 4px solid var(--gold); outline-offset: -6px; }

.game-hud {
  position: absolute;
  inset: 10px 13px auto;
  display: flex;
  justify-content: space-between;
  color: var(--cream);
  font-size: .7rem;
  letter-spacing: .08em;
  pointer-events: none;
  text-shadow: 2px 2px #000;
}

.game-message {
  position: absolute;
  left: 50%;
  bottom: 13px;
  padding: .25rem .55rem;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  font-size: .6rem;
  white-space: nowrap;
  transform: translateX(-50%);
}

.flap-button {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 82px;
  height: 42px;
  padding: 0 .6rem;
  color: var(--ink);
  background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  touch-action: manipulation;
}
.flap-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  transform: translateX(-50%);
}

.scroll-cue span { color: var(--coral); font-size: 1.1rem; }

.section { padding: clamp(5rem, 9vw, 9rem) clamp(1.25rem, 7vw, 9rem); }
.section-label { display: flex; align-items: center; gap: .8rem; margin-bottom: 2.5rem; font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.section-label::after { content: ""; width: 55px; height: 2px; background: currentColor; opacity: .4; }
.section-label span { display: grid; width: 30px; height: 30px; place-items: center; color: var(--cream); background: var(--teal); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.section-label.light span { color: var(--ink); background: var(--gold); }

.about { position: relative; background: var(--cream); border-block: 3px solid var(--ink); }
.about::after { content: ""; position: absolute; right: 4vw; bottom: 2rem; width: 90px; height: 90px; opacity: .08; background: repeating-linear-gradient(45deg, var(--ink) 0 4px, transparent 4px 10px); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 8vw, 9rem); }
.about h2 { font-size: clamp(3rem, 5vw, 6.5rem); }
.about-copy { max-width: 720px; font-size: 1.05rem; }
.about-copy p:first-child::first-letter { float: left; margin: .1rem .5rem 0 0; color: var(--coral); font-family: var(--display); font-size: 4.5rem; line-height: .78; }
.skill-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.3rem; }
.skill-row span { padding: .35rem .65rem; color: var(--teal); border: 2px solid var(--teal); font-size: .68rem; font-weight: 900; letter-spacing: .08em; }

.ventures { color: var(--cream); background: var(--teal-dark); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 3rem; margin-bottom: 3.5rem; }
.section-heading h2 { max-width: 750px; margin-bottom: 0; font-size: clamp(3rem, 5.5vw, 6.8rem); }
.section-heading p { max-width: 420px; margin-bottom: .5rem; color: #bad1cb; }

.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid #8ab5ae; }
.project-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  color: var(--cream);
  background: var(--teal-dark);
  border-right: 2px solid #8ab5ae;
  text-decoration: none;
  transition: color .18s, background .18s, transform .18s;
}
.project-card:last-child { border-right: 0; }
.project-card:hover, .project-card:focus-visible { z-index: 1; color: var(--ink); background: var(--gold); transform: translateY(-10px); outline: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--coral); }
.project-topline { display: flex; justify-content: space-between; font-size: .61rem; letter-spacing: .09em; text-transform: uppercase; }
.project-visual {
  position: relative;
  height: 150px;
  margin: 2rem 0 1.8rem;
  overflow: hidden;
  color: var(--cream);
  background-color: #123b43;
  background-image: linear-gradient(rgba(138,181,174,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(138,181,174,.14) 1px, transparent 1px);
  background-size: 16px 16px;
  border: 2px solid #5a918a;
  box-shadow: 4px 4px 0 rgba(16,27,42,.55);
}
.project-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 5px rgba(16,27,42,.16); }
.project-visual-label { position: absolute; z-index: 2; top: 7px; right: 8px; color: #b8d1cb; font-size: .5rem; font-weight: 900; letter-spacing: .08em; }
.project-logo-plinth {
  position: absolute;
  inset: 24px 14px 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.project-logo { display: block; width: 88px; height: 88px; object-fit: contain; }
.project-visual.bot .project-logo { width: 94px; height: 94px; }
.project-visual.chart .project-logo { width: 98px; height: 98px; }
.project-visual.cross .project-logo { width: 91px; height: 91px; }
.project-visual.torii .project-logo { width: 100px; height: 100px; image-rendering: pixelated; }
.project-card:hover .project-visual, .project-card:focus-visible .project-visual { background-color: #f7d778; border-color: var(--ink); }
.project-card:hover .project-visual-label, .project-card:focus-visible .project-visual-label { color: var(--ink); }
.project-card:hover .project-logo-plinth, .project-card:focus-visible .project-logo-plinth { background: #fffaf0; }
.project-card h3 { margin-bottom: .8rem; font-family: var(--display); font-size: 1.65rem; letter-spacing: .03em; line-height: 1; text-transform: uppercase; }
.project-card p { color: #bad1cb; font-size: .85rem; }
.project-card:hover p, .project-card:focus-visible p { color: var(--ink); }
.project-footer { display: flex; align-items: end; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: 1.5rem; border-top: 1px dashed currentColor; font-size: .61rem; letter-spacing: .07em; }
.project-footer strong { font-size: .78rem; }

.torii-section { min-height: 760px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(3rem, 9vw, 10rem); background: var(--paper); border-bottom: 3px solid var(--ink); }
.torii-art { min-height: 500px; position: relative; display: grid; place-items: center; overflow: hidden; background: var(--teal); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.torii-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, var(--teal-dark) 60%); }
.torii-art::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: 14%; height: 55px; background: var(--teal-dark); transform: skewY(-5deg); box-shadow: 0 50px 0 #0a3036; }
.sun { position: absolute; width: min(30vw, 310px); aspect-ratio: 1; background: var(--gold); border: 3px solid var(--ink); border-radius: 50%; }
.gate { position: relative; z-index: 1; width: 68%; height: 62%; border-top: 34px solid var(--coral); border-inline: 27px solid var(--coral); filter: drop-shadow(9px 9px 0 var(--ink)); }
.gate::before { content: ""; position: absolute; left: -14%; right: -14%; top: -63px; height: 25px; background: var(--coral); border: 3px solid var(--ink); }
.gate i { position: absolute; left: -8%; right: -8%; top: 30px; height: 20px; background: var(--coral); border: 3px solid var(--ink); }
.torii-copy { max-width: 660px; }
.torii-copy h2 { font-size: clamp(3.3rem, 5.7vw, 7rem); }
.torii-copy > p { max-width: 610px; font-size: 1.03rem; }
.text-link { display: inline-block; margin-top: 1.6rem; color: var(--teal); font-size: .77rem; font-weight: 900; letter-spacing: .09em; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.text-link span { color: var(--coral); }

.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 9vw, 10rem); align-items: center; color: var(--cream); background: var(--ink); }
.contact h2 { font-size: clamp(3.4rem, 6vw, 7.2rem); }
.contact-copy > p { max-width: 480px; color: #bdc5cd; }
.privacy-note { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px dashed #6c7580; color: #bdc5cd; font-size: .75rem; }
.privacy-note > span { display: grid; flex: 0 0 42px; height: 42px; place-items: center; color: var(--gold); border: 2px solid var(--gold); }
.privacy-note p { margin: 0; }
.privacy-note strong { color: var(--cream); }

.contact-window { color: var(--ink); transform: rotate(-.4deg); }
.contact-window form { padding: clamp(1.2rem, 3vw, 2.4rem); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.contact-window label { display: block; margin-bottom: 1rem; font-size: .67rem; font-weight: 900; letter-spacing: .08em; }
.contact-window label span { font-weight: 400; }
.contact-window input, .contact-window textarea { width: 100%; margin-top: .35rem; padding: .78rem .85rem; color: var(--ink); background: #fffdf6; border: 2px solid var(--ink); border-radius: 0; outline: none; resize: vertical; }
.contact-window input:focus, .contact-window textarea:focus { box-shadow: 4px 4px 0 var(--aqua); }
.contact-window input::placeholder, .contact-window textarea::placeholder { color: #7e8389; }
.send-button { width: 100%; margin-top: .4rem; }
.form-status { min-height: 1.2rem; margin: .8rem 0 0; color: #a02f36; font-size: .72rem; font-weight: 700; text-align: center; }
.trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.success-message { min-height: 410px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; }
.success-message > span { display: grid; width: 70px; height: 70px; place-items: center; margin-bottom: 1.5rem; color: var(--cream); background: #3a9668; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); font-size: 2rem; }
.success-message h3 { font-family: var(--display); font-size: 2rem; text-transform: uppercase; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.25rem, 5vw, 5rem); background: var(--paper); border-top: 3px solid var(--ink); }
footer p { margin: 0; font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-align: center; }

.message-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--teal); }
.message-box { width: min(620px, 100%); }
.message-content { display: grid; justify-items: center; gap: 1.25rem; padding: 3rem; text-align: center; }
.message-icon { display: grid; width: 68px; height: 68px; place-items: center; color: var(--cream); background: var(--coral); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); font-family: var(--display); font-size: 2.5rem; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; }
  .hero-copy { max-width: 780px; }
  .game-window { width: min(720px, 100%); margin-inline: auto; }
  .scroll-cue { display: none; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card:nth-child(2) { border-right: 0; }
  .project-card:nth-child(-n+2) { border-bottom: 2px solid #8ab5ae; }
  .torii-section { grid-template-columns: .9fr 1.1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact-copy { max-width: 700px; }
}

@media (max-width: 760px) {
  .topbar { height: 62px; padding-inline: 1rem; }
  .topbar nav { display: none; }
  .status-light { margin-left: auto; }
  .hero { padding: 110px 1.25rem 5rem; }
  .hero h1 { font-size: clamp(3.6rem, 18vw, 6rem); }
  .hero-intro { font-size: .95rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .pixel-button { width: 100%; }
  .quick-stats { justify-content: space-between; }
  .quick-stats div { padding-inline: .8rem; }
  .quick-stats dt { font-size: 1.15rem; }
  .quick-stats dd { font-size: .5rem; }
  .game-window::before { right: -4px; }
  .game-message { left: 10px; bottom: 10px; transform: none; }
  .flap-button { display: block; }
  .section { padding: 5rem 1.25rem; }
  .about-grid, .torii-section { grid-template-columns: 1fr; }
  .about h2, .section-heading h2, .torii-copy h2, .contact h2 { font-size: clamp(3.1rem, 14vw, 5rem); }
  .section-heading { align-items: start; flex-direction: column; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 370px; border-right: 0; border-bottom: 2px solid #8ab5ae; }
  .project-card:nth-child(3) { border-bottom: 2px solid #8ab5ae; }
  .project-card:last-child { border-bottom: 0; }
  .project-visual { height: 175px; margin-block: 1.6rem 1.5rem; }
  .torii-art { min-height: 380px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  footer { align-items: flex-start; flex-direction: column; }
  footer p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
