/* Babatunde Alaraje — Portfolio */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --max: 1100px;
  --header-h: 64px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--blue);
  letter-spacing: -0.02em;
  text-decoration: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--blue);
  border-radius: 10px;
}

.logo:hover {
  background: var(--blue-soft);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.nav-menu a {
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--blue);
}

.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--blue-dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  background: linear-gradient(180deg, var(--blue-soft) 0%, var(--bg) 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.role {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--blue);
}

.lead {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  max-width: 36rem;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--blue-dark);
  text-decoration: none;
}

.btn-outline {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue-soft);
  text-decoration: none;
}

.hero-photo {
  justify-self: center;
}

.hero-photo img {
  width: min(320px, 80vw);
  height: min(320px, 80vw);
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: var(--shadow), 0 0 0 3px var(--blue);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}

.section-intro {
  margin: -0.75rem 0 1.75rem;
  color: var(--ink-muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.about-grid > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-highlights li {
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--ink);
}

.section-alt .about-highlights li {
  background: var(--bg);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 4px;
  top: 1.15rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--blue);
}

.timeline-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.65rem;
}

.timeline-header h3 {
  margin: 0;
  font-size: 1.1rem;
  width: 100%;
}

.company {
  font-weight: 600;
  color: var(--blue);
}

.timeline-header time {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.timeline-card > p {
  margin: 0 0 0.65rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.timeline-card ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.timeline-card li {
  margin-bottom: 0.25rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.project-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.project-card > p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tech-tags li {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.55rem;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border-radius: 999px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.skill-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.skill-group h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--blue);
}

.skill-group ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skill-group li {
  font-size: 0.9rem;
  color: var(--ink-muted);
  padding-left: 0.85rem;
  position: relative;
}

.skill-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* Education */
.edu-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  max-width: 40rem;
  border-left: 4px solid var(--blue);
}

.edu-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.edu-degree {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: var(--ink);
}

.edu-meta {
  margin: 0 0 0.85rem;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 500;
}

.edu-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Contact */
.contact-wrap {
  text-align: center;
  max-width: 36rem;
}

.contact-wrap .section-title {
  text-align: center;
}

.contact-wrap .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.contact-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-shadow: var(--shadow);
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.contact-list a {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--blue);
}

.contact-list span:not(.contact-label) {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--ink);
  color: #94a3b8;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
}

.back-top {
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
}

.back-top:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-photo {
    order: -1;
  }

  .hero-photo img {
    width: min(240px, 70vw);
    height: min(240px, 70vw);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    padding: 0.85rem 1.25rem;
  }

  .nav-cta {
    margin: 0.5rem 1rem 0.75rem;
    text-align: center;
  }

  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
