/* =========================================================
   Adeyemo Abdullahi — Portfolio
   Dark & bold theme, pure HTML/CSS with light-touch vanilla JS
   ========================================================= */

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* ---------- Theme tokens ---------- */
:root {
  /* dark (default) */
  --bg: #0a0a14;
  --bg-alt: #0f0f1c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #14142450;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f3f1fa;
  --text-dim: #a6a2c0;
  --text-faint: #706c8c;

  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --gradient-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(34, 211, 238, 0.15));

  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
  --radius: 18px;
  --radius-sm: 10px;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body.light-mode {
  --bg: #f6f5fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --border: rgba(20, 18, 40, 0.08);
  --text: #16142a;
  --text-dim: #514e6b;
  --text-faint: #8b87a5;

  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.12);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-dim);
}

a {
  color: inherit;
}

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}

section > .container > h2,
.hero-text h1 {
  margin-bottom: 16px;
}

section > .container > h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 44px;
}

/* ---------- Background decoration ---------- */
.bg-glow {
  position: fixed;
  width: 45vw;
  height: 45vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -2;
  opacity: 0.35;
  pointer-events: none;
}

.bg-glow--one {
  top: -10%;
  right: -10%;
  background: #8b5cf6;
}

.bg-glow--two {
  bottom: -15%;
  left: -12%;
  background: #22d3ee;
}

body.light-mode .bg-glow {
  opacity: 0.18;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

body.light-mode .bg-grid {
  background-image:
    linear-gradient(to right, rgba(20,18,40,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20,18,40,0.035) 1px, transparent 1px);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10, 10, 20, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.7);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  color: #0a0a14;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.brand-name .dot {
  color: var(--accent-2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.active {
  color: var(--text);
  background: var(--gradient-soft);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Theme switch */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.3s;
}

.slider i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
}

.slider .fa-moon {
  left: 7px;
  color: var(--accent-2);
}

.slider .fa-sun {
  right: 7px;
  color: var(--text-faint);
}

.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: var(--gradient);
  border-radius: 50%;
  transition: 0.3s;
  z-index: 1;
}

.switch input:checked + .slider::before {
  transform: translateX(24px);
}

.switch input:checked + .slider .fa-sun {
  color: #fbbf24;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Sections ---------- */
main {
  position: relative;
  z-index: 1;
}

.page-section {
  display: none;
  padding: 150px 0 100px;
  min-height: 100vh;
  box-sizing: border-box;
}

.page-section.active {
  display: block;
  animation: fadeInUp 0.55s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.link-arrow i {
  transition: transform 0.25s ease;
}

.link-arrow:hover i {
  transform: translateX(4px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: var(--gradient);
  color: #0a0a14;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(139, 92, 246, 0.5);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--gradient-soft);
  border-color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 120px;
}

.hero-text {
  flex: 1 1 480px;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.hero-name {
  font-family: 'Sacramento', cursive;
  font-weight: 400;
  font-size: 1.3em;
  line-height: 1.3;
  display: inline-block;
  padding-bottom: 0.1em;
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.hero-image {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
  height: 300px;
}

.hero-image-glow {
  position: absolute;
  inset: -30px;
  background: var(--gradient);
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.45;
}

.hero-image img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
}

/* ---------- Arsenal ---------- */
.arsenal {
  margin-bottom: 120px;
  text-align: center;
}

.arsenal h2 {
  margin-bottom: 40px;
}

.arsenal-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.arsenal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 130px;
  padding: 26px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.arsenal-item:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  background: var(--gradient-soft);
}

.arsenal-item i {
  font-size: 2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.arsenal-item span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}

/* ---------- Cards / grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card,
.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(139, 92, 246, 0.15);
}

.project-card-top {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-soft);
  margin-bottom: 18px;
}

.project-card-top i {
  font-size: 1.3rem;
  color: var(--accent-2);
}

.project-card h3,
.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-card p,
.service-card p {
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.project-link i {
  font-size: 0.75rem;
}

.project-link--disabled {
  color: var(--text-faint);
}

.project-card--soon {
  opacity: 0.75;
}

.featured {
  margin-bottom: 40px;
}

/* Services */
.service-card {
  text-align: center;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--gradient-soft);
}

.service-icon i {
  font-size: 1.6rem;
  color: var(--accent);
}

/* ---------- About ---------- */
.about-grid {
  display: flex;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

.about-image {
  flex: 1 1 320px;
  max-width: 380px;
  position: relative;
}

.about-image::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 10px);
  z-index: -1;
}

.about-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
}

.about-content {
  flex: 1 1 420px;
}

.about-content p {
  font-size: 1.03rem;
  margin-bottom: 18px;
}

.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.skills-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---------- Store ---------- */
.store {
  display: flex;
  justify-content: center;
}

.store-box {
  text-align: center;
  max-width: 520px;
  padding: 60px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.store-box i {
  font-size: 2.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
  display: inline-block;
}

.store-box h2 {
  margin-bottom: 14px;
}

.store-box p {
  margin-bottom: 28px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.contact-form button {
  margin-top: 4px;
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.2em;
}

.form-status.success {
  color: #34d399;
}

.form-status.error {
  color: #f87171;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.info-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.info-card i {
  font-size: 1.2rem;
  color: var(--accent-2);
  width: 22px;
  text-align: center;
}

.info-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.info-card strong {
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-word;
}

.info-card--static {
  cursor: default;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.social-row a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 1.05rem;
  transition: all 0.25s ease;
}

.social-row a:hover {
  color: #0a0a14;
  background: var(--gradient);
  border-color: transparent;
  transform: translateY(-3px);
}

/* ---------- Footer ---------- */
.main-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.footer-brand {
  pointer-events: none;
}

.footer-content p {
  font-size: 0.9rem;
}

.copyright {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-top: 6px;
}

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--gradient);
  color: #0a0a14;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 900;
}

#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .navbar {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .brand {
    flex: 1 1 100%;
    justify-content: center;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .page-section {
    padding-top: 195px;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 14px 14px;
  }

  .page-section {
    padding: 175px 0 70px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-link {
    font-size: 0.68rem;
    padding: 5px 6px;
  }

  .switch {
    width: 38px;
    height: 20px;
  }

  .slider::before {
    width: 14px;
    height: 14px;
    left: 2px;
    top: 2px;
  }

  .switch input:checked + .slider::before {
    transform: translateX(18px);
  }

  .slider i {
    display: none;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    margin-bottom: 80px;
  }

  .hero-text {
    display: contents;
  }

  .eyebrow { order: 1; }
  .hero-text h1 { order: 2; }
  .hero-role { order: 3; }
  .hero-image { order: 4; }
  .hero-desc { order: 5; }
  .hero-actions { order: 6; }
  .hero-stats { order: 7; }

  .hero-text {
    max-width: 100%;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

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

  .hero-image {
    width: 220px;
    height: 220px;
    flex-basis: 220px;
  }

  .arsenal,
  .featured {
    margin-bottom: 70px;
  }

  .about-grid {
    flex-direction: column;
    text-align: center;
  }

  .skills-list {
    justify-content: center;
  }

  .store-box {
    padding: 44px 24px;
  }

  #backToTop {
    bottom: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }
}
