/* Portfolio template. Theme comes from <html data-theme="navy|teal|maroon|slate">;
   light or dark follows the visitor's system setting. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1b1d21;
  --soft: #4a4f57;
  --muted: #737983;
  --line: #e6e3dc;
  --accent: #1f3a5f;
  --accent-soft: #e6edf6;
  --on-accent: #ffffff;
  --radius: 14px;
  color-scheme: light;
}
[data-theme="teal"]   { --accent: #0f6e6e; --accent-soft: #dff1ef; }
[data-theme="maroon"] { --accent: #7a1f2b; --accent-soft: #f6e4e6; }
[data-theme="slate"]  { --accent: #334155; --accent-soft: #e8ecf2; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #181b20;
    --text: #e9eaec;
    --soft: #b9bdc4;
    --muted: #8a909a;
    --line: #2a2e35;
    --accent: #8fb3de;
    --accent-soft: #1c2735;
    --on-accent: #0d1420;
    color-scheme: dark;
  }
  [data-theme="teal"]   { --accent: #6fc7c2; --accent-soft: #15292a; }
  [data-theme="maroon"] { --accent: #e59aa5; --accent-soft: #2c1a1d; }
  [data-theme="slate"]  { --accent: #a9b6cc; --accent-soft: #1f242d; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(960px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; padding: 8px 12px; background: var(--surface); }
.muted { color: var(--muted); }

.demo-banner { padding: 8px 16px; background: var(--accent); color: var(--on-accent); font-size: 14px; text-align: center; }
.demo-banner a { color: inherit; font-weight: 600; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { color: var(--text); font-weight: 700; text-decoration: none; }
.topbar nav { display: flex; gap: 20px; margin-left: auto; }
.topbar nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.topbar nav a:hover { color: var(--text); }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center;
  padding: 88px 0 72px;
}
.eyebrow { color: var(--muted); font-size: 14px; }
h1 { margin-top: 6px; font-size: clamp(40px, 7vw, 64px); line-height: 1.05; letter-spacing: -.03em; }
.role { margin-top: 10px; color: var(--accent); font-size: clamp(18px, 2.4vw, 22px); font-weight: 600; }
.intro { max-width: 56ch; margin-top: 18px; color: var(--soft); font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block; padding: 11px 20px; border: 1.5px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; }
.links a { color: var(--soft); font-size: 15px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line); }
.links a:hover { color: var(--accent); border-color: var(--accent); }

.avatar { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 6px var(--accent-soft); }
.avatar.initials {
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-size: 56px; font-weight: 700; letter-spacing: -.02em;
}

/* sections */
main section[id]:not(.hero) { padding: 56px 0; border-top: 1px solid var(--line); }
h2 { margin-bottom: 28px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
h3 { font-size: 17px; line-height: 1.35; }
.prose { display: grid; gap: 14px; max-width: 64ch; color: var(--soft); font-size: 17px; }
section ul:not(.tags) { margin-top: 10px; padding-left: 1.1em; color: var(--soft); }
section ul:not(.tags) li + li { margin-top: 4px; }

/* projects */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card header .muted { flex: none; font-size: 14px; }
.card > p { color: var(--soft); }
.card ul:not(.tags) { margin-top: 0; font-size: 15px; }
.card-links { display: flex; gap: 16px; margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 15px; }
.card-links a { text-decoration: none; }
.card-links a::after { content: " →"; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.tags li { padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 500; }

/* experience + education */
.timeline { display: grid; gap: 28px; padding: 0; list-style: none; }
.timeline > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
.when { color: var(--muted); font-size: 14px; padding-top: 2px; }
.timeline p:not(.when) { color: var(--soft); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.skill-group h3 { margin-bottom: 12px; font-size: 15px; }

/* contact */
.lead { color: var(--soft); font-size: 17px; }
.big-link { display: inline-block; margin: 14px 24px 0 0; font-size: clamp(20px, 3.4vw, 28px); font-weight: 600; letter-spacing: -.01em; text-decoration: none; word-break: break-word; }
.big-link:hover { text-decoration: underline; }

.footer { padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer a { color: var(--muted); }

@media (max-width: 760px) {
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 48px 0 56px; }
  .avatar { order: -1; width: 112px; height: 112px; }
  .avatar.initials { font-size: 38px; }
  .cards, .skills { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}
