﻿/* ==========================================================================
   C64-style portfolio - stylesheet
   Replicates the layout, palette, type scale and effects of the reference
   site. Class names are readable equivalents of the original CSS-module
   hashes; the property values are kept identical.
   ========================================================================== */

/* ---------- Font ---------- */
/* Drop the real "C64 Pro Mono" font into /fonts (see fonts/README.md).
   Until then the page falls back to "Press Start 2P" (loaded in the HTML
   head) and then to the system monospace stack. */
@font-face {
  font-family: "C64 Pro Mono";
  src: url(../fonts/C64-Pro-Mono.woff2) format("woff2");
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --c64-screen: #40318d;
  --c64-border-light: #7b71d6;
  --c64-border-dark: #2b2170;
  --c64-rule: #4d3fa8;
  --c64-trough: #372a80;
  --c64-ink: #cfc9f7;
  --c64-secondary: #b3acef;
  --c64-white: #ffffff;
  --c64-chip-ink: #0c0836;
  --c64-cyan: #aaffee;
  --c64-yellow: #eeee77;
  --c64-orange: #dd8855;
  --c64-orange-ink: #f0b08a;
  --c64-green: #aaff66;
  --c64-grey: #adadad;
  --c64-magenta: #cc44cc;
  --c64-red: #ff7777;
  --c64-red-ink: #ffb3b3;
  --c64-case-top: #cdc4ae;
  --c64-case-mid: #bdb39c;
  --c64-case-bottom: #a89e88;
  --c64-bezel: #2a2438;
  --c64-font: "C64 Pro Mono", "Press Start 2P", ui-monospace, "Courier New", monospace;
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 3rem;
  --fs-100: clamp(10px, 2vw, 13px);
  --fs-200: clamp(11px, 2.1vw, 14px);
  --fs-300: clamp(12px, 2.3vw, 16px);
  --fs-400: clamp(13px, 2.4vw, 17px);
  --fs-500: clamp(14px, 2.6vw, 18px);
  --fs-600: clamp(15px, 2.8vw, 20px);
  --fs-700: clamp(18px, 3.4vw, 24px);
  --fs-800: clamp(20px, 4.4vw, 30px);
  --fs-900: clamp(22px, 5vw, 34px);
}

/* ---------- Reboot (the subset of Bootstrap reboot the layout relies on) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; overflow: hidden; }
body {
  margin: 0;
  background: #0a0a0c;
  font-family: var(--c64-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: none;
}
#root { height: 100%; }
@media (max-width: 575.98px) {
  html, body, #root { height: auto; overflow: visible; }
}
* { overflow-wrap: anywhere; }
h1, h2, h3, h4 { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
p { margin-top: 0; margin-bottom: 1rem; }
ul, ol { margin-top: 0; margin-bottom: 1rem; padding-left: 2rem; }
blockquote { margin: 0 0 1rem; }
strong { font-weight: bolder; }
img, svg { vertical-align: middle; }
img { max-width: 100%; }
a { color: var(--c64-cyan); text-decoration: none; border-bottom: 2px solid var(--c64-screen); }
a:hover { color: var(--c64-yellow); border-bottom-color: var(--c64-yellow); }
input, button { font-family: inherit; }
button { margin: 0; font-size: inherit; line-height: inherit; border-radius: 0; text-transform: none; }
:focus-visible { outline: 3px solid var(--c64-yellow); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Utilities (Bootstrap-equivalent subset) ---------- */
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-none { display: none !important; }
@media (min-width: 576px) { .d-sm-flex { display: flex !important; } }
.flex-wrap { flex-wrap: wrap !important; }
.flex-wrap-reverse { flex-wrap: wrap-reverse !important; }
.flex-column { flex-direction: column !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-stretch { align-items: stretch !important; }
.align-items-baseline { align-items: baseline !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ms-2 { margin-left: .5rem !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pt-3 { padding-top: 1rem !important; }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: 0; left: 0; z-index: 1080;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c64-yellow); color: var(--c64-chip-ink);
  border: none; font-size: var(--fs-300); text-decoration: none;
  transform: translateY(-101%); transition: transform .15s ease;
}
.skip-link:focus-visible { transform: translateY(0); outline-offset: -3px; }
.skip-link:hover { color: var(--c64-chip-ink); }

/* ---------- Machine: case, bezel, screen ---------- */
@keyframes c64-flicker { 0%, to { opacity: .96; } 47% { opacity: 1; } 71% { opacity: .93; } }
@keyframes c64-led { 0%, to { opacity: 1; } 50% { opacity: .5; } }

.outer {
  height: 100dvh; min-height: 100dvh; box-sizing: border-box;
  padding: clamp(8px, 2vw, 26px) clamp(6px, 2vw, 20px);
  background: radial-gradient(120% 90% at 50% 0%, #16161d, #0a0a0c 70%);
  display: flex; justify-content: center;
}
.limiter { width: 100%; max-width: 1280px; margin: 0 auto; min-height: 0; display: flex; }
.case {
  flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  padding: clamp(10px, 2.4vw, 26px) clamp(10px, 2.4vw, 26px) clamp(10px, 2vw, 20px);
  background: linear-gradient(180deg, var(--c64-case-top) 0%, var(--c64-case-mid) 40%, var(--c64-case-bottom) 100%);
  border-radius: 22px;
  box-shadow: 0 40px 90px #000000a6, inset 0 2px #ffffff73, inset 0 -3px #0003;
}
.bezel {
  flex: 1; min-width: 0; min-height: 0; display: flex; position: relative;
  padding: clamp(8px, 2.4vw, 26px);
  background: var(--c64-bezel); border-radius: 18px;
  box-shadow: inset 0 0 0 3px #8a8070, inset 0 0 40px #000000e6;
}
.inner-bezel {
  flex: 1; min-width: 0; display: flex; position: relative;
  padding: clamp(10px, 2.4vw, 26px) clamp(8px, 1.8vw, 20px);
  background: var(--c64-border-light); border-radius: 14px;
}
.screen {
  flex: 1; min-width: 0; min-height: 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--c64-screen); color: var(--c64-ink); border-radius: 6px;
  font-size: var(--fs-500); line-height: 1.75;
  text-shadow: 0 0 8px rgba(170, 255, 238, .28);
}
.scanlines, .glare { position: absolute; inset: clamp(8px, 2.4vw, 26px); border-radius: 14px; pointer-events: none; }
.scanlines {
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .2) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply; animation: c64-flicker 6s infinite;
}
.glare {
  box-shadow: inset 0 0 90px #0009, inset 0 0 200px #00000059;
  background: radial-gradient(120% 70% at 30% -10%, #ffffff1a, #fff0 55%);
}
.plate {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding: var(--sp-3) var(--sp-2) 0;
}
.plate > span:first-child { color: #2b2720; font-size: var(--fs-300); letter-spacing: .16em; }
.plate > span:first-child span { color: #7a3f2f; }
.plate > span:last-child {
  text-transform: uppercase; display: flex; align-items: center; gap: var(--sp-2);
  color: #3a352c; font-size: var(--fs-100); white-space: nowrap;
}
.plate > span:last-child span {
  width: 9px; height: 9px; border-radius: 50%; background: #d9412f;
  box-shadow: 0 0 8px #ff5a44; animation: c64-led 3.4s infinite;
}
@media (max-width: 575.98px) {
  .outer { height: auto; }
  .limiter, .case, .bezel, .inner-bezel, .screen { min-height: 0; }
}

/* ---------- Program tabs ---------- */
.tabs {
  flex: none; position: relative; z-index: 50; min-width: 0;
  background: var(--c64-border-dark); border-radius: 6px 6px 0 0; overflow: hidden;
}
.tabs a {
  flex: 0 0 25%; gap: var(--sp-2); overflow: hidden;
  padding: var(--sp-2) clamp(3px, .7vw, 14px);
  background: var(--c64-border-dark); color: var(--c64-ink);
  border: none; border-bottom: 0; text-decoration: none;
  box-shadow: inset -1px 0 #ffffff1f, inset 0 -3px #00000047;
  transition: background .1s;
}
.tabs a:hover { background: #6a5fc9; color: var(--c64-ink); }
.tabs a.active { background: var(--tab-accent); color: var(--c64-chip-ink); box-shadow: inset -1px 0 #ffffff1f; }
.tabs a.active:hover { background: var(--tab-accent); color: var(--c64-chip-ink); }
.tabs a.active span:first-child { background: var(--c64-chip-ink); }
.tabs a span:first-child { flex: none; width: 9px; height: 9px; background: var(--tab-accent); }
.tabs a span:last-child { text-transform: uppercase; font-size: var(--fs-100); white-space: nowrap; }
@media (max-width: 640px) { .tabs a { flex-basis: 50%; } }

/* ---------- Scroll area + custom scrollbar ---------- */
.row-main { flex: 1; min-width: 0; min-height: 0; }
.scroller {
  flex: 1; min-width: 0; min-height: 0; overflow-y: auto;
  padding: clamp(20px, 3vw, 40px) clamp(16px, 3.5vw, 56px);
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { width: 0; height: 0; }
.scrollbar { flex: none; width: 26px; background: var(--c64-trough); border-left: 2px solid var(--c64-border-dark); }
.scrollbar button {
  flex: none; width: 26px; height: 26px;
  background: var(--c64-border-light); color: var(--c64-chip-ink);
  border: none; font-size: var(--fs-100); line-height: 1; cursor: pointer;
}
.scrollbar button:hover { background: var(--c64-cyan); border-bottom: 1px solid var(--c64-bezel); }
.scrollbar > div {
  flex: 1; width: 100%; position: relative; cursor: pointer;
  background: repeating-linear-gradient(to bottom, var(--c64-screen) 0 2px, var(--c64-trough) 2px 4px);
}
.scrollbar > div span {
  position: absolute; left: -1px; right: 0; background: var(--c64-cyan);
  box-shadow: inset 0 0 0 0 var(--c64-screen); cursor: grab; touch-action: none;
}
@media (max-width: 575.98px) { .scroller { overflow-y: visible; } }

/* ---------- Contact keys (on the case plate) ---------- */
.plate-links { min-width: 0; }
.key {
  text-transform: uppercase; flex: none; padding: var(--sp-2) var(--sp-3);
  background: #39352c; color: #e8e0cc; border: none;
  box-shadow: inset 0 2px #5c5648, inset 0 -2px #20190b;
  font-size: var(--fs-100); white-space: nowrap; cursor: pointer;
}
.key:hover { background: #46402f; color: #fff; }
.key:active { box-shadow: inset 0 2px #20190b, inset 0 -2px #5c5648; }

/* ---------- Boot sequence overlay ---------- */
@keyframes c64-blink { 0%, 49% { opacity: 1; } 50%, to { opacity: 0; } }
.boot {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 45; overflow: auto;
  padding: clamp(14px, 2.4vw, 26px);
  background: var(--c64-screen); color: var(--c64-ink);
  font-size: var(--fs-300); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere;
}
.cursor {
  display: inline-block; width: .6em; height: 1em; background: var(--c64-ink);
  vertical-align: -.15em; animation: c64-blink 1s steps(1) infinite;
}

/* ---------- Program loader overlay ---------- */
@keyframes c64-load {
  0% { background-color: #40318d; }
  12% { background-color: #7b71d6; }
  25% { background-color: #afe; }
  37% { background-color: #ee7; }
  50% { background-color: #d85; }
  62% { background-color: #c4c; }
  75% { background-color: #af6; }
  87% { background-color: #f77; }
  to { background-color: #40318d; }
}
@keyframes c64-blink-fast { 0%, 49% { opacity: 1; } 50%, to { opacity: 0; } }
.loader {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; overflow: hidden;
  border-radius: 6px; background: var(--c64-screen);
}
.stripes { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; }
.stripes > span { display: block; flex: 1; background-color: var(--c64-screen); animation: c64-load .5s linear infinite; }
.loader-panel {
  position: absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%, -50%);
  min-width: min(320px, 76%); max-width: 88%; padding: var(--sp-4);
  background: var(--c64-screen); border: 3px solid var(--c64-border-light); text-align: center;
}
.loader-panel p { text-transform: uppercase; margin: 0; color: var(--c64-green); font-size: var(--fs-300); }
.loader-panel p + p { margin-top: var(--sp-2); color: var(--c64-white); font-size: var(--fs-600); overflow-wrap: anywhere; }
.loader-panel p + p span { animation: c64-blink-fast .5s steps(1) infinite; }

/* ---------- Lightbox ---------- */
.backdrop {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3);
  padding: clamp(12px, 3vw, 34px); background: #0c0836f0; cursor: zoom-out;
}
.backdrop img {
  display: block; flex: 0 1 auto; min-height: 0; width: auto; height: auto; max-width: 100%; max-height: 100%;
  margin: 0 auto; border: 3px solid var(--c64-border-light); image-rendering: pixelated; cursor: default;
}
.backdrop button {
  position: absolute; bottom: 12px; left: 50%; transform: translate(-50%);
  padding: var(--sp-3) var(--sp-4); background: var(--c64-yellow); color: var(--c64-chip-ink);
  border: none; font-size: var(--fs-200); cursor: pointer;
}
.backdrop button:hover { background: var(--c64-white); }

/* ---------- Pixel sprites ---------- */
.sprite { flex: none; display: grid; grid-template-columns: repeat(16, var(--sprite-cell)); grid-auto-rows: var(--sprite-cell); image-rendering: pixelated; }
.sprite > span { display: block; width: var(--sprite-cell); height: var(--sprite-cell); }

/* ---------- Shared bits: chips, labels, toggles ---------- */
@keyframes c64-blink-chip { 0%, 49% { opacity: 1; } 50%, to { opacity: 0; } }
.chip { text-transform: uppercase; flex: none; padding: var(--sp-2) var(--sp-3); color: var(--c64-chip-ink); font-size: var(--fs-200); white-space: nowrap; }
.chip.orange { background: var(--c64-orange); padding: var(--sp-1) var(--sp-2); font-size: var(--fs-100); }
.chip.green { background: var(--c64-green); }
.chip.yellow { background: var(--c64-yellow); padding: var(--sp-1) var(--sp-2); font-size: var(--fs-100); }
.chip.secondary { background: var(--c64-secondary); }
.blinker { width: 10px; height: 10px; background: var(--c64-chip-ink); animation: c64-blink-chip 1.2s steps(1) infinite; }

.toggle-link { text-transform: uppercase; background: transparent; border: none; color: var(--c64-yellow); font-size: var(--fs-200); text-decoration: underline; cursor: pointer; }
.toggle-link:hover { color: var(--c64-white); }

.label { text-transform: uppercase; display: inline-block; margin: 0; padding: var(--sp-1) var(--sp-3); color: var(--c64-chip-ink); font-size: var(--fs-200); font-weight: 400; line-height: 1.5; }
.label.secondary { background: var(--c64-secondary); }
.label.light { background: var(--c64-border-light); }
.label.yellow { background: var(--c64-yellow); }

/* ---------- Home: intro ---------- */
.home-page > p { margin: var(--sp-3) 0 0; max-width: 62ch; font-size: var(--fs-500); line-height: 1.85; text-wrap: pretty; }
.availability { border: none; }
/* Photo and availability tag are centred together as one group; the intro text sits centred underneath. */
.intro-top { display: flex; justify-content: center; align-items: flex-start; gap: var(--sp-4); }
.intro-top img { flex: 0 1 460px; min-width: 0; height: auto; display: block; border: 3px solid var(--c64-border-light); }
.intro-tag { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); text-align: left; }
.intro-tag .availability { display: block; }
.intro-tag .chip { font-size: var(--fs-200); width: 15ch; min-height: 5em; white-space: normal; line-height: 1.5; text-wrap: balance; }
.intro-tag { --tag-w: 210px; }
.intro-tag .chip { width: var(--tag-w); min-height: 5em; box-sizing: border-box; }
.intro-tag .availability { display: block; width: var(--tag-w); }
.intro-tag .availability .chip { min-height: 5em; }
/* Blocks step from green to light blue (the contact-button colors), top to bottom. */
.intro-tag .availability .chip { background: var(--c64-green); }
.intro-tag > .chip:nth-child(2) { background: color-mix(in srgb, var(--c64-green), var(--c64-cyan)); }
.intro-tag > .chip:nth-child(3) { background: var(--c64-cyan); }
@media (max-width: 700px) {
  .intro-top { flex-direction: column; align-items: center; gap: var(--sp-3); }
  .intro-top img { flex: none; width: 100%; max-width: 460px; }
  .intro-tag { flex: none; align-items: center; }
}
.intro { text-align: center; }
.intro h1, .intro p, .home-page > p { margin-inline: auto; text-align: center; }
.intro h1 { margin-top: var(--sp-4); margin-bottom: var(--sp-3); max-width: 62ch; color: var(--c64-white); font-size: var(--fs-500); font-weight: 400; line-height: 1.85; text-wrap: pretty; }
.intro h1 span { color: var(--c64-cyan); }
.intro p { margin-top: 0; margin-bottom: 0; max-width: 62ch; font-size: var(--fs-500); line-height: 1.85; text-wrap: pretty; }

/* ---------- Home: skills ---------- */
.skills { border: 4px solid rgb(170, 255, 238); background-color: #3e24a4; }
.skills > div { background-color: #afe; }
.skills > div h2.label { background-color: #afe; }
.skill-rows { max-width: 54ch; list-style: none; }
.skill-rows li {
  display: grid; grid-template-columns: 1fr 4ch; grid-template-areas: "name name" "bar years";
  gap: var(--sp-1) clamp(8px, 1.6vw, 14px); align-items: center; padding: var(--sp-2) 0; font-size: var(--fs-200);
}
.skill-rows li:hover .skill-fill, .skill-rows li:focus-visible .skill-fill { background: var(--c64-yellow); }
.skill-name { text-transform: uppercase; grid-area: name; color: var(--c64-white); overflow-wrap: normal; }
.skill-track { grid-area: bar; display: block; height: 16px; background: var(--c64-rule); }
.skill-fill { display: block; height: 16px; background: var(--c64-cyan); }
.skill-years { text-transform: uppercase; grid-area: years; color: var(--c64-secondary); text-align: right; white-space: nowrap; }
@media (min-width: 560px) {
  .skill-rows li { grid-template-columns: minmax(0, 19ch) minmax(48px, 1fr) 4ch; grid-template-areas: "name bar years"; gap: clamp(8px, 1.6vw, 14px); }
}
.skill-note { text-transform: uppercase; min-height: 60px; color: var(--c64-cyan); font-size: var(--fs-400); line-height: 1.75; text-wrap: pretty; }

/* ---------- Home: photo collage ---------- */
.collage-row { display: flex; justify-content: center; align-items: center; list-style: none; padding-block: var(--sp-5); }
.collage-row li {
  flex: 0 1 22%; aspect-ratio: 3 / 4; margin-inline: -2%; position: relative;
  border: 4px solid var(--c64-border-light); background: var(--c64-trough);
  box-shadow: 4px 4px 0 var(--c64-border-dark); overflow: hidden; outline: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.collage-row li:nth-child(1) { transform: rotate(-4deg); z-index: 1; }
.collage-row li:nth-child(2) { transform: rotate(2deg) translateY(10%); z-index: 2; }
.collage-row li:nth-child(3) { transform: rotate(-2deg); z-index: 3; }
.collage-row li:nth-child(4) { transform: rotate(3deg) translateY(10%); z-index: 2; }
.collage-row li:nth-child(5) { transform: rotate(-3deg); z-index: 1; }
.collage-row li:hover, .collage-row li:focus-visible {
  transform: rotate(0) scale(1.06); z-index: 10; border-color: var(--c64-cyan); box-shadow: 6px 6px 0 var(--c64-border-dark);
}
.collage-row img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .collage-row li { transition: none; } }

/* ---------- Home: recommendations ---------- */
.recs { border: 4px solid rgb(221, 136, 85); }
.recs > div { background-color: #d85; }
.recs > div h2.label { background-color: #d85; }
.recs-list { max-width: 68ch; list-style: none; }
.recs-list li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.recs-list img {
  flex: none; width: clamp(48px, 7vw, 64px); height: auto; aspect-ratio: 1;
  border: 3px solid var(--c64-border-light);
  background: repeating-conic-gradient(var(--c64-rule) 0% 25%, var(--c64-screen) 0% 50%) 50% / 8px 8px;
  image-rendering: pixelated;
}
.recs-list li > div { flex: 1; min-width: 0; }
.recs-list blockquote { margin: 0; color: var(--c64-white); font-size: var(--fs-500); line-height: 1.85; white-space: pre-line; text-wrap: pretty; }
.recs-list p { margin: var(--sp-3) 0 0; font-size: var(--fs-200); }
.recs-list p + p { margin-top: var(--sp-1); color: var(--c64-secondary); font-size: var(--fs-100); line-height: 1.6; text-wrap: pretty; }
.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Resume ---------- */
.roles { list-style: none; }
.download { text-transform: uppercase; font-size: var(--fs-300); }
.entry { border-bottom: 2px solid var(--c64-rule); }
.entry > div:first-child { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); align-items: baseline; justify-content: space-between; }
.entry > div:first-child > span:first-child { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.entry > div:first-child span > span {
  flex: none; width: 52px; height: 44px; border: 2px solid var(--c64-border-light);
  background-color: #fff; background-size: calc(100% - 10px) auto; background-repeat: no-repeat; background-position: center;
  image-rendering: pixelated;
}
/* Columbia's logo sits on a solid blue field, so pad it with the same blue instead of white */
.entry > div:first-child span > span[style*="logo-columbia"] { background-color: #0c2c77; }
.entry > div:first-child h2 { margin: 0; color: var(--c64-white); font-size: var(--fs-600); font-weight: 400; line-height: 1.4; }
.entry > p:last-of-type { margin: var(--sp-3) 0 0; max-width: 68ch; color: var(--c64-white); font-size: var(--fs-300); line-height: 1.8; text-wrap: pretty; }
.entry > div:last-child { margin-top: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; }
.entry-date { text-transform: uppercase; color: var(--c64-orange-ink); font-size: var(--fs-200); white-space: nowrap; }
.entry-sub { margin-top: var(--sp-1); display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); align-items: baseline; justify-content: space-between; color: var(--c64-secondary); font-size: var(--fs-200); }
.entry-sub span:last-child { margin-left: auto; text-align: right; }
.edu dl { margin: var(--sp-3) 0 0; max-width: 68ch; }
.edu dl > div { display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); margin: var(--sp-1) 0; font-size: var(--fs-300); line-height: 1.75; }
.edu dt { color: var(--c64-cyan); font-weight: 400; }
.edu dd { margin: 0; color: var(--c64-white); }
.edu dd ul { margin: 0; padding-left: 1.25em; list-style: disc; }
.entry.edu > div:last-child > span.chip { flex: none; color: var(--c64-chip-ink); }
.entry > div:last-child > span:last-child { flex: 1 1 240px; min-width: 0; color: var(--c64-secondary); font-size: var(--fs-200); line-height: 1.7; text-wrap: pretty; }

/* ---------- Projects index ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); list-style: none; }
.cell { display: flex; }
.card-title { flex: 1; min-width: 0; container-type: inline-size; }
.status { text-transform: uppercase; display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-1); color: var(--c64-grey); font-size: var(--fs-200); }
.status span { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c64-grey); }
.status.live { color: var(--c64-green); }
.status.live span { background: var(--c64-green); box-shadow: 0 0 6px var(--c64-green); }
.card { display: flex; flex-direction: column; width: 100%; background: transparent; color: var(--c64-ink); border: 3px solid var(--c64-yellow); text-decoration: none; }
.card:hover { background: var(--c64-border-dark); color: var(--c64-ink); }
.card strong { color: var(--c64-white); font-size: var(--fs-700); font-weight: 400; }
/* Long single-word titles shrink to stay on one line (monospace: ~1em per character). */
.card strong.fit { white-space: nowrap; font-size: min(var(--fs-700), 100cqi / var(--chars)); }
.card p { margin: var(--sp-3) 0 0; color: var(--c64-ink); font-size: var(--fs-400); line-height: 1.75; text-wrap: pretty; }
/* The whole card opens the project's main site via the title link's overlay; the buttons stay clickable above it. */
.card { position: relative; }
.card-link, .card-link:hover { color: inherit; border: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 3px solid var(--c64-yellow); outline-offset: 2px; }
.card-actions { --btn-h: calc(24px + 2 * var(--sp-1) + 4px); margin-top: auto; padding-top: var(--sp-3); }
.card-actions > * { position: relative; z-index: 1; }
.card-btn { display: inline-flex; align-items: center; padding: var(--sp-1); background: transparent; color: var(--c64-cyan); border: 2px solid var(--c64-cyan); font: inherit; cursor: pointer; }
.card-btn svg { display: block; width: 24px; height: 24px; }
.card-btn:hover, .card-notes.is-open .card-btn { background: var(--c64-yellow); color: var(--c64-chip-ink); border-color: var(--c64-yellow); }
/* Hover labels sit above their icon; the notes popup fills the card above the icon row so it never leaves the screen. */
.card-hint { display: inline-flex; }
.card-actions > .card-notes { position: static; }
.card-tip, .card-notes-popup {
  position: absolute; bottom: calc(100% + var(--sp-2)); z-index: 5;
  background: var(--c64-screen); border: 3px solid var(--c64-border-light); box-shadow: 4px 4px 0 var(--c64-border-dark);
  visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility .15s ease;
}
.card-tip { text-transform: uppercase; left: 0; padding: var(--sp-1) var(--sp-2); color: var(--c64-white); font-size: var(--fs-100); white-space: nowrap; pointer-events: none; }
/* js/app.js places the popup above or below the icon (whichever side has more visible room) and shrinks its text until it all fits. */
.card-notes-popup { left: var(--sp-3); right: var(--sp-3); bottom: calc(var(--sp-4) + var(--btn-h) + var(--sp-2)); padding: 1.25em; font-size: var(--fs-100); cursor: auto; }
.card-notes-popup::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: calc(var(--sp-2) + 3px); }
.card-notes-popup.below::after { top: auto; bottom: 100%; }
.card-notes-popup p { text-transform: uppercase; margin: 0; color: var(--c64-cyan); font-size: 1em; }
.card-notes-popup ul { display: grid; gap: .6em; margin: .6em 0 0; padding: 0; list-style: none; }
.card-notes-popup li { color: var(--c64-ink); line-height: 1.6; text-wrap: pretty; }
.card-hint:hover .card-tip, .card-hint:focus-within .card-tip,
.card-notes:hover .card-notes-popup, .card-notes:focus-within .card-notes-popup, .card-notes.is-open .card-notes-popup { visibility: visible; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .card-tip, .card-notes-popup { transition: none; } }

/* ---------- Project case study ---------- */
.back { text-transform: uppercase; font-size: var(--fs-300); }
.project-header { background-color: #1d49c2; }
.project-header > div { flex: 1 1 240px; min-width: 0; }
.project-header h1 { margin: 0; color: var(--c64-white); font-size: var(--fs-900); font-weight: 400; line-height: 1.25; }
.project-header p { text-transform: uppercase; margin: var(--sp-2) 0 0; color: var(--c64-cyan); font-size: var(--fs-300); }
.project-body { max-width: 62ch; }
.project-body p { margin: 0 0 var(--sp-3); font-size: var(--fs-500); line-height: 1.85; text-wrap: pretty; }
.project-body > :last-child { margin-bottom: 0; }
.project-body ul { margin: 0 0 var(--sp-3); padding-left: var(--sp-3); }
.project-body ul li { margin: var(--sp-2) 0; color: var(--c64-ink); font-size: var(--fs-400); line-height: 1.75; text-wrap: pretty; }
/* Text beside its figure; the figure drops below the text on narrow screens. */
.case-row.has-figure { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
@media (max-width: 991.98px) { .case-row.has-figure { grid-template-columns: minmax(0, 1fr); } }
.shot { display: block; width: 100%; background: var(--c64-screen); border: 3px solid var(--c64-border-light); cursor: zoom-in; }
.shot:hover { border-color: var(--c64-yellow); }
.shot img { display: block; width: 100%; height: auto; }
.shot span { text-transform: uppercase; display: block; padding: var(--sp-2); background: var(--c64-border-light); color: var(--c64-chip-ink); font-size: var(--fs-100); line-height: 1.6; text-align: left; }
.shot:hover span { background: var(--c64-yellow); }
.case-actions a { text-transform: uppercase; display: inline-block; padding: var(--sp-2) var(--sp-3); color: var(--c64-cyan); border: 3px solid var(--c64-cyan); font-size: var(--fs-300); }
.case-actions a:hover { background: var(--c64-yellow); color: var(--c64-chip-ink); border-color: var(--c64-yellow); }

/* ---------- Hire ---------- */
.hire-page h1 { text-transform: uppercase; margin: 0; max-width: 26ch; color: var(--c64-white); font-size: var(--fs-800); font-weight: 400; line-height: 1.35; }
.hire-page p { margin: var(--sp-3) 0 var(--sp-4); max-width: 60ch; font-size: var(--fs-500); line-height: 1.85; text-wrap: pretty; }
.hire-actions a { text-transform: uppercase; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-400); border: none; }
.hire-actions a:hover { background: var(--c64-white); color: var(--c64-chip-ink); }
.hire-actions a.primary { background: var(--c64-green); color: var(--c64-chip-ink); }
.hire-actions a.secondary { background: var(--c64-cyan); color: var(--c64-chip-ink); }
.hire-actions a.outlined { padding: calc(var(--sp-3) - 3px) calc(var(--sp-4) - 3px); background: transparent; color: var(--c64-ink); border: 3px solid var(--c64-border-light); }
.hire-actions a.outlined:hover { background: transparent; color: var(--c64-white); border-color: var(--c64-white); }
/* Contact page: green-to-light-blue steps across the buttons */
.hire-page .hire-actions a { padding: var(--sp-3) var(--sp-4); color: var(--c64-chip-ink); border: none; }
.hire-page .hire-actions a:nth-child(1) { background: #aaff66; }
.hire-page .hire-actions a:nth-child(2) { background: #a4f499; }
.hire-page .hire-actions a:nth-child(3) { background: #9fe8cc; }
.hire-page .hire-actions a:nth-child(4) { background: #99ddff; }
.hire-page .hire-actions a:hover { background: var(--c64-white); color: var(--c64-chip-ink); }

/* ---------- Not found ---------- */
.not-found h1 { text-transform: uppercase; margin: 0; color: var(--c64-red-ink); font-size: var(--fs-800); font-weight: 400; line-height: 1.35; }
.not-found h1 + p { margin: var(--sp-3) 0 var(--sp-4); max-width: 60ch; font-size: var(--fs-500); line-height: 1.85; }
