/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ------------------------------------------------------------------ theme */
:root {
  --bg: #eef0f3;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --border: #e2e4e9;
  --text: #1c2029;
  --text-2: #4b5160;
  --text-3: #868c99;
  --accent: #2f6fed;
  --accent-soft: #eaf1ff;
  --good: #29a35a;
  --good-soft: #e7f7ee;
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.04), 0 8px 24px -12px rgba(20, 24, 33, 0.08);
  --radius: 14px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #131417;
  --surface: #1b1d22;
  --surface-2: #202329;
  --border: #2b2e35;
  --text: #edeef1;
  --text-2: #a9adb8;
  --text-3: #767b87;
  --accent: #6d9bff;
  --accent-soft: #1c2740;
  --good: #4fd189;
  --good-soft: #16281f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 28px -14px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body, .btn, .theme-toggle { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .6em 1em; border-radius: 8px;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ page */
.page { max-width: 1080px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }

/* On roomier screens, scale the whole page up a bit (like a modest browser
   zoom) instead of stretching the content column wider — keeps the same
   proportions/line-lengths but stops the layout reading as zoomed-out. */
@media (min-width: 900px) {
  html { zoom: 1.15; }
}

/* ---------------------------------------------------------------- topbar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.topbar__mark { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.topbar__actions { display: flex; align-items: center; gap: .6rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: .55rem 1rem; border-radius: 999px; font-size: .875rem; font-weight: 600;
  box-shadow: var(--shadow);
}
.btn:hover { border-color: var(--text-3); }
.btn svg { width: 15px; height: 15px; }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.theme-toggle:hover { border-color: var(--text-3); }
.theme-toggle__icon { display: none; }
:root[data-theme='light'] .theme-toggle__icon--moon,
:root:not([data-theme]) .theme-toggle__icon--moon { display: flex; }
:root[data-theme='dark'] .theme-toggle__icon--sun { display: flex; }

/* --------------------------------------------------------------- profile */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 3rem; }
.profile__photo {
  width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.profile__name { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.01em; margin-top: 1.25rem; }
.profile__role { color: var(--text-2); font-size: 1.15rem; margin-top: .3rem; }

.status-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.1rem; padding: .5rem 1rem; border-radius: 999px;
  background: var(--good-soft); border: 1px solid var(--border); font-weight: 600; font-size: 1rem;
}
.status-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex-shrink: 0; }

.profile__pref { color: var(--text-3); font-size: .95rem; margin-top: .6rem; }

.contact { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin-top: 1.4rem; }
.contact__item { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-2); font-size: 1.02rem; }
.contact__item svg { width: 16px; height: 16px; color: var(--text-3); }
a.contact__item:hover { color: var(--accent); }

/* -------------------------------------------------------------------- row */
.row { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; padding: 2rem 0; border-top: 1px solid var(--border); scroll-margin-top: 1.5rem; }
.row__label { font-size: .95rem; font-weight: 700; color: var(--text); }
.row__content { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.row__content > p { color: var(--text-2); }

/* ------------------------------------------------------------------- card */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow);
}
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem .75rem; }
.card__title { font-size: 1.15rem; font-weight: 700; }
.card__meta { font-size: .92rem; color: var(--text-3); font-weight: 600; white-space: nowrap; }
.card__sub { color: var(--text-2); font-size: .98rem; margin-top: .2rem; }
.card__sub em { font-style: normal; color: var(--text-3); }
.card__blurb { color: var(--text-2); font-size: 1rem; margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--border); }
.card__tag { color: var(--text-2); font-size: .98rem; }
.card__tag a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.card__bullets { margin-top: .75rem; padding-top: .1rem; display: flex; flex-direction: column; gap: .5rem; }
.card__bullets li { position: relative; padding-left: 1.1rem; color: var(--text-2); font-size: .98rem; }
.card__bullets li::before {
  content: ''; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-3);
}

/* ---------------------------------------------------------------- skills */
.row__content p strong { color: var(--text); font-weight: 700; }

/* -------------------------------------------------------------- projects */
.projects-scroll { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: -.25rem; padding: .25rem; }
.projects-scroll::-webkit-scrollbar { display: none; }
.projects-track { display: flex; gap: 1rem; }
.project {
  flex: 0 0 250px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.project:hover { border-color: var(--text-3); }
.project__name { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: .35rem; }
.project__arrow { display: inline-flex; }
.project__arrow svg { width: 14px; height: 14px; color: var(--text-3); }
.project__desc { color: var(--text-2); font-size: .96rem; margin-top: .5rem; }
.project__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.project__tags span { font-size: .84rem; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: .2rem .55rem; border-radius: 999px; }
.projects-nav { display: flex; gap: .5rem; margin-top: .9rem; }
.projects-nav button {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.projects-nav button:hover { border-color: var(--text-3); }
.projects-nav svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- scores */
.scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem 2rem; }
.scores__row { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.scores__row dt { color: var(--text-2); font-size: .98rem; }
.scores__row dd { margin: 0; font-weight: 700; font-size: .98rem; }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1.5rem; color: var(--text-3); font-size: .82rem; text-align: center; }

/* ----------------------------------------------------------------- 404 */
.oops { max-width: 480px; margin: 20vh auto; text-align: center; padding: 0 1.25rem; }
.oops h1 { font-size: 3rem; font-weight: 800; margin: .5rem 0 1rem; }
.oops p { color: var(--text-2); }
.oops .btn { margin-top: 1.5rem; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  .page { padding: 1.5rem 1.1rem 3rem; }
  .row { grid-template-columns: 1fr; gap: .75rem; }
  .row__label { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
  .contact { gap: .6rem 1rem; }
  .scores { grid-template-columns: 1fr; }
  .topbar__mark { font-size: 1rem; }
  .topbar .btn span { display: none; }
  .topbar .btn { padding: .55rem .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
