:root {
  --bg: #fbfaf7;
  --bg-alt: #f0f4f4;
  --surface: #ffffff;
  --primary: #1f4e5f;
  --primary-dark: #163a47;
  --accent: #3a8d8c;
  --accent-soft: #dcecea;
  --text: #2d3436;
  --muted: #5f6b6d;
  --border: #e2e8e8;
  --radius: 14px;
  --shadow: 0 2px 6px rgba(31, 78, 95, 0.06), 0 8px 24px rgba(31, 78, 95, 0.06);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--serif); color: var(--primary); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.5rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--accent); }
a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--primary); text-decoration: none; white-space: nowrap; }
.nav-links { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; white-space: nowrap; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 80px;
  background: linear-gradient(160deg, var(--accent-soft) 0%, var(--bg) 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 600; color: var(--accent); margin-bottom: 0.5em; }
.hero h1 { margin-bottom: 0.3em; }
.roles { font-weight: 500; color: var(--primary); font-size: 1.05rem; }
.roles i { font-style: normal; color: var(--accent); margin: 0 0.35em; }
.tagline { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: 200px 200px var(--radius) var(--radius);
  box-shadow: 0 20px 50px rgba(31, 78, 95, 0.18);
  margin-left: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--primary);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31, 78, 95, 0.2); }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.link { font-weight: 600; text-decoration: none; margin-top: auto; }
.link:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { position: relative; padding-bottom: 0.4em; }
.section h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section-intro { color: var(--muted); margin-bottom: 2.25em; }

.callout {
  margin-top: 2em;
  padding: 24px 28px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 24px; }
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; margin-bottom: 48px; }
.about-photo { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }
.plain { list-style: none; padding: 0; margin: 0 0 1em; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.plain li:last-child { border-bottom: 0; }
.plain strong { display: block; font-weight: 600; }
.plain span { display: block; color: var(--muted); font-size: 0.92rem; }
.narrow-block { max-width: 760px; margin-top: 48px; }
.small { font-size: 0.9rem; color: var(--muted); }
.center { text-align: center; margin-top: 2em; }

/* Philosophy */
blockquote {
  margin: 2em 0 0;
  padding: 0.5em 0 0.5em 1.2em;
  border-left: 4px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--primary);
}

/* Projects */
.project { margin-bottom: 28px; padding: 36px; }
.project:last-child { margin-bottom: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.1em; }
.meta span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 999px;
}
.competencies { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 1em; }
.competencies .label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 4px; }
.chip {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}
.reflection { background: var(--bg); border-radius: 10px; padding: 14px 18px; font-size: 0.96rem; color: var(--muted); }
.reflection strong { color: var(--primary); }

/* Artifacts */
.artifact { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.artifact:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(31, 78, 95, 0.12); }
.artifact h3 { font-size: 1.18rem; }
.artifact p { font-size: 0.97rem; }
.course { font-size: 0.78rem !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 0.5em; }

/* Experience */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 6px 0 6px 30px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%233a8d8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* References */
.references { margin-top: 3em; border-top: 1px solid var(--border); padding-top: 1.5em; }
.references summary { cursor: pointer; font-family: var(--serif); font-weight: 600; color: var(--primary); font-size: 1.1rem; }
.references ul { list-style: none; padding: 0; margin-top: 1em; }
.references li { font-size: 0.88rem; color: var(--muted); padding-left: 2em; text-indent: -2em; margin-bottom: 0.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: #cfe2e2; text-align: center; padding: 32px 0; font-size: 0.9rem; }
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-wrap { flex-direction: column; justify-content: center; height: auto; padding-top: 12px; padding-bottom: 10px; gap: 6px; }
  .site-header nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .nav-links { gap: 18px; width: max-content; margin: 0 auto; }
  html { scroll-padding-top: 100px; }

  .hero { padding: 48px 0 56px; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { order: -1; }
  .hero-photo img { max-width: 260px; margin: 0 auto; }
  .hero-text { text-align: center; }
  .tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .card, .project { padding: 22px; }
  .card-grid.two, .card-grid { grid-template-columns: 1fr; }
  .roles i { display: none; }
  .roles { display: flex; flex-direction: column; gap: 2px; }
}

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