/* gravi.dev: dressed like Junked!'s menus (teal night, sunburst, hazard tape, chunky yellow buttons). */

@font-face {
  font-family: "Utendo";
  src: url("/assets/fonts/Utendo-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Utendo";
  src: url("/assets/fonts/Utendo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Utendo";
  src: url("/assets/fonts/Utendo-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

:root {
  --accent: rgb(255, 192, 0);
  --accent-light: rgb(255, 212, 64);
  --accent-dark: rgb(232, 168, 0);
  --accent-lip: rgb(188, 124, 0);
  --accent-ink: rgb(12, 24, 29);
  --accent-wash: rgba(255, 192, 0, 0.14);
  --blue: rgb(40, 150, 255);
  --night: rgb(8, 16, 20);
  --panel: rgb(14, 30, 36);
  --panel-raised: rgb(18, 38, 45);
  --slab: rgb(38, 62, 72);
  --slab-light: rgb(52, 84, 97);
  --slab-lip: rgb(20, 34, 40);
  --text: rgb(255, 255, 255);
  --text-soft: rgba(220, 225, 228, 0.84);
  --text-quiet: rgba(220, 225, 228, 0.6);
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* Messagyre's page swaps the yellow for the app's purple. */
.theme-messagyre {
  --accent: rgb(190, 60, 230);
  --accent-light: rgb(208, 96, 240);
  --accent-dark: rgb(160, 30, 200);
  --accent-lip: rgb(100, 14, 128);
  --accent-ink: rgb(255, 255, 255);
  --accent-wash: rgba(190, 60, 230, 0.16);
  --panel: rgb(26, 20, 38);
  --night: rgb(16, 14, 26);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: rgb(8, 16, 20);
  overscroll-behavior: none;
}

html:has(.theme-messagyre) {
  background-color: rgb(16, 14, 26);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: "Utendo", "Trebuchet MS", Verdana, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  overflow-x: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Backdrop: the teal burst and hazard tape of the key art ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 20%, rgba(40, 92, 108, 0.55), rgba(8, 16, 20, 0) 70%),
    repeating-conic-gradient(from 0deg at 50% 20%, rgba(255, 255, 255, 0.028) 0deg 7.5deg, transparent 7.5deg 15deg),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.6px) 0 0 / 14px 14px,
    rgb(10, 24, 29);
}

.theme-messagyre .backdrop {
  background:
    radial-gradient(ellipse 70% 55% at 50% 20%, rgba(110, 40, 140, 0.5), rgba(8, 16, 20, 0) 70%),
    repeating-conic-gradient(from 0deg at 50% 20%, rgba(255, 255, 255, 0.028) 0deg 7.5deg, transparent 7.5deg 15deg),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.6px) 0 0 / 14px 14px,
    rgb(16, 14, 26);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(4, 9, 12, 0.8) 100%);
}

.tape {
  position: absolute;
  width: 620px;
  height: 34px;
  background: repeating-linear-gradient(-55deg, var(--accent) 0 30px, var(--accent-ink) 30px 60px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  opacity: 0.9;
  z-index: 1;
}

.theme-messagyre .tape {
  background: repeating-linear-gradient(-55deg, var(--accent) 0 30px, rgb(26, 12, 36) 30px 60px);
}

.tape--top {
  left: -200px;
  top: 120px;
  rotate: -32deg;
}

.tape--bottom {
  right: -200px;
  bottom: 90px;
  rotate: -32deg;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 16, 20, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.theme-messagyre .site-header {
  background: rgba(16, 14, 26, 0.82);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  color: rgba(220, 225, 228, 0.78);
  background-color: rgba(10, 24, 29, 0.84);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom-width: 3px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  transition:
    color 120ms,
    background-color 120ms,
    border-color 120ms;
}

.nav a:hover {
  color: var(--text);
  background-color: rgba(24, 52, 62, 0.96);
  border-color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--text);
  background-color: var(--accent-wash);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 40px;
  padding: 0;
  color: var(--text);
  background: var(--slab);
  border: 0;
  border-bottom: 3px solid var(--slab-lip);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
  margin: auto;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  padding: 56px 0 72px;
}

section + section {
  margin-top: 72px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  text-wrap: balance;
}

h1 {
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 900;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 900;
  margin-bottom: 20px;
}

h3 {
  font-size: 20px;
  font-weight: 700;
}

p {
  margin: 0;
}

.lead {
  max-width: 640px;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.55;
  text-wrap: pretty;
}

.prose {
  max-width: 720px;
  color: var(--text-soft);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.65;
  text-wrap: pretty;
}

.prose + .prose {
  margin-top: 14px;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 22px;
  overflow: hidden;
  color: var(--text);
  background-color: var(--slab);
  border: 0;
  border-bottom: 4px solid var(--slab-lip);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 120ms ease-out,
    scale 120ms ease-out;
}

.button:hover {
  color: var(--text);
  background-color: var(--slab-light);
  text-decoration: none;
}

.button:active {
  scale: 0.97;
}

.button svg {
  flex: none;
}

.button--primary {
  min-height: 52px;
  color: var(--text);
  background-color: var(--accent);
  border-bottom-width: 5px;
  border-bottom-color: var(--accent-lip);
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* The stripes of the PLAY button, faint over the colour. */
.button--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/img/stripes.png") 0 0 / 120px 224px repeat;
  opacity: 0.14;
  pointer-events: none;
}

.button--primary > * {
  position: relative;
}

.button--primary:hover {
  color: var(--text);
  background-color: var(--accent-light);
  scale: 1.03;
}

.button--primary:active {
  background-color: var(--accent-dark);
  scale: 0.97;
}

.button--off {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  padding: 22px 22px 24px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.card p {
  color: var(--text-soft);
  font-weight: 500;
  line-height: 1.55;
}

.card h3 + p {
  margin-top: 8px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  color: var(--text);
  background: rgba(10, 24, 29, 0.84);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 14px;
}

.card .chips {
  margin-top: 16px;
}

.card .chip {
  min-height: 26px;
  padding: 2px 9px;
  font-size: 12px;
  color: var(--text-soft);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: none;
}

.meta {
  margin-top: 4px;
  color: var(--text-quiet);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Home ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  align-items: center;
}

.hero-badge {
  justify-self: center;
  width: min(340px, 100%);
  rotate: -4deg;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.35));
}

.hero-badge svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-badge text {
  font-family: "Utendo", "Trebuchet MS", sans-serif;
  font-weight: 900;
  paint-order: stroke fill;
  stroke: var(--accent-ink);
  stroke-width: 7px;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-badge {
    animation: bob 4s ease-in-out infinite;
  }

  @keyframes bob {
    50% {
      translate: 0 -8px;
      rotate: -2deg;
    }
  }
}

.feature {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  overflow: hidden;
  color: inherit;
  transition:
    translate 160ms ease-out,
    border-color 160ms;
}

.feature:hover {
  translate: 0 -4px;
  color: inherit;
  text-decoration: none;
}

.feature-art {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--night);
}

.feature-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 300ms ease-out;
}

.feature:hover .feature-art img {
  scale: 1.04;
}

.feature-art--messagyre {
  display: grid;
  place-items: center;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.05) 0deg 7.5deg, transparent 7.5deg 15deg),
    linear-gradient(135deg, rgb(150, 20, 190), rgb(70, 16, 96));
}

.feature-art--messagyre img {
  width: 34%;
  height: auto;
  border-radius: 22%;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.3);
}

.feature-body {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 24px;
}

.feature-body .more {
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent);
}

.feature--purple {
  border-top-color: rgb(190, 60, 230);
}

.feature--purple .more {
  color: rgb(208, 96, 240);
}

/* ---------- CV ---------- */

.cv-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 40px;
  align-items: start;
}

.cv-layout section + section {
  margin-top: 24px;
}

.cv-side {
  display: grid;
  gap: 24px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 22px 24px;
  border-left: 2px solid var(--line);
}

.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 3px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid var(--panel);
  border-radius: 3px;
  rotate: 45deg;
}

.timeline h3 {
  font-size: 18px;
}

.timeline p {
  margin-top: 6px;
}

.card > h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.langs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.langs li {
  display: grid;
  gap: 6px;
}

.langs .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
}

.langs .row span {
  color: var(--text-quiet);
  font-weight: 500;
}

.bar {
  height: 10px;
  background: rgba(10, 24, 29, 0.9);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(-55deg, var(--accent) 0 8px, var(--accent-dark) 8px 16px);
}

/* ---------- Project pages ---------- */

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.shot {
  overflow: hidden;
  border: 3px solid var(--accent-ink);
  border-radius: 12px;
  outline: 3px solid var(--accent);
  box-shadow: 0 14px 0 rgba(0, 0, 0, 0.35);
  rotate: 1.5deg;
}

.tagline {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 16px;
  background: var(--accent-ink);
  border: 3px solid var(--accent);
  border-radius: 8px;
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 900;
  letter-spacing: 0.04em;
  rotate: -1.5deg;
}

.tagline em {
  font-style: normal;
  color: var(--accent);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
}

.facts > div {
  padding: 18px 20px;
}

.facts > div + div {
  border-left: 1px solid var(--line);
}

.facts dt {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.facts dd {
  margin: 6px 0 0;
  font-size: 17px;
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  color: var(--accent-ink);
  background: var(--accent);
  border-bottom: 3px solid var(--accent-lip);
  border-radius: 8px;
}

.maps .card {
  padding: 0;
  overflow: hidden;
}

.maps figure {
  margin: 0;
}

.maps img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.maps figcaption {
  padding: 14px 18px 16px;
}

.maps figcaption p {
  margin-top: 4px;
  font-size: 14px;
}

.app-icon {
  justify-self: center;
  width: min(280px, 70%);
  border-radius: 22%;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.9),
    0 16px 0 rgba(0, 0, 0, 0.35);
  rotate: -4deg;
}

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px;
  background:
    linear-gradient(rgba(14, 30, 36, 0.9), rgba(14, 30, 36, 0.9)),
    url("/assets/img/stripes.png") 0 0 / 120px 224px repeat;
}

.callout .actions {
  margin-top: 0;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-list li {
  display: grid;
  gap: 2px;
}

.contact-list span {
  color: var(--text-quiet);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-list a {
  overflow-wrap: anywhere;
}

.card-link {
  margin-top: 14px;
}

.store-note {
  margin-top: 16px;
  color: var(--text-quiet);
  font-size: 14px;
  font-weight: 500;
}

.store-note strong {
  color: var(--text);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 16, 20, 0.7);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 26px;
  color: var(--text-quiet);
  font-size: 14px;
  font-weight: 500;
}

.site-footer .social a {
  color: var(--accent);
}

.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-soft);
}

/* ---------- Entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 420ms ease-out both;
  }

  .rise:nth-child(2) {
    animation-delay: 70ms;
  }

  .rise:nth-child(3) {
    animation-delay: 140ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      translate: 0 14px;
    }
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .hero,
  .project-hero,
  .cv-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-badge {
    display: none;
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts > div:nth-child(3) {
    border-left: 0;
  }

  .facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .app-icon {
    width: 180px;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }

  main {
    padding-top: 36px;
  }

  section + section {
    margin-top: 56px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 16px;
    background: rgba(8, 16, 20, 0.97);
    border-bottom: 1px solid var(--line);
  }

  .theme-messagyre .nav {
    background: rgba(16, 14, 26, 0.97);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    height: 46px;
    font-size: 16px;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .tape {
    width: 420px;
    height: 24px;
  }

  .tape--top {
    display: none;
  }

  .lead {
    font-size: 17px;
  }
}

/* ---------- Print (the CV page) ---------- */

@media print {
  :root {
    --accent: rgb(200, 140, 0);
    --text: #111;
    --text-soft: #333;
    --text-quiet: #555;
    --line: #ccc;
    --panel: #fff;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 12px;
  }

  .backdrop,
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  main {
    padding: 0;
  }

  h1,
  h2,
  h3,
  .kicker {
    text-shadow: none;
  }

  h1 {
    font-size: 30px;
  }

  .card {
    box-shadow: none;
    border: 0;
    padding: 0;
    break-inside: avoid;
  }

  .chip {
    background: none;
    border-color: #ccc;
    color: #111;
  }

  .cv-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    margin-top: 18px;
  }

  .timeline li::before {
    border-color: #fff;
  }

  .bar {
    background: #eee;
  }

  .rise {
    animation: none;
  }
}
