/* Clean minimal portfolio — shared styles.
   Palette and type are defined once here; tweak the variables
   below to re-theme the whole site. */

:root {
  --bg: #fdfdfb;
  --surface: #ffffff;
  --ink: #2c2c2a;
  --muted: #5f5e5a;
  --faint: #888780;
  --line: #e5e3dc;
  --accent: #0f6e56;
  --accent-bright: #1d9e75;
  --accent-soft: #e1f5ee;
  --purple-soft: #eeedfe; --purple-ink: #534ab7;
  --coral-soft:  #faece7; --coral-ink:  #993c1d;
  --blue-soft:   #e6f1fb; --blue-ink:   #185fa5;
  --amber-soft:  #faeeda; --amber-ink:  #854f0b;
  --radius: 12px;
  --maxw: 880px;
  --font-display: "Schibsted Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(253, 253, 251, 0.92);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 20;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; gap: 16px; flex-wrap: wrap;
}
.nav-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); }
.nav-name:hover { text-decoration: none; }
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; }
.nav-links a { font-size: 13.5px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; position: relative; }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -20px;
  height: 2px; background: var(--accent-bright);
}

/* ---------- Page scaffolding ---------- */
main { padding: 56px 0 72px; }
.eyebrow {
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 10px;
}
h1 {
  font-family: var(--font-display); font-size: clamp(28px, 5vw, 40px);
  font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 14px;
}
h2 {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  margin: 0 0 18px; letter-spacing: -0.005em;
}
.lede { font-size: 17px; color: var(--muted); max-width: 56ch; }

.section { margin-top: 64px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.section-head h2 { margin: 0; }
.section-head a { font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0a5a46; text-decoration: none; }
.btn-ghost { color: var(--muted); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--faint); color: var(--ink); text-decoration: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Project cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.project-card {
  text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  font: inherit; color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover { border-color: var(--accent-bright); transform: translateY(-2px); }
.card-thumb {
  height: 88px; border-radius: 8px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.card-sub { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 12px; color: var(--muted); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

/* Accent variants for card thumbnails */
.acc-teal   { background: var(--accent-soft); color: var(--accent); }
.acc-purple { background: var(--purple-soft); color: var(--purple-ink); }
.acc-coral  { background: var(--coral-soft);  color: var(--coral-ink); }
.acc-blue   { background: var(--blue-soft);   color: var(--blue-ink); }
.acc-amber  { background: var(--amber-soft);  color: var(--amber-ink); }

/* ---------- Project detail dialog ---------- */
.project-dialog {
  border: none; border-radius: 16px; padding: 0;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  box-shadow: 0 24px 60px rgba(44, 44, 42, 0.18);
  margin: auto;
}
.project-dialog::backdrop { background: rgba(44, 44, 42, 0.45); }
.dialog-inner { padding: 28px; }
.dialog-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dialog-close {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: 16px; line-height: 1; flex-shrink: 0;
}
.dialog-close:hover { color: var(--ink); border-color: var(--faint); }
.dialog-year { font-size: 13px; color: var(--faint); margin-bottom: 14px; }
.dialog-desc { color: var(--muted); margin: 14px 0; }
.dialog-highlights { margin: 14px 0 14px 18px; color: var(--muted); }
.dialog-highlights li { margin-bottom: 6px; }
.dialog-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 18px 0; }
.dialog-gallery img {
  width: 100%; height: 160px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line);
}

/* ---------- Timeline ---------- */
.filter-row { display: flex; gap: 8px; margin-bottom: 28px; }
.filter-btn {
  font: inherit; font-size: 13.5px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
}
.filter-btn:hover { border-color: var(--faint); color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.timeline { position: relative; margin-left: 8px; padding-left: 26px; border-left: 2px solid #9fe1cb; }
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-dot {
  position: absolute; left: -33px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent-bright); border: 2px solid var(--bg);
}
.timeline-item.education .timeline-dot { background: var(--purple-ink); }
.timeline-dates { font-size: 13px; color: var(--accent); font-weight: 500; }
.timeline-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 2px 0; }
.timeline-org { font-size: 14px; color: var(--muted); }
.timeline-desc { font-size: 14px; color: var(--muted); margin-top: 6px; max-width: 60ch; }
.type-badge {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; padding: 2px 10px; margin-left: 8px; vertical-align: 1px;
}
.type-badge.work { background: var(--accent-soft); color: var(--accent); }
.type-badge.education { background: var(--purple-soft); color: var(--purple-ink); }

/* ---------- Resume ---------- */
.resume-section { margin-top: 40px; }
.resume-entry { padding: 18px 0; border-bottom: 1px solid var(--line); }
.resume-entry:last-child { border-bottom: none; }
.resume-line { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.resume-role { font-family: var(--font-display); font-weight: 600; }
.resume-dates { font-size: 14px; color: var(--faint); white-space: nowrap; }
.resume-org { font-size: 14px; color: var(--accent); margin: 2px 0 6px; }
.resume-desc { font-size: 14.5px; color: var(--muted); max-width: 64ch; }
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.skill-group h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.resume-embed-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 12px; }
.resume-embed { display: block; width: 100%; height: 80vh; border: none; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  align-items: center;
  padding: 64px 0 48px;
}
.hero-photo-col { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-photo {
  width: 220px; height: 220px; border-radius: 16px; object-fit: cover;
  border: 1px solid var(--line);
}
.hero-photo-placeholder {
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 56px; font-weight: 600;
}
.hero-social { display: flex; gap: 10px; }
.hero-social a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted);
  font-size: 18px; transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.hero-social a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0 32px; }
  .hero-photo { width: 120px; height: 120px; font-size: 36px; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 200px 1fr; gap: 36px; align-items: start; }
.about-photo {
  width: 200px; height: 200px; border-radius: 16px; object-fit: cover;
  border: 1px solid var(--line); background: var(--accent-soft);
}
.about-photo-placeholder {
  width: 200px; height: 200px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 48px; font-weight: 600;
}
.about-text p { margin-bottom: 14px; color: var(--muted); }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Photography ---------- */
.photo-masonry { display: flex; gap: 12px; align-items: flex-start; }
.photo-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.photo-col img { width: 100%; display: block; border-radius: 8px; }
@media (max-width: 600px) { .photo-masonry { flex-wrap: wrap; } .photo-col { flex: 1 1 45%; } }
@media (max-width: 380px) { .photo-col { flex: 1 1 100%; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p, .footer-inner a { font-size: 13.5px; color: var(--faint); }
.footer-links { display: flex; gap: 18px; }
