/* =========================================================
   Logan Czarnecki — personal site
   Single shared stylesheet. Tweak the variables below to
   re-theme the whole site.
   ========================================================= */

:root {
  /* palette — light (default), grayscale */
  --bg:        #ffffff;
  --surface:   #ffffff;
  --text:      #111111;
  --muted:     #6b6b6b;
  --border:    #e6e6e6;
  --accent:    #111111;   /* "accent" is just ink in this black & white theme */
  --accent-ink:#ffffff;
  --shadow:    0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);

  /* type */
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* spacing scale */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius: 12px;
  --content: 46rem;   /* readable column */
  --wide: 68rem;      /* galleries */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b0b0b;
    --surface:   #161616;
    --text:      #f4f4f4;
    --muted:     #a3a3a3;
    --border:    #262626;
    --accent:    #f4f4f4;
    --accent-ink:#0b0b0b;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.5);
  }
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.1; font-weight: 400; }

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

/* skip link */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: var(--space-2) var(--space-4); border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: var(--space-6); }
.wrap--wide { max-width: var(--wide); }
main { flex: 1 0 auto; padding-block: var(--space-16); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--wide); margin-inline: auto;
  padding: var(--space-3) var(--space-6);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.wordmark:hover { color: var(--accent); }

.site-nav { display: flex; gap: var(--space-6); align-items: center; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  padding: var(--space-1) 0;
  position: relative;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); }
.site-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}

/* mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 40px; height: 40px; cursor: pointer; color: var(--text);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-header.open .site-nav { display: flex; }
  .site-nav a {
    padding: var(--space-3) var(--space-6);
    border-top: 1px solid var(--border);
  }
  .site-nav a.active::after { display: none; }
  .site-nav a.active { color: var(--accent); }
}

/* ---------- typography helpers ---------- */
.eyebrow {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 var(--space-3);
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  margin: 0 0 var(--space-4);
  letter-spacing: -.01em;
}
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 var(--space-8); max-width: 38rem; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin: var(--space-16) 0 var(--space-6);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: var(--space-3) var(--space-6); border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn svg { width: 18px; height: 18px; }

/* ---------- resume ---------- */
.resume-item { margin-bottom: var(--space-8); }
.resume-item__head {
  display: flex; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; align-items: baseline;
}
.resume-item__role { font-size: 1.15rem; font-weight: 600; margin: 0; }
.resume-item__org { color: var(--accent); }
.resume-item__date { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.resume-item ul { margin: var(--space-3) 0 0; padding-left: 1.15rem; }
.resume-item li { margin-bottom: var(--space-2); }

.skills { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; list-style: none; margin: 0; }
.skills li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: var(--space-1) var(--space-3);
  font-size: .9rem;
}

/* ---------- blog ---------- */
.notice {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-8);
  text-align: center; box-shadow: var(--shadow);
}
.notice h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 var(--space-2); }
.post-list { list-style: none; padding: 0; margin: var(--space-8) 0 0; }
.post-list li { padding: var(--space-4) 0; border-top: 1px solid var(--border); }
.post-list a { font-size: 1.2rem; text-decoration: none; }
.post-list time { display: block; color: var(--muted); font-size: .85rem; }

/* ---------- cat gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.gallery figure {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  cursor: zoom-in; box-shadow: var(--shadow);
}
.gallery img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  transition: transform .3s ease;
}
.gallery figure:hover img { transform: scale(1.04); }

.gallery-empty {
  text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: var(--space-16) var(--space-6); margin-top: var(--space-8);
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center;
  padding: var(--space-6); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius); }
.lightbox__close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  background: none; border: none; color: #fff; font-size: 2rem;
  cursor: pointer; line-height: 1; padding: var(--space-2);
}

/* ---------- contact ---------- */
.contact-list { list-style: none; padding: 0; margin: var(--space-8) 0 0; display: grid; gap: var(--space-4); }
.contact-card {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-4) var(--space-6);
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .08s ease, border-color .15s ease;
}
.contact-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.contact-card svg { width: 24px; height: 24px; flex: none; color: var(--accent); }
.contact-card .label { font-weight: 600; }
.contact-card .value { color: var(--muted); font-size: .92rem; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-24);
  flex-shrink: 0;
}
.footer-inner {
  max-width: var(--wide); margin-inline: auto;
  padding: var(--space-8) var(--space-6);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-4);
  color: var(--muted); font-size: .9rem;
}
.footer-links { display: flex; gap: var(--space-6); }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

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