/* shared stylesheet for all pages */

/* ---------- Design tokens ---------- */
:root {
  --brand: #05789c;          /* primary blue */
  --brand-dark: #045f7d;          /* hover / active */
  --brand-tint: #e8f2f6;          /* subtle background */
  --ink: #1a1a1a;          /* body text */
  --ink-soft:     #444;             /* secondary text */
  --muted:        #6a6a6a;          /* meta text */
  --rule:         #e5e5e5;          /* dividers */
  --bg:           #ffffff;
  --bg-alt:       #f7f8f9;

  --font:         "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap:         1080px;           /* max content width */
  --gap:          24px;
  --radius:       6px;
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--ink); margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 40px 0; }

/* ---------- Top navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--rule);
  z-index: 50;
}
.nav__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: .2px;
}
.nav__brand:hover { color: var(--brand); text-decoration: none; }
.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  text-decoration: none;
}
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 450px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 12px 0 4px;
  }
  .nav__inner { flex-wrap: wrap; }
  .nav.is-open .nav__links { display: flex; }
}

/* ---------- Hero (home page) ---------- */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--rule);
}
.hero__eyebrow {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.hero__subtitle {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 640px;
}
.hero__lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 0 32px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  transition: transform .1s, background .15s, border-color .15s, color .15s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary {
  background: var(--brand);
  color: #fff;
  border: 2px solid var(--brand);
}
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.btn--ghost:hover { background: var(--brand); color: #fff; }

/* ---------- Feature grid (home page) ---------- */
.features {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 32px;
}
.feature h3 {
  font-size: 1.1rem;
  color: var(--brand);
  margin-bottom: 8px;
}
.feature p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ---------- Page header (interior pages) ---------- */
.pagehead {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--rule);
}
.pagehead__eyebrow {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pagehead h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 12px;
}
.pagehead p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0;
}

/* ---------- Portfolio grid ---------- */
.projects {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.project {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.project:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.project__thumb {
  background: var(--brand-tint);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
}
.project__thumb img { width: 100%; height: 100%; object-fit: cover; }
.project__body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.project__meta { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px; }
.project h3 { font-size: 1.15rem; margin-bottom: 10px; }
.project p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.project__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.project__tag {
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.project__link {
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand);
}

/* ---------- CV page ---------- */
.cv {
  padding: 48px 0 72px;
}
.cv__toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.cv h2 {
  font-size: 1.4rem;
  color: var(--brand);
  margin: 44px 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.cv h2:first-of-type { margin-top: 0; }
.cv__role { font-weight: 600; font-size: 1.02rem; }
.cv__org { color: var(--muted); font-style: italic; font-size: 0.95rem; margin-left: 0px; }
.cv__block { margin-bottom: 22px; }
.cv__block ul { margin-top: 8px; color: var(--ink-soft); }
.cv__skills-row { margin-bottom: 8px; }
.cv__skills-row strong { color: var(--ink); }

/* ---------- Contact page ---------- */
.contact-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 32px;
}
.contact-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.contact-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.contact-card__label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.contact-card__value {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  word-break: break-word;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--brand); }

/* Dev helper — window size readout. Remove or hide before making the site
   fully public (either delete the <p id="window-size"> tag, or add
   `display: none;` here to hide site-wide). */
.dev-meta {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.65;
  margin: 8px 0 0;
  letter-spacing: 0.3px;
}

/* ---------- Utilities ---------- */
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
