/* Tim Statler portfolio. System fonts only, so the page makes no third-party requests.
   Dark is the default. Light applies only when <html data-theme="light"> is set (see script.js). */

:root {
  --bg: #09130e;
  --bg-alt: #0e1d15;
  --surface: #0f2019;
  --ink: #eef8f2;
  --ink-soft: #9db3a6;
  --rule: #1d3428;
  --accent: #2ee88f;        /* fills, buttons, highlights */
  --accent-strong: #3ff19c; /* text and links */
  --accent-ink: #04170e;    /* text placed on the accent fill */
  --accent-soft: #123626;
  --max: 1120px;
  --gutter: 16px;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f7f3;
  --bg-alt: #e9efe8;
  --surface: #ffffff;
  --ink: #0f1a14;
  --ink-soft: #4d5c53;
  --rule: #d3ddd5;
  --accent: #00b871;
  --accent-strong: #007a48;
  --accent-ink: #04170e;
  --accent-soft: #d8f6e7;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.2s, color 0.2s;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.6vw, 3.9rem); font-weight: 800; max-width: 17ch; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; max-width: 24ch; }
h3 { font-size: 1.35rem; font-weight: 700; }
h3 a { color: var(--ink); text-decoration: none; }
h3 a:hover { color: var(--accent-strong); }
p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--accent);
}

.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 56ch; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--accent);
  transition: transform 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 28px -10px var(--accent);
}
.btn-primary:hover { box-shadow: 0 14px 34px -10px var(--accent); }
.btn-ghost { color: var(--accent-strong); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 66px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; font-weight: 600;
  position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform 0.2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

/* Theme switch */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.theme-track {
  position: relative; width: 34px; height: 20px; border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--rule);
}
.theme-knob {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  transition: transform 0.2s;
}
/* Knob sits on the right when light is on */
:root[data-theme="light"] .theme-knob { transform: translateX(14px); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .header-actions { gap: 8px; }
  .theme-toggle .theme-label { display: none; }
  .theme-toggle { padding: 6px 8px; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a { padding: 14px var(--gutter); border-top: 1px solid var(--rule); font-size: 1rem; color: var(--ink); }
  .site-nav a::after { display: none; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(60px, 10vw, 120px) 0 clamp(64px, 10vw, 110px);
  isolation: isolate;
}
/* dotted grid behind the hero */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
/* soft green glow */
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 560px; height: 560px; right: -160px; top: -180px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 38%, transparent), transparent);
  filter: blur(8px);
}
.hero-grid {
  display: grid; gap: 48px; align-items: center;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2rem; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 2.6rem; padding: 0; list-style: none;
}
.hero-stats li { font-size: 0.92rem; color: var(--ink-soft); }
.hero-stats strong { display: block; font-size: 1.7rem; color: var(--ink); letter-spacing: -0.02em; font-weight: 800; }

/* Hero graphic: a stylized spec sheet */
.spec-art { position: relative; justify-self: center; width: 100%; max-width: 420px; }
.spec-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 40%, transparent);
  position: relative;
  transform: rotate(-2deg);
}
.spec-card header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 14px;
}
.spec-pill {
  background: var(--accent); color: var(--accent-ink); padding: 3px 10px; border-radius: 999px;
}
.spec-row {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
  padding: 10px 0; border-top: 1px dashed var(--rule); font-size: 0.92rem;
}
.spec-row span:first-child { color: var(--ink-soft); }
.spec-row span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.spec-bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 12px; }
.spec-bars i {
  flex: 1; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(to top, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent));
}
.spec-tag {
  position: absolute; left: -18px; bottom: -22px; transform: rotate(4deg);
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 0.85rem;
  padding: 10px 16px; border-radius: 12px;
  box-shadow: 0 16px 30px -16px rgba(0,0,0,0.5);
}
.spec-tag b { color: var(--accent); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

/* Sections */
.section { padding: clamp(60px, 9vw, 110px) 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 2.8rem; }

/* Divider wave */
.wave { display: block; width: 100%; height: 40px; color: var(--bg-alt); }

/* Work cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent));
}
.card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--rule));
  box-shadow: 0 24px 40px -26px color-mix(in srgb, var(--accent) 70%, transparent);
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); }
.card h3 { margin-bottom: 0.6rem; }
.card-tag {
  display: inline-block; align-self: flex-start;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent-strong); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 1.1rem !important;
}
.card-link { margin-top: auto !important; padding-top: 1.25rem; }
.card-link a { font-weight: 700; text-decoration: none; }
.card-link a:hover { text-decoration: underline; }
/* Client and studio logos keep their own colors, so they sit on a light tile in both themes. */
.logo-tile {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 16px;
  height: 84px;
  display: flex; align-items: center;
  margin-bottom: 1.25rem;
}
.logo-tile img { width: auto; height: 40px; max-width: 100%; }
.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong);
}

/* About */
.about { display: grid; gap: 2.4rem; }
.about-body p { color: var(--ink-soft); }
.principles { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 14px; }
.principles li {
  padding: 14px 18px 14px 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  color: var(--ink-soft);
}
.principles strong { color: var(--ink); }

/* Contact */
.contact { display: grid; gap: 2.4rem; }
.contact-card {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 20px;
  padding: 32px;
  position: relative; overflow: hidden;
  align-self: start;
  box-shadow: 0 30px 50px -28px var(--accent);
}
.contact-card::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px;
  border-radius: 50%; border: 28px solid rgba(4, 23, 14, 0.12);
}
.contact-card p { margin-bottom: 0.25rem; font-size: 1.1rem; position: relative; z-index: 1; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-label {
  font-size: 0.72rem !important; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700;
  opacity: 0.75; margin-top: 1.4rem !important;
}
.contact-label:first-child { margin-top: 0 !important; }
.contact-card a { font-weight: 800; word-break: break-word; color: var(--accent-ink); }

@media (min-width: 800px) {
  .about { grid-template-columns: 1fr 1.4fr; gap: 4.5rem; }
  .contact { grid-template-columns: 1.2fr 1fr; gap: 4.5rem; align-items: start; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 30px 0; font-size: 0.92rem; color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--ink-soft); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
