/* ===== Design tokens: change colours/fonts here ===== */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --ink: #14202B; --muted: #55626D;
  --accent: #0B7A75; --on-accent: #FFFFFF; --line: #DCE1E6;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 10px; --max: 1080px; --nav-h: 64px;
}
[data-theme="dark"] {
  --bg: #0E1519; --surface: #161F25; --ink: #E8EEF2; --muted: #9AA8B3;
  --accent: #3CC8BE; --on-accent: #08201E; --line: #26323A;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 28px; padding-left: 14px; border-left: 4px solid var(--accent); }
section { padding: 72px 0; }
section[hidden] { display: none; }
section:nth-of-type(even) { background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }

/* ===== Navigation ===== */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 12px; height: 100%; }
.logo { font: 700 1.25rem var(--font-head); text-decoration: none; color: var(--ink); margin-right: auto; }
.menu ul { display: flex; gap: 4px; }
.menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.menu a:hover { color: var(--ink); }
.menu a.active { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn { display: none; }

/* ===== Hero ===== */
.hero { padding: 64px 0 80px; }
.hero-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); animation: rise .7s ease both; }
.headline { font: 600 clamp(1.05rem, 2.2vw, 1.35rem) var(--font-head); color: var(--accent); margin: 14px 0 18px; animation: rise .7s .1s ease both; }
.intro { max-width: 52ch; color: var(--muted); margin: 0 0 28px; animation: rise .7s .2s ease both; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; animation: rise .7s .3s ease both; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid var(--accent); transition: transform .2s; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { color: var(--accent); }
.btn:hover { transform: translateY(-2px); }
.photo { justify-self: center; width: min(300px, 70vw); aspect-ratio: 3 / 4; position: relative; animation: rise .8s .2s ease both; }
.photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 2px solid var(--accent); border-radius: var(--radius); }
.photo img, .photo .initials { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.photo .initials { display: grid; place-items: center; font: 700 4rem var(--font-head); color: var(--accent); border: 1px solid var(--line); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ===== Content blocks ===== */
.prose { max-width: 70ch; }
.prose p { margin: 0 0 14px; }
.timeline { display: grid; gap: 18px; max-width: 800px; }
.item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 18px 22px; }
.item h3 { font-size: 1.12rem; }
.item .org { margin: 2px 0 0; font-weight: 600; }
.item .when { margin: 2px 0 8px; color: var(--muted); font-size: .9rem; }
.item p { margin: 6px 0 0; color: var(--muted); }
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.group h3 { font-size: 1.05rem; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 500; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-fallback { aspect-ratio: 16 / 9; display: grid; place-items: center; font: 700 2.4rem var(--font-head); color: var(--on-accent); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #1b2a6b)); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.15rem; }
.card-body p { margin: 0; color: var(--muted); }
.card-body .role { color: var(--ink); }
.card-body .btn { align-self: flex-start; margin-top: auto; padding: 8px 18px; font-size: .92rem; }
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.contact a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; text-decoration: none; color: var(--ink); transition: border-color .2s; }
.contact a:hover { border-color: var(--accent); }
.contact b { display: block; color: var(--accent); font-size: .9rem; }
.contact span { overflow-wrap: anywhere; }
.foot { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; text-align: center; }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); color: var(--on-accent); font-size: 1.2rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.to-top[hidden] { display: none; }

/* Scroll reveal (class added by script.js) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; }
  .photo { order: -1; justify-self: start; width: 200px; }
  .menu-btn { display: grid; }
  .menu { position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .menu.open { display: block; }
  .menu ul { flex-direction: column; padding: 10px 20px 16px; }
  .menu a.active { box-shadow: none; }
  section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
