/* =============================================================
   SITE-WIDE STYLES
   Every page loads this file first. Change a value here and it
   changes on every page.
   ============================================================= */

/* -------------------------------------------------------------
   1. DESIGN TOKENS: colours, fonts and sizes for the whole site
   ------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Base colours (dark mode) */
  --background: #0a0f0b;
  --surface: #121a14;
  --text: #e4ede6;
  --muted: #8fa397;
  --green: #4ade80;
  --border: rgba(228,237,230,.13);
  --card-border: rgba(255,255,255,.16);
  --shadow: 0 14px 36px rgba(0,0,0,.22);

  /* Highlight colour: cyan, used for every highlight on every page */
  --accent: #22d3ee;
  --accent-wash: rgba(34,211,238,.12);
  --accent-line: rgba(34,211,238,.38);
  --on-accent: #061414;          /* text on top of a cyan button */

  /* Status colours (online / offline / planned) */
  --ok: #4ade80;
  --bad: #f87171;
  --planned: #a7a5a0;

  /* Fonts */
  --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  /* Layout and sizes */
  --page-width: 1120px;
  --gap: 24px;
  --card-pad: 26px;
  --radius-card: 20px;
  --radius-inner: 14px;
  --radius-pill: 999px;
  --title-size: clamp(38px, 8vw, 100px);      /* big page titles */
  --title-size-sm: clamp(30px, 10vw, 60px);   /* big page titles on phones */
  --h2-size: clamp(22px, 3vw, 30px);          /* card headings */
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f5f8f5;
  --surface: #ffffff;
  --text: #0f1a12;
  --muted: #4c5f52;
  --green: #15803d;
  --border: rgba(15,26,18,.14);
  --card-border: rgba(255,255,255,.28);
  --shadow: 0 12px 28px rgba(15,26,18,.09);

  --accent: #0e7490;
  --accent-wash: rgba(14,116,144,.09);
  --accent-line: rgba(14,116,144,.34);
  --on-accent: #ffffff;

  --ok: #15803d;
  --bad: #b91c1c;
  --planned: #6b6a66;
}

/* 2. GLOBAL STYLES */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: background-color .4s ease, color .4s ease;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
code, kbd, pre { font-family: var(--font-mono); }
.site-shell { max-width: 1170px; padding: 26px 28px 34px; margin: 0 auto; }
.skip-link { position: absolute; left: 15px; top: -100px; background: var(--accent); color: var(--on-accent); padding: 10px; z-index: 10; }
.skip-link:focus { top: 10px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3. TOP CONTROLS + HEADER */
.site-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px 35px 25px;
  box-shadow: var(--shadow);
  transition: background-color .4s, border-color .4s;
}
.utility-row, .contact-nav, .section-title, .card-topline, .site-footer { display: flex; align-items: center; }
.utility-row { justify-content: space-between; gap: 15px; }
.theme-toggle {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 700;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.theme-toggle:hover { transform: translateY(-2px); color: var(--text); border-color: var(--accent-line); }
.theme-icon { display: inline-block; margin-right: 6px; font-size: 15px; }
.brand-block { text-align: center; margin: 18px auto 21px; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: 10px; font-weight: 800; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; background: var(--ok); border-radius: 50%; margin-right: 8px; box-shadow: 0 0 14px var(--ok); }
h1 { font-size: clamp(46px, 8.1vw, 104px); line-height: .98; letter-spacing: -.075em; font-weight: 900; margin: 13px 0 16px; }
.title-period { color: var(--accent); transition: color .25s; }
.intro { color: var(--muted); margin: 0; font-size: 14px; }
.contact-nav { justify-content: center; gap: 10px; padding-top: 18px; border-top: 1px solid var(--border); }
.contact-nav a { text-decoration: none; color: var(--text); font-size: 13px; text-align: center; padding: 10px 28px; border: 1px solid var(--border); border-radius: 10px; min-width: 142px; transition: background-color .25s, border-color .25s, transform .25s; }
.contact-nav a:hover { background: var(--accent-wash); border-color: var(--accent-line); transform: translateY(-2px); }
.contact-nav a span { color: var(--accent); padding-left: 6px; }

/* 4. HOMEPAGE: THREE-COLUMN PROJECT GRID */
.section-title { justify-content: space-between; gap: 20px; margin: 38px 4px 17px; }
.section-kicker { margin: 0 0 3px; color: var(--accent); }
.section-title h2 { font-size: 24px; letter-spacing: -.04em; margin: 0; }
.project-count { font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: .16em; }
.projects-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.project-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 240px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid var(--card-border);
  border-radius: 21px;
  box-shadow: var(--shadow);
  background: #1e2e31;
  transition: transform .34s ease, border-color .34s ease, box-shadow .34s ease;
}
.project-card:hover, .project-card:focus-visible { transform: translateY(-7px); border-color: var(--accent); box-shadow: 0 18px 45px rgba(0,0,0,.25), 0 0 0 1px var(--accent-line); }
.project-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(155deg, rgba(12,17,25,.05) 10%, rgba(7,12,17,.23) 40%, rgba(4,10,12,.83) 95%);
}
.project-card::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(135deg,rgba(255,255,255,.09) 1px, transparent 1px), radial-gradient(circle at 65% 22%,rgba(255,255,255,.25),transparent 35%);
  background-size: 24px 24px, 100% 100%;
  opacity: .44;
}
.project-image {
  position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px);
  object-fit: cover; z-index: -1;
  filter: blur(3px) saturate(.8) brightness(.72);
  transition: filter .45s, transform .5s;
}
.project-card:hover .project-image { filter: blur(1px) saturate(.95) brightness(.80); transform: scale(1.07); }
.project-image.is-missing { display: none; }
.project-content {
  width: 100%; margin: 0; padding: 18px 19px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.28));
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.card-topline { justify-content: space-between; color: #e5f3ed; }
.card-index { letter-spacing: .17em; font-size: 10px; font-weight: 800; }
.card-arrow { border: 1px solid rgba(255,255,255,.55); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-size: 15px; transition: background-color .3s, color .3s, transform .3s; }
.project-card:hover .card-arrow { background: var(--accent); color: var(--on-accent); border-color: var(--accent); transform: rotate(45deg); }
.card-copy {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(9,15,16,.33);
  border-radius: 13px;
  backdrop-filter: blur(13px); -webkit-backdrop-filter: blur(13px);
}
.card-copy h3 { font-weight: 850; font-size: 24px; line-height: 1.08; letter-spacing: -.04em; color: #fff; margin: 0 0 8px; }
.card-copy p { color: rgba(242,250,245,.86); font-size: 12px; line-height: 1.35; margin: 0; }
.project-card--server { background: radial-gradient(circle at 77% 11%, #4d8ca6, transparent 48%), linear-gradient(138deg,#1b3445,#0a1720); }
.project-card--minecraft { background: radial-gradient(circle at 70% 13%,#a28c4d,transparent 43%),linear-gradient(140deg,#223e2b,#101f17); }
.project-card--voice { background: radial-gradient(circle at 69% 12%,#a259c0,transparent 46%),linear-gradient(140deg,#34264f,#17132c); }
.project-card--other { background: radial-gradient(circle at 72% 18%,#61a6b0,transparent 46%),linear-gradient(140deg,#163b45,#101c30); }
.project-card--existing { background: radial-gradient(circle at 77% 15%,#be6b95,transparent 44%),linear-gradient(135deg,#482e5b,#1e1b35); }
.project-card--video { background: radial-gradient(circle at 65% 16%,#6f93b8,transparent 46%),linear-gradient(140deg,#2c4254,#111b29); }
.project-card--ai { background: radial-gradient(circle at 70% 15%,#22a6be,transparent 46%),linear-gradient(140deg,#123a40,#0b1a1f); }

/* 5. FOOTER */
.site-footer { justify-content: space-between; gap: 18px; margin-top: 34px; padding: 24px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; transition: background-color .4s; }
.site-footer strong { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.site-footer p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.footer-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.footer-meta a { color: var(--accent); text-underline-offset: 3px; }

/* -------------------------------------------------------------
   6. PROJECT PAGES (everything in Pages/ shares these)
   A page's own CSS file only adds what is unique to that page.
   ------------------------------------------------------------- */

/* Page frame */
.page .site-shell { max-width: var(--page-width); }
.page .site-header { padding: 22px 29px 30px; }
.page .site-footer { margin-top: var(--gap); }
.page-tools { justify-content: space-between; }
.home-link {
  text-decoration: none; border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 8px 15px; color: var(--muted); font-size: 12px; font-weight: 700;
  transition: color .25s, border-color .25s, background-color .25s;
}
.home-link:hover { color: var(--text); border-color: var(--accent-line); background: var(--accent-wash); }

/* Page title area */
.page-hero { text-align: center; padding: 34px 6px 4px; }
.page-hero .eyebrow { margin: 0; }
.page .site-header h1 { font-size: var(--title-size); letter-spacing: -.07em; margin: 12px 0; }
.page-title-accent { color: var(--accent); margin-left: .12em; transition: color .25s; }
.page-hero .intro { max-width: 580px; margin: 0 auto; font-size: 15px; }

/* Cards */
.page-main { display: grid; gap: var(--gap); padding-top: var(--gap); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: var(--card-pad); min-width: 0;
  transition: background-color .4s ease, border-color .4s ease;
}
.card .eyebrow { color: var(--accent); margin: 0 0 5px; }
.card h2 { font-size: var(--h2-size); letter-spacing: -.045em; line-height: 1.15; margin: 0; }
.card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-intro { color: var(--muted); font-size: 13px; margin: 6px 0 20px; }
.card-intro a, .footnote a { color: var(--accent); text-underline-offset: 3px; }
.footnote { color: var(--muted); font-size: 12px; border-left: 2px solid var(--accent); padding-left: 11px; margin: 16px 0 0; }
.pill {
  font-size: 12px; font-weight: 850; color: var(--accent); white-space: nowrap;
  border: 1px solid var(--accent-line); background: var(--accent-wash);
  border-radius: var(--radius-pill); padding: 5px 12px;
}
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }

/* Label / value lists (specs) */
.spec-list { margin: 0; }
.spec-list > div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); font-size: 13px; }
.spec-list dd { margin: 0; font-size: 13px; font-weight: 750; text-align: right; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  border-radius: 10px; padding: 9px 18px; font-size: 13px; font-weight: 800; line-height: 1.3;
  transition: transform .2s, opacity .2s, background-color .25s, border-color .25s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover:not(:disabled) { border-color: var(--accent-line); background: var(--accent-wash); }
.btn--ghost > span[aria-hidden="true"] { color: var(--accent); }
.btn--sm { padding: 7px 12px; font-size: 12px; font-weight: 750; border-radius: 9px; }

/* 7. TABLET AND MOBILE */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-card { min-height: 248px; }
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-shell { padding: 14px 12px 20px; }
  .site-header { padding: 18px 16px; border-radius: 17px; }
  .utility-row { flex-wrap: wrap; justify-content: center; }
  .brand-block { margin: 28px auto; }
  h1 { font-size: clamp(41px,11vw,68px); }
  .intro { font-size: 13px; }
  .contact-nav { gap: 7px; }
  .contact-nav a { min-width: 0; flex: 1; padding: 10px 5px; font-size: 11px; }
  .section-title { margin-top: 30px; }
  .project-count { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 218px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .footer-meta { align-items: flex-start; }

  .page .site-header { padding: 17px 16px 20px; }
  .page-tools { justify-content: space-between; }
  .page-hero { padding: 22px 0 0; }
  .page .site-header h1 { font-size: var(--title-size-sm); }
  .card { padding: 18px; }
  .card-head { flex-wrap: wrap; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
