/* ==========================================================================
   John Paul Del Mundo — portfolio
   Dark neon "Tokyo Night" Neubrutalism: flat fills, bright ink borders,
   hard offset shadows, no gradients, no blur, no soft elevation.
   Dark palette = Tokyo Night; accents are its neon set.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */
:root {
  /* surfaces */
  --bg: #1a1b26;          /* page */
  --bg-deep: #16161e;     /* header, footer, inverted sections */
  --surface: #1f2335;     /* cards */
  --surface-2: #24283b;   /* about section, hovers */

  /* ink: in dark mode the "ink" is the light line, not black */
  --line: #c0caf5;
  --text: #c0caf5;
  --text-dim: #a9b1d6;
  --muted: #9099c4;
  --on-bright: #16161e;   /* text sitting on a neon fill */

  /* neon accents */
  --yellow: #e0af68;
  --cyan: #7dcfff;
  --magenta: #bb9af7;
  --green: #9ece6a;
  --orange: #ff9e64;
  --blue: #7aa2f7;
  --teal: #73daca;
  --red: #f7768e;

  --bw: 3px;
  --border: var(--bw) solid var(--line);
  --shadow-sm: 4px 4px 0 var(--line);
  --shadow: 6px 6px 0 var(--line);
  --shadow-lg: 10px 10px 0 var(--line);
  --radius: 4px;

  --font-display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --gutter: 24px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); }
h3 { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); line-height: 1.15; }
p { text-wrap: pretty; }

/* Neon focus ring — high contrast against every dark surface. */
:focus-visible {
  outline: var(--bw) solid var(--cyan);
  outline-offset: 3px;
}

/* --- layout helpers ----------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 8vw, 110px); }

.section__head { max-width: 60ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section__lede { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  margin-bottom: 20px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.eyebrow--accent { background: var(--yellow); color: var(--on-bright); }
/* used inside the bright contact block */
.eyebrow--dark {
  background: transparent;
  color: var(--on-bright);
  border-color: var(--on-bright);
  box-shadow: 4px 4px 0 var(--on-bright);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--yellow);
  color: var(--on-bright);
  border: var(--border);
  font-family: var(--font-mono);
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--line);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line);
}
.btn:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--line);
}
.btn--primary { background: var(--yellow); color: var(--on-bright); }
.btn--outline { background: transparent; }
.btn--wide { width: 100%; }
.btn__ext { font-size: 1.05em; line-height: 1; }

/* --- header / nav ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-deep);
  border-bottom: var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--magenta);
  color: var(--on-bright);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 0.95rem;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.brand:hover .brand__mark {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__link {
  display: inline-block;
  padding: 10px 16px;
  border: var(--bw) solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}
.nav__link:hover,
.nav__link[aria-current="true"] {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav__link--cta {
  background: var(--green);
  color: var(--on-bright);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav__link--cta:hover { background: var(--yellow); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0 10px;
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 3px;
  background: var(--on-bright);
}

/* --- hero --------------------------------------------------------------- */
.hero {
  background: var(--bg-deep);
  border-bottom: var(--border);
  padding-block: clamp(52px, 7vw, 96px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 1.1rem + 5vw, 4.6rem);
  margin-bottom: 22px;
}
.lede {
  max-width: 58ch;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--text-dim);
}

.mark {
  display: inline-block;
  padding: 0 10px;
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  color: var(--on-bright);
  box-shadow: 3px 3px 0 var(--line);
}
.mark--magenta { background: var(--magenta); }
.mark--cyan { background: var(--cyan); }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.sticker {
  justify-self: end;
  width: 100%;
  max-width: 320px;
  padding: 22px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2.5deg);
}
.sticker__title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 2px dashed var(--line);
}
.sticker__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 2px solid var(--line);
}
.sticker__row:last-child { border-bottom: 0; padding-bottom: 0; }
.sticker__row dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.sticker__row dd { font-weight: 700; text-align: right; }

/* --- marquee ------------------------------------------------------------ */
.marquee {
  overflow: hidden;
  background: var(--magenta);
  border-bottom: var(--border);
  padding-block: 14px;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: slide 34s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
  white-space: nowrap;
  color: var(--on-bright);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.marquee__group em { font-style: normal; color: #3f2c68; }
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- capabilities ------------------------------------------------------- */
.capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.cap {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 12px solid var(--accent);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.cap:nth-child(2) { transform: translateY(20px); }
.cap:nth-child(2):hover { transform: translateY(14px); }
.cap:hover { box-shadow: var(--shadow-lg); }
.cap__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 14px;
}
.cap__title { margin-bottom: 14px; }
.cap__body { color: var(--muted); font-size: 1rem; margin-bottom: 22px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto; /* push the tag list to the bottom so cards align */
  padding-top: 20px;
  border-top: 2px dashed var(--line);
}
.tags li {
  padding: 4px 10px;
  background: var(--bg-deep);
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
}

/* --- work / projects ---------------------------------------------------- */
.section--work {
  background: var(--bg-deep);
  border-block: var(--border);
}

.projects { display: grid; gap: 24px; }

.project {
  padding: 28px 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 140ms ease;
}
.project:hover { box-shadow: var(--shadow-lg); }

/* Featured case study: narrative beside a technical fact panel. */
.project--featured {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  padding: 36px 32px;
  border-top: 12px solid var(--magenta);
}

.project__tag {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 16px;
  background: var(--magenta);
  color: var(--on-bright);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project__tag--cyan  { background: var(--cyan); }
.project__tag--green { background: var(--green); }
.project__title { margin-bottom: 8px; }
.project__client {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.project__desc { color: var(--muted); max-width: 62ch; }

.project__points {
  margin-top: 22px;
  border-top: 2px dashed var(--line);
  padding-top: 18px;
}
.project__points li {
  position: relative;
  padding: 8px 0 8px 26px;
  border-bottom: 2px solid var(--line);
  font-weight: 500;
}
.project__points li:last-child { border-bottom: 0; padding-bottom: 0; }
.project__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 12px;
  height: 12px;
  background: var(--cyan);
  border: 2px solid var(--line);
}

/* Deliberate ownership disclaimer on work built for an employer. */
.project__note {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--bg-deep);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-dim);
}
.project__note strong { color: var(--text); }

/* Technical fact panel on the featured card. */
.panel {
  padding: 20px;
  background: var(--bg-deep);
  border: var(--border);
  border-radius: var(--radius);
  align-self: start;
}
.panel .tags { margin-top: 20px; }
.panel__title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 2px dashed var(--line);
}
.panel__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 2px solid var(--line);
}
.panel__row:last-child { border-bottom: 0; padding-bottom: 0; }
.panel__row dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}
.panel__row dd { font-weight: 700; text-align: right; }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.projects__grid .project { display: flex; flex-direction: column; }
.projects__grid .project .tags { margin-top: auto; }

/* Honest placeholder for write-ups that do not exist yet. */
.empty {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: transparent;
  border: var(--bw) dashed var(--line);
  border-radius: var(--radius);
}
.empty__tag {
  align-self: flex-start;
  padding: 5px 12px;
  margin-bottom: 18px;
  background: var(--orange);
  color: var(--on-bright);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.empty__title { margin-bottom: 12px; }
.empty__body { color: var(--muted); margin-bottom: 0; }
.empty .btn { align-self: flex-start; margin-top: 24px; }

/* --- about -------------------------------------------------------------- */
.section--about { background: var(--surface-2); border-bottom: var(--border); }
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.about__main h2 { margin-bottom: 22px; }
.about__main p + p { margin-top: 18px; }
.about__main p { color: var(--text-dim); }

.factbox {
  padding: 26px 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.factbox__title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 2px dashed var(--line);
}
.factbox__list li {
  position: relative;
  padding: 10px 0 10px 26px;
  border-bottom: 2px solid var(--line);
  font-weight: 500;
}
.factbox__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.factbox__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 12px;
  height: 12px;
  background: var(--blue);
  border: 2px solid var(--line);
}

/* --- contact (bright inverted block) ------------------------------------ */
.section--contact {
  background: var(--yellow);
  color: var(--on-bright);
}
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
/* The neon cyan ring is invisible on yellow — use ink here. */
.section--contact :focus-visible { outline-color: var(--on-bright); }
.contact h2 { margin-bottom: 18px; }
.contact__lede { color: #423612; max-width: 46ch; }
.contact__actions {
  display: grid;
  gap: 16px;
}

.section--contact .btn--primary {
  background: var(--on-bright);
  color: var(--text);
  border-color: var(--on-bright);
  box-shadow: 5px 5px 0 var(--magenta);
}
.section--contact .btn--primary:hover { box-shadow: 7px 7px 0 var(--magenta); }
.section--contact .btn--primary:active { box-shadow: 0 0 0 var(--magenta); }
.section--contact .btn--outline {
  background: transparent;
  color: var(--on-bright);
  border-color: var(--on-bright);
  box-shadow: 5px 5px 0 var(--on-bright);
}
.section--contact .btn--outline:hover { box-shadow: 7px 7px 0 var(--on-bright); }
.section--contact .btn--outline:active { box-shadow: 0 0 0 var(--on-bright); }

.emailrow {
  display: flex;
  align-items: stretch;
  border: var(--bw) solid var(--on-bright);
  border-radius: var(--radius);
  background: var(--bg-deep);
  overflow: hidden;
}
.emailrow__value {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  color: var(--text);
}
.copy {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 18px;
  background: var(--blue);
  color: var(--on-bright);
  border: 0;
  border-left: var(--bw) solid var(--on-bright);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.copy:hover { background: var(--cyan); }
.copy[data-copied="true"] { background: var(--green); }

/* --- footer ------------------------------------------------------------- */
.site-footer {
  background: var(--bg-deep);
  color: var(--muted);
  border-top: 3px dashed var(--surface-2);
  padding-block: 26px;
  font-size: 0.88rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
}

/* --- reveal -------------------------------------------------------------
   Hidden state is opt-in via html.js-reveal (added by a tiny inline head
   script). With JS disabled or reduced-motion preferred, content is simply
   visible — it is never trapped behind an animation that cannot run.        */
.reveal { opacity: 1; transform: none; }

html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero__grid,
  .about,
  .contact,
  .project--featured {
    grid-template-columns: minmax(0, 1fr);
  }
  .sticker { justify-self: start; transform: rotate(-1.5deg); }
  .capabilities { grid-template-columns: minmax(0, 1fr); }
  .cap:nth-child(2) { transform: none; }
  .cap:nth-child(2):hover { transform: translate(-2px, -2px); }
  .contact__actions { justify-self: stretch; }
  .projects__grid { grid-template-columns: minmax(0, 1fr); }
  .panel { align-self: stretch; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg-deep);
    border-bottom: var(--border);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 18px var(--gutter) 24px;
  }
  .nav__link { display: block; padding: 14px 16px; }
  .nav__link--cta { text-align: center; }

  .hero__cta .btn { width: 100%; }
  .sticker { box-shadow: var(--shadow); }
  .project--featured { padding: 26px 20px; }
  .btn { box-shadow: var(--shadow-sm); }
  .btn:hover { transform: none; box-shadow: var(--shadow-sm); }
  .btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--line); }
  .section--contact .btn--primary:active { box-shadow: 0 0 0 var(--magenta); }
  .section--contact .btn--outline:active { box-shadow: 0 0 0 var(--on-bright); }
  .cap:hover { box-shadow: var(--shadow); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .brand__mark, .cap, .project { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

/* Dark themes print as a black rectangle. Force a readable light printout. */
@media print {
  :root {
    --bg: #ffffff;
    --bg-deep: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --line: #000000;
    --text: #000000;
    --text-dim: #222222;
    --muted: #444444;
    --on-bright: #000000;
  }
  .site-header, .marquee, .nav-toggle, .hero__cta, .contact__actions { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .section { padding-block: 18pt; }
  .section--contact { background: #fff; color: #000; }
  .emailrow { background: #fff; }
  .emailrow__value { color: #000; }
  html.js-reveal .reveal { opacity: 1; transform: none; }
}