/* ==========================================================================
   Joshua Moore — Technical Artist
   Brand purples: --accent (fills/lines), --accent-hover, --accent-deep (glows).
   --accent-text is a lighter tint of the same hue so small text stays readable on dark.
   ========================================================================== */

:root {
  --bg: #111214;
  --surface: #1a1b1e;
  --surface-2: #222327;
  --surface-3: #2b2c31;
  --line: #2f3036;
  --text: #f1f2f4;
  --muted: #a3a6ad;
  --dim: #6b6e76;
  --accent: #6a469c;
  --accent-hover: #573282;
  --accent-deep: #140f34;
  --accent-text: #b695e5;
  --accent-ink: #ffffff;

  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --page: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform .35s var(--ease);
}
.topbar.is-visible { transform: none; }

.topbar__mark { display: block; opacity: .9; transition: opacity .2s; }
.topbar__mark img { height: 32px; width: auto; }
.topbar__mark:hover { opacity: 1; }

.topbar__links { display: flex; gap: 4px; }
.topbar__links a {
  padding: 6px 12px; border-radius: 999px;
  font-size: 14px; color: var(--muted); text-decoration: none;
  transition: color .2s, background .2s;
}
.topbar__links a:hover { color: var(--text); background: var(--surface-2); }

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 88px var(--gutter) 72px;
  background:
    radial-gradient(55% 55% at 75% 48%, var(--accent-deep), transparent 72%),
    var(--bg);
}

.hero__inner {
  width: 100%; max-width: var(--page);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: clamp(32px, 6vw, 88px);
}

.hero__name {
  margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(64px, 9vw, 128px);
  line-height: .88; letter-spacing: .02em; text-transform: uppercase;
}

.hero__role {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: .08em; line-height: 1;
  color: var(--accent-text);
}

.hero__sub { margin: 16px 0 0; color: var(--muted); font-size: 17px; max-width: 34ch; }

.hero__menu { display: grid; gap: 10px; margin-top: 36px; max-width: 300px; }

.menu-btn {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 11px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none; letter-spacing: .04em;
  transition: background .25s var(--ease), border-color .25s, transform .25s var(--ease), color .25s;
}
.menu-btn__idx { font-family: var(--font-mono); font-size: 11px; color: var(--dim); transition: color .25s; }
.menu-btn__ext { margin-left: auto; color: var(--dim); }
.menu-btn:hover {
  background: var(--accent-hover); border-color: var(--accent); color: var(--accent-ink);
  transform: translateX(6px);
}
.menu-btn:hover .menu-btn__idx,
.menu-btn:hover .menu-btn__ext { color: rgba(255, 255, 255, .7); }

.hero__logo { justify-self: center; width: 100%; max-width: 420px; }
.hero__logo img { width: 100%; height: auto; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid var(--dim); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; translate: -50% 0;
  width: 3px; height: 8px; border-radius: 2px; background: var(--accent-text);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }

/* ---------------------------------------------------------------- sections */

.showcase, .about, .custom-section, .contact {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 96px var(--gutter) 40px;
}

.section-head { margin-bottom: 32px; }
.section-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 6vw, 72px); line-height: .95; letter-spacing: .03em;
}

/* -------------------------------------------------------------------- tabs */

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

.tab {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 2px 12px;
  padding: 16px 18px 18px;
  text-align: left;
  background: var(--surface);
  border: 0; border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.tab::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.tab:hover { background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--surface-2); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

.tab__title { font-weight: 700; font-size: 17px; }
.tab__detail { grid-column: 1; font-size: 13px; color: var(--dim); line-height: 1.4; }
.tab__icon {
  grid-row: 1 / span 2; grid-column: 2;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--dim);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 7px; min-width: 34px; text-align: center;
  transition: color .25s, border-color .25s;
}
.tab[aria-selected="true"] .tab__icon { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.tab__count { font-family: var(--font-mono); font-size: 11px; color: var(--dim); margin-left: 6px; font-weight: 400; }

.showcase__body {
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: clamp(14px, 2.4vw, 28px);
  min-height: 300px;
}

/* -------------------------------------------------------------- work tiles */

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}

.tile {
  display: flex; flex-direction: column;
  padding: 10px 10px 16px;
  border-radius: var(--radius);
  background: var(--surface-3);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
  animation: tile-in .45s var(--ease) both;
}
.tile:hover { transform: translateY(-4px); border-color: var(--accent); }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .tile { animation: none; } }

.tile__media {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm); overflow: hidden; background: #000;
}
.tile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__media .tile__preview { opacity: 0; transition: opacity .3s; }
.tile.is-previewing .tile__preview.is-loaded { opacity: 1; }

.tile__badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(10, 11, 13, .78); color: var(--text); backdrop-filter: blur(6px);
}
.tile__badge--award { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.tile__play {
  position: absolute; right: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 10px; color: var(--text);
  padding: 3px 7px; border-radius: 6px; background: rgba(10, 11, 13, .7);
  transition: opacity .25s;
}
.tile.is-previewing .tile__play { opacity: 0; }
@media (hover: none) { .tile__play { display: none; } }

.tile__body { padding: 14px 8px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.tile__desc { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: auto 0 0; padding: 6px 0 0; list-style: none; }
.tags li { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); }
.tags li::before { content: "#"; opacity: .6; }

/* ----------------------------------------------------------- project detail */

.detail { animation: tile-in .4s var(--ease) both; }

.detail__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-3);
  font-size: 14px; font-weight: 600; letter-spacing: .04em; text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-text); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

.detail__head { max-width: 780px; }
.detail__term { font-family: var(--font-mono); font-size: 12px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.detail__status { color: var(--accent-text); }
.detail__title {
  margin: 6px 0 10px;
  font-family: var(--font-display); font-weight: 400; letter-spacing: .03em;
  font-size: clamp(40px, 5.5vw, 64px); line-height: .95;
}
.detail__summary { margin: 0; font-size: 18px; color: var(--muted); }
.detail__award {
  display: inline-block; margin-top: 14px;
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-text); border: 1px solid var(--accent);
}

.detail__meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px;
  margin: 28px 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--line); border: 1px solid var(--line);
}
.detail__meta div { background: var(--surface-3); padding: 12px 16px; }
.detail__meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.detail__meta dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; }

.detail__links { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 28px; }

/* ----------------------------------------------------- content blocks (prose) */

.prose { max-width: 860px; }
.block-wrap { display: contents; } /* one per content block; lets the page update blocks individually */
.prose > :first-child,
.prose > .block-wrap:first-child > :first-child { margin-top: 0; }
.prose h3 {
  margin: 40px 0 10px;
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 12px;
}
.prose h3::before { content: ""; width: 18px; height: 2px; background: var(--accent); flex: none; }
.prose p { margin: 0 0 14px; color: #d4d6db; }
.prose ul { margin: 0 0 16px; padding-left: 20px; color: #d4d6db; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent-text); }
.prose .note { font-size: 14px; color: var(--dim); font-style: italic; }
.prose a { color: var(--accent-text); text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }
.prose :not(pre) > code {
  font-family: var(--font-mono); font-size: .88em;
  padding: 2px 6px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line);
}

.media { margin: 24px 0; }
.media img, .media iframe, .media video {
  display: block; width: 100%; border-radius: var(--radius-sm); background: #000;
  border: 1px solid var(--line);
}
.media iframe { aspect-ratio: 16 / 9; height: auto; }
.media figcaption { margin-top: 8px; font-size: 13px; color: var(--dim); }

.gallery { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 10px; }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.gallery img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; transition: transform .4s var(--ease); }
.gallery a:hover img { transform: scale(1.03); }

.code { margin: 24px 0; }
.code__bar {
  padding: 8px 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text);
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.code pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; color: #e3e4e8;
  background: #0c0d0f; border: 1px solid var(--line); border-radius: var(--radius-sm);
  tab-size: 4;
}
.code__bar + pre { border-top-left-radius: 0; border-top-right-radius: 0; }
.code figcaption { margin-top: 8px; font-size: 13px; color: var(--dim); }

/* Hints for unfinished blocks — only rendered in the editor's preview */
.block-missing {
  margin: 20px 0; padding: 18px; border-radius: var(--radius-sm);
  border: 1px dashed var(--accent); color: var(--accent-text);
  font-family: var(--font-mono); font-size: 13px; text-align: center;
}

.grid__empty { color: var(--dim); margin: 24px 4px; }

.detail__pager {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
}
.pager-link { text-decoration: none; display: grid; gap: 2px; max-width: 48%; }
.pager-link--next { text-align: right; margin-left: auto; }
.pager-link span { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.pager-link strong { font-size: 17px; transition: color .2s; }
.pager-link:hover strong { color: var(--accent-text); }

/* ------------------------------------------------------------------- about */

.about__grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
}

.about__text p { margin: 0 0 16px; color: var(--muted); font-size: 17px; }
.about__text .about__lead { color: var(--text); font-size: clamp(20px, 2.2vw, 24px); line-height: 1.45; font-weight: 500; }

.facts { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts__k { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding-top: 2px; }
.facts__v { font-weight: 600; }

.toolbox {
  display: grid; gap: 22px; align-content: start;
  padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.toolbox h3 {
  margin: 0 0 10px;
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text);
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500;
}

/* ----------------------------------------------------------------- contact */

.contact { padding-bottom: 96px; }

.contact__card {
  position: relative; overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--accent) 30%, var(--accent-deep)), transparent 65%),
    var(--surface);
  border: 1px solid var(--line);
}
.contact__pitch { margin: 0 0 14px; font-size: 18px; color: var(--muted); max-width: 52ch; }
.contact__email {
  display: inline-block;
  font-family: var(--font-display); letter-spacing: .03em;
  font-size: clamp(28px, 5.4vw, 64px); line-height: 1.05;
  text-decoration: none; word-break: break-all;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .4s var(--ease), color .2s;
}
.contact__email:hover { color: var(--accent-text); background-size: 100% 2px; }

.contact__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.link-pill {
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.link-pill:hover { background: var(--accent-hover); border-color: var(--accent); color: var(--accent-ink); }
.link-pill span { font-family: var(--font-mono); font-weight: 400; font-size: 13px; }
.link-pill.is-copied { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------------------------ footer */

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto;
  padding: 24px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim);
}
.footer__note { font-family: var(--font-mono); font-size: 12px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__logo { max-width: 320px; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab { border-radius: var(--radius-sm); }
  .tabs { margin-bottom: 6px; }
  .showcase__body { border-radius: var(--radius); }
  .about__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero { padding-top: 72px; }
  .hero__logo { max-width: 240px; }
  .hero__menu { max-width: none; grid-template-columns: 1fr 1fr; }
  .menu-btn:hover { transform: none; }
  .topbar__links a { padding: 6px 8px; font-size: 13px; }
  .topbar__links a:nth-child(4) { display: none; }
  .tab { padding: 12px 14px; }
  .tab__detail { display: none; }
  .tab__icon { display: none; }
  .tab__title { font-size: 15px; }
  .grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li { grid-template-columns: 1fr; gap: 2px; }
  .scroll-cue { display: none; }
}
