/* Akeem McKenzie — personal site
   Single stylesheet. No build step, no framework. */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f7f8fa;
  --surface:   #ffffff;
  --border:    #e4e7ec;
  --border-2:  #d3d8e0;
  --text:      #171a21;
  --muted:     #5a6272;
  --faint:     #858d9c;
  --accent:    #1f4fd8;
  --accent-2:  #123bb0;
  --shadow:    0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px -8px rgba(16, 24, 40, .10);
  --radius:    14px;
  --wrap:      1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0b0d12;
    --bg-alt:   #0f1218;
    --surface:  #121620;
    --border:   #222836;
    --border-2: #2e3648;
    --text:     #e8eaef;
    --muted:    #9aa3b4;
    --faint:    #6f7889;
    --accent:   #7fa4ff;
    --accent-2: #a5c0ff;
    --shadow:   0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .6);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border-2);
  padding: 10px 16px;
  border-radius: 8px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.nav-brand {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  font-size: 15px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 4px 9px;
}
.nav-brand:hover { color: var(--text); border-color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.btn:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  color: var(--bg);
  opacity: .88;
  border-color: var(--text);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13.5px;
  margin-left: auto;
}
@media (min-width: 721px) {
  .btn-sm { margin-left: 0; }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- hero ---------- */

.hero { padding: 88px 0 64px; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 3.9rem);
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lede {
  font-size: clamp(1.1rem, 2.3vw, 1.35rem);
  color: var(--text);
  margin-top: 18px;
  max-width: 34ch;
  font-weight: 400;
}
.lede strong { font-weight: 600; }

.sub {
  color: var(--muted);
  margin-top: 18px;
  max-width: 58ch;
  font-size: 15.5px;
}

.hero-photo img {
  width: 100%;
  height: auto; /* override the intrinsic height attribute so aspect-ratio applies */
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

@media (max-width: 840px) {
  .hero { padding: 56px 0 40px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-photo { order: -1; max-width: 132px; }
  .hero-photo img { border-radius: 16px; }
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats li {
  background: var(--bg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-n {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stat-l {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- sections ---------- */

.section { padding: 88px 0; }

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head { margin-bottom: 44px; max-width: 62ch; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 650;
}
.section-head p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 15.5px;
}

@media (max-width: 700px) {
  .section { padding: 60px 0; }
}

/* ---------- project cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.card h3 { font-size: 1.12rem; font-weight: 650; }

.tag {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}
.section-alt .tag { background: var(--bg); }

.card p {
  color: var(--muted);
  font-size: 14.8px;
  line-height: 1.62;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 22px;
}
.chips li {
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 9px;
}

.card-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link span { font-size: 12px; transition: transform .15s ease; }
.card-link:hover span { transform: translate(2px, -2px); }

/* ---------- timeline ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.role:first-child { border-top: none; padding-top: 4px; }

.role-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 3px;
}
.role-date {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.role-place { font-size: 13px; color: var(--faint); }

.role-body h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.role-body .at { color: var(--faint); font-weight: 400; margin-inline: 2px; }
.role-body .org { color: var(--accent); }

.role-body ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.role-body li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14.8px;
  line-height: 1.6;
}
.role-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-2);
}
.role-body strong { color: var(--text); font-weight: 600; }

@media (max-width: 780px) {
  .role {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .role-meta { flex-direction: row; gap: 10px; align-items: baseline; }
}

/* ---------- skills ---------- */

.skills {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.skills > div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
}
.skills > div:first-child { border-top: none; }
.skills dt { font-weight: 600; font-size: 14.5px; }
.skills dd {
  margin: 0;
  color: var(--muted);
  font-size: 14.8px;
}

@media (max-width: 700px) {
  .skills > div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 20px;
  }
}

/* ---------- education ---------- */

.edu {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.edu h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 22px;
}

.edu-item + .edu-item { margin-top: 24px; }
.edu-degree {
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}
.edu-when {
  font-weight: 400;
  font-size: 13px;
  color: var(--faint);
}
.edu-school { color: var(--muted); font-size: 14.8px; }
.edu-note {
  color: var(--faint);
  font-size: 13.8px;
  margin-top: 6px;
  line-height: 1.55;
  max-width: 52ch;
}

.certs { display: flex; flex-direction: column; gap: 10px; }
.certs li {
  color: var(--muted);
  font-size: 14.8px;
  position: relative;
  padding-left: 18px;
}
.certs li::before {
  content: "";
  position: absolute;
  left: 2px; top: 10px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border-2);
}

@media (max-width: 780px) {
  .edu { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- contact ---------- */

.contact { text-align: center; padding-block: 24px; }
.contact h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 650;
}
.contact p {
  color: var(--muted);
  margin-top: 12px;
  font-size: 16px;
}
.contact .actions { justify-content: center; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--faint);
}

/* ---------- motion ---------- */

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