/* 13t Studio
   Layout: a 13-column grid that shows through faintly in the hero; content sits on it with generous whitespace.
   All colors are tokens. Edit the :root block to restyle the whole site. */

:root {
  --paper: #F3F4F7;
  --surface: #FFFFFF;
  --ink: #10131C;
  --muted: #5A6072;
  --line: #DADDE6;
  --accent: #2433E0;
  --accent-ink: #FFFFFF;
  --live: #1F8A5B;
  --wip: #B36A00;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 3rem);
  --step-4: clamp(2.6rem, 7vw, 5.5rem);

  --max: 1180px;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C0E14;
    --surface: #151925;
    --ink: #ECEEF4;
    --muted: #9AA1B5;
    --line: #262B3A;
    --accent: #7D88FF;
    --accent-ink: #0C0E14;
    --live: #4CC38A;
    --wip: #E9A84A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0C0E14;
  --surface: #151925;
  --ink: #ECEEF4;
  --muted: #9AA1B5;
  --line: #262B3A;
  --accent: #7D88FF;
  --accent-ink: #0C0E14;
  --live: #4CC38A;
  --wip: #E9A84A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.logo { display: inline-flex; align-items: baseline; gap: 4px; text-decoration: none; }
.logo-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 8px;
  border-radius: 6px;
  line-height: 1.25;
}
.logo-word { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.logo-small .logo-mark { font-size: 1.1rem; }
.logo-small .logo-word { font-size: 0.95rem; }

.nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
.nav .nav-cta:hover { border-color: var(--ink); }
@media (max-width: 560px) {
  .nav a:not(.nav-cta):not([href="#projects"]) { display: none; }
}

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 13));
  opacity: 0.55;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; gap: 28px; padding-block: clamp(64px, 12vw, 140px) clamp(40px, 6vw, 72px); }
.hero-title { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; max-width: 14ch; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-lede { font-size: var(--step-1); color: var(--muted); max-width: 56ch; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-ticker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-ticker span::before { content: "+ "; color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 0.95rem/1 var(--font-body);
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: 8px 14px; font-size: 0.85rem; background: var(--paper); color: var(--ink); border-color: var(--line); }

/* Sections */
.section { padding-block: clamp(64px, 10vw, 120px); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }
.section-head-row > div:first-child { display: grid; gap: 10px; }

/* About */
.about { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .about { grid-template-columns: 4fr 8fr; gap: 48px; }
  .about .section-head { margin-bottom: 0; align-content: start; }
}
.about-body { display: grid; gap: 20px; max-width: 68ch; min-width: 0; }
.about-lead { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.about-body > p:not(.about-lead) { color: var(--muted); }
.values { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.values li { display: grid; gap: 4px; padding-block: 18px; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .values li { grid-template-columns: 16rem 1fr; gap: 24px; align-items: baseline; } }
.values h3 { font-size: 1.05rem; }
.values p { color: var(--muted); }

/* Services */
.services { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(4, 1fr); } }
.service { background: var(--surface); padding: 28px 24px 32px; display: grid; gap: 12px; align-content: start; transition: background .2s; }
.service:hover { background: var(--paper); }
.service-tag { font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent); letter-spacing: 0.06em; }
.service p { color: var(--muted); font-size: 0.95rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font: 500 0.85rem/1 var(--font-body);
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Projects */
.projects { display: grid; gap: 24px; }
@media (min-width: 720px) { .projects { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
.project { display: grid; gap: 18px; min-width: 0; }
.project[hidden] { display: none; }
.project-cover {
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 85% 10%, hsl(var(--hue) 85% 72% / .9), transparent 60%),
    radial-gradient(90% 80% at 10% 100%, hsl(calc(var(--hue) + 40) 80% 55% / .9), transparent 65%),
    hsl(var(--hue) 55% 22%);
  transition: transform .35s ease;
}
.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, hsl(0 0% 100% / .08) 0 1px, transparent 1px calc(100% / 13));
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-mark {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -0.04em;
  color: hsl(0 0% 100%);
  text-shadow: 0 2px 24px hsl(0 0% 0% / .25);
}
.project:hover .project-cover { transform: scale(0.985); }
.project-info { display: grid; gap: 8px; }
.project-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.project-info > p { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--live); }
.status-wip { color: var(--wip); }
.tags { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 0.78rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.projects-empty { color: var(--muted); padding-block: 24px; }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact-inner { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact-inner { grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; } }
.contact-inner > div:first-child { display: grid; gap: 14px; }
.contact h2 { font-size: var(--step-4); letter-spacing: -0.035em; max-width: 12ch; }
.contact-lede { color: var(--muted); font-size: var(--step-1); max-width: 40ch; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); display: grid; gap: 12px; min-width: 0; }
.contact-label { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.email { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 3vw, 1.6rem); text-decoration: none; overflow-wrap: anywhere; }
.email:hover { color: var(--accent); }
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.socials a { text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 28px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }
.site-footer .logo { color: var(--ink); }

/* Gentle entrance for the hero; content is visible at rest without it */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero-inner > *:nth-child(2) { animation-delay: .06s; }
  .hero-inner > *:nth-child(3) { animation-delay: .12s; }
  .hero-inner > *:nth-child(4) { animation-delay: .18s; }
  @keyframes rise { from { transform: translateY(14px); opacity: .001; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
