/* styles.css — Portfolio hub for Justin Bogner
 * Plain static file. No build, no Tailwind.
 * Visual register: restrained, ink-on-paper, single muted-amber accent.
 * Companion file: index.html
 */

:root {
  /* Light theme (default) */
  --bg: #f8f5ee;
  --surface: #ffffff;
  --surface-2: #f1ede4;
  --ink: #1a1a1a;
  --ink-2: #3d3a35;
  --muted: #6b6760;
  --rule: #e3ddd0;
  --accent: #92400e;
  --accent-soft: #f4ead8;
  --maria-tint: #f7e8e6;   /* very soft warm tint for the Maria card */
  --maria-edge: #e7c8c2;
  --font-serif: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-w: 1100px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --r-sm: 6px;
  --r-md: 10px;
  --shadow-card: 0 1px 0 rgba(26, 26, 26, 0.04), 0 4px 14px rgba(26, 26, 26, 0.05);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #243246;
  --ink: #f8fafc;
  --ink-2: #e2e8f0;
  --muted: #94a3b8;
  --rule: #334155;
  --accent: #d97706;
  --accent-soft: #3a2616;
  --maria-tint: #2a1f1d;
  --maria-edge: #4a2f29;
  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  transition: background-color 200ms ease, color 200ms ease;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 1000000;
}
.skip-link:focus { top: 1rem; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand__sub {
  font-size: 0.8125rem;
  color: var(--muted);
}
.theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 0.4rem 0.7rem;
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.theme-toggle:hover { border-color: var(--ink-2); color: var(--ink); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.hero__eyebrow {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 1.25rem;
}
.hero__lede {
  font-family: var(--font-serif);
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36em;
  margin: 0 0 0.75rem;
}
.hero__meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}
.hero__invitation {
  font-family: var(--font-serif);
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  font-style: italic;
  color: var(--ink-2);
  max-width: 34em;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

/* ── Section scaffolding ────────────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type { border-bottom: none; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.section__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.section__hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  max-width: 24em;
  text-align: right;
}

/* ── Project grid ───────────────────────────────────────── */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  position: relative;
  min-height: 220px;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 22px rgba(146, 64, 14, 0.12);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card__tag {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}
.card__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.card__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  flex-grow: 1;
}
.card__quote::before { content: "“"; color: var(--accent); margin-right: 0.05em; }
.card__quote::after { content: "”"; color: var(--accent); margin-left: 0.05em; }

.card__cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.card__cta::after {
  content: "→";
  transition: transform 180ms ease;
}
.card:hover .card__cta::after,
.card:focus-visible .card__cta::after { transform: translateX(3px); }

/* Maria card: same shape, slight warm tint to signal a different audience. */
.card--maria {
  background: var(--maria-tint);
  border-color: var(--maria-edge);
}
.card--maria:hover,
.card--maria:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 22px rgba(146, 64, 14, 0.18);
}

/* ── About ──────────────────────────────────────────────── */
.about__lede {
  font-family: var(--font-serif);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 38em;
  margin: 0 0 1.5rem;
}
.about__note {
  font-size: 0.9375rem;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  max-width: 38em;
  margin: 0 0 1.5rem;
  font-style: italic;
}
.about__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}
.about__meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}
.about__meta dd {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
}
.about__meta dd a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.about__meta dd a:hover { border-bottom-color: var(--accent); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--muted);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-footer a:hover { color: var(--ink-2); border-bottom-color: var(--rule); }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 720px) {
  .site-header { padding-top: 1.25rem; }
  .brand__sub { display: none; }
  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .section__hint { text-align: left; }
  .card { min-height: 0; padding: 1.25rem; }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  body { background: white; color: black; }
  .site-header, .theme-toggle, .site-footer { display: none; }
  .card { box-shadow: none; border-color: #999; }
}