/* ============================================================
   Portfolio — shared stylesheet
   Palette: slate ink + considered blue accent
   ============================================================ */

:root {
  --ink:        #0f172a;
  --slate-700:  #334155;
  --slate-600:  #475569;
  --slate-500:  #64748b;
  --slate-400:  #94a3b8;
  --slate-300:  #cbd5e1;
  --slate-200:  #e2e8f0;
  --slate-100:  #f1f5f9;
  --slate-50:   #f8fafc;
  --white:      #ffffff;

  --blue:       #2563eb;
  --blue-700:   #1d4ed8;
  --blue-200:   #bfdbfe;
  --blue-100:   #dbeafe;
  --blue-50:    #eff6ff;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 760px;
  --radius: 12px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--slate-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-700); }
img { max-width: 100%; display: block; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--slate-200); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--blue);
  display: inline-block;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--slate-200);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px;
  font-size: 14px; color: var(--slate-600);
  border-radius: 8px; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--slate-100); color: var(--ink); }
.nav-links a.active { background: var(--blue-50); color: var(--blue-700); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--ink); font-size: 22px; line-height: 1;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px;
  padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--slate-300);
  background: var(--white); color: var(--ink);
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--slate-50); color: var(--ink); }
.btn:active { transform: scale(0.985); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-700); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: flex; gap: 28px; align-items: center; }
.avatar {
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--blue-50); border: 1px solid var(--blue-200);
  color: var(--blue-700); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 30px; font-weight: 500;
}
.hero h1 { font-size: 34px; }
.hero .role { color: var(--blue-700); font-size: 17px; margin-top: 4px; }
.hero .meta { color: var(--slate-500); font-size: 14px; margin-top: 4px; }

/* ---------- prose / who am i ---------- */
.lead { font-size: 18px; color: var(--ink); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- stats / proof strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.stat { background: var(--slate-50); border-radius: var(--radius); padding: 16px 18px; }
.stat .num { font-family: var(--font-display); font-size: 24px; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; }
.stat .lbl { font-size: 12.5px; color: var(--slate-500); margin-top: 3px; line-height: 1.4; }
.hero-tagline { font-family: var(--font-display); font-size: 19px; font-weight: 400; color: var(--ink); line-height: 1.45; letter-spacing: -0.01em; margin: 18px 0 0; max-width: 60ch; }

/* ---------- work cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius); padding: 20px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--blue-200); transform: translateY(-2px); }
.card h3 { font-size: 17px; }
.card p { font-size: 14px; color: var(--slate-600); margin: 8px 0 14px; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono); font-size: 11.5px;
  padding: 3px 10px; border-radius: 20px;
  background: var(--blue-50); color: var(--blue-700);
}
.card-links { display: flex; gap: 14px; margin-top: 14px; font-size: 13px; }
.card-links a { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- blog list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding: 26px 0; border-top: 1px solid var(--slate-200); }
.post-item:first-child { border-top: none; padding-top: 0; }
.post-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--blue); }
.post-item h3 { font-size: 20px; margin: 6px 0 6px; }
.post-item h3 a { color: var(--ink); }
.post-item h3 a:hover { color: var(--blue-700); }
.post-item p { font-size: 15px; color: var(--slate-600); margin: 0; }
.read-more { font-size: 13.5px; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- article ---------- */
.article { padding: 56px 0 72px; }
.article .post-date { font-size: 13px; }
.article h1 { font-size: 30px; margin: 10px 0 6px; }
.article .byline { color: var(--slate-500); font-size: 14px; margin-bottom: 36px; }
.article-body { font-size: 17px; }
.article-body h2 { font-size: 22px; margin: 40px 0 12px; }
.article-body p { margin: 0 0 20px; }
.article-body code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--slate-100); padding: 2px 6px; border-radius: 5px; color: var(--ink);
}
.back-link { font-size: 13.5px; margin-bottom: 20px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- CV ---------- */
.cv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.cv-block { margin-top: 40px; }
.cv-block h2 {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-500);
  margin-bottom: 18px;
}
.cv-item { border-left: 2px solid var(--blue-200); padding: 0 0 4px 18px; margin-bottom: 22px; }
.cv-item:last-child { margin-bottom: 0; }
.cv-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cv-role { font-family: var(--font-display); font-size: 16px; font-weight: 500; color: var(--ink); }
.cv-when { font-family: var(--font-mono); font-size: 12.5px; color: var(--slate-400); white-space: nowrap; }
.cv-where { color: var(--slate-600); font-size: 15px; margin-top: 3px; }
.cv-where em { color: var(--slate-500); font-style: normal; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700); font-size: 15px;
}
.link-list .static {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700); font-size: 15px;
}
.link-list li:last-child a,
.link-list li:last-child .static { border-bottom: none; }
.link-list a:hover { color: var(--blue-700); }
.link-list .ic { color: var(--slate-400); width: 20px; text-align: center; }
.link-list a:hover .ic { color: var(--blue); }

form label { display: block; font-size: 13px; color: var(--slate-600); margin: 0 0 6px; }
form input, form textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px;
  padding: 11px 13px; margin-bottom: 16px;
  border: 1px solid var(--slate-300); border-radius: 10px;
  background: var(--white); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
form input:focus, form textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-100);
}
form textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 12.5px; color: var(--slate-500); margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--slate-200);
  padding: 32px 0; margin-top: 24px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-inner p { margin: 0; font-size: 13px; color: var(--slate-500); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 13px; color: var(--slate-500); }
.footer-links a:hover { color: var(--blue); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- photo gallery (Beyond Work) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 26px 22px;
}
.gallery-item { margin: 0; }
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;      /* every photo shows at the same shape/size... */
  object-fit: cover;         /* ...cropping to fill, whatever the source dimensions */
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
  background: var(--slate-100);
}
.gallery-item figcaption {
  margin-top: 10px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.5;
}
.gallery-item figcaption a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.gallery-item figcaption a:hover { color: var(--blue-700); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--slate-200);
    padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-radius: 8px; }
  .hero { padding: 48px 0 40px; }
  .hero-grid { flex-direction: column; align-items: flex-start; gap: 18px; text-align: left; }
  .hero h1 { font-size: 28px; }
  .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .contact-grid { gap: 28px; }
  .section { padding: 40px 0; }
  .cv-item-top { flex-direction: column; gap: 2px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
