/* =========================================================
   Adepoju Ayomide — Student Portfolio
   Professional design system
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@600;700;800&display=swap");

/* ---------- Design tokens ---------- */
:root {
  --ink: #0b1b2b;          /* deep navy — headings, header, footer */
  --ink-2: #12263a;
  --accent: #2563eb;       /* refined blue */
  --accent-dark: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --amber: #f59e0b;        /* used very sparingly */
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1e293b;
  --text-soft: #64748b;
  --border: #e7ecf3;
  --shadow-sm: 0 1px 3px rgba(11, 27, 43, 0.06);
  --shadow: 0 10px 30px rgba(11, 27, 43, 0.08);
  --shadow-lg: 0 20px 45px rgba(11, 27, 43, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Sora", "Inter", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { color: var(--accent-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ink); }

/* ---------- Layout ---------- */
.container { width: min(1140px, 90%); margin-inline: auto; }
section { padding: 4.5rem 0; }

.section-head { max-width: 60ch; margin-bottom: 2.5rem; }

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: var(--ink);
}

.section-intro {
  color: var(--text-soft);
  margin-top: 0.7rem;
  font-size: 1.02rem;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  background: rgba(11, 27, 43, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav__brand {
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__brand .dot { color: var(--accent); }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 3px;
  transition: var(--transition);
}

.nav__menu {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav__menu a {
  color: #b6c2d1;
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}

.nav__menu a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }

.nav__menu a.active {
  color: #fff;
  background: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.78rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(37, 99, 235, 0.35), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, #16344f 100%);
  color: #fff;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #cfe0ff;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
}

.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  margin: 1.1rem 0 1.1rem;
  color: #fff;
  font-weight: 800;
}

.hero h1 span { color: #7aa7ff; }

.hero p {
  color: #c4d2e3;
  max-width: 50ch;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__photo { justify-self: center; position: relative; }

.hero__photo::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.hero__photo img {
  position: relative;
  z-index: 1;
  width: 290px;
  height: 290px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Grid utilities & cards ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: #d4def0;
}

.card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.card__icon svg { width: 26px; height: 26px; }

.card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}

.card p { color: var(--text-soft); font-size: 0.97rem; }

.card .link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.card .link-arrow svg { width: 16px; height: 16px; transition: transform var(--transition); }
.card .link-arrow:hover svg { transform: translateX(3px); }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.about__photo { position: sticky; top: 90px; }

.about__photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about__details h3 {
  font-size: 1.15rem;
  margin: 1.8rem 0 0.7rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--accent);
}

.about__details h3:first-child { margin-top: 0; }

.about__details p { color: var(--text-soft); }

.about__details ul { list-style: none; }

.about__details ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-soft);
}

.about__details ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.about__details ul li strong { color: var(--text); }

/* Skill bars */
.skill { margin-bottom: 1.3rem; }

.skill__label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.skill__label span:last-child { color: var(--text-soft); font-weight: 500; }

.skill__bar {
  height: 8px;
  background: #eef2f7;
  border-radius: 50px;
  overflow: hidden;
}

.skill__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 50px;
  width: 0;
  transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  min-width: 480px;
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--text-soft);
  padding: 1rem 1.2rem 0;
  font-size: 0.9rem;
}

th, td { padding: 0.95rem 1.2rem; text-align: left; }

thead th {
  background: #f3f6fa;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

tbody td { border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: #f8fafd; }

/* ---------- Projects ---------- */
.project__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border);
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.9rem 0 1.2rem;
}

.tag-list li {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
}

.project__links {
  display: flex;
  gap: 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--border);
  margin-top: 0.4rem;
  padding-top: 1rem;
}

.project__links a { display: inline-flex; align-items: center; gap: 0.35rem; }
.project__links svg { width: 15px; height: 15px; }

.card code {
  background: #eef2f7;
  color: var(--accent-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  border-radius: 5px;
}

/* ---------- Planner ---------- */
.planner { max-width: 740px; margin-inline: auto; }

.planner__form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.7rem;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.planner__form input[type="text"] { flex: 1 1 220px; border: 0; box-shadow: none; }
.planner__form input[type="text"]:focus { box-shadow: none; }
.planner__form select { flex: 0 0 auto; }

.planner__stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

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

.task-list { list-style: none; }

.task {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
  box-shadow: var(--shadow-sm);
  animation: slideIn 0.3s ease;
  transition: box-shadow var(--transition);
}

.task:hover { box-shadow: var(--shadow); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.task--done { border-left-color: #10b981; background: #fbfdfc; }
.task--done .task__text { text-decoration: line-through; color: var(--text-soft); }

.task__check { width: 19px; height: 19px; cursor: pointer; accent-color: var(--accent); flex: none; }
.task__text { flex: 1; }

.task__priority {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.priority-high { background: #fde8e8; color: #dc2626; }
.priority-medium { background: #fef3d7; color: #d97706; }
.priority-low { background: #dcfce7; color: #059669; }

.task__delete {
  background: none;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.task__delete svg { width: 17px; height: 17px; }
.task__delete:hover { color: #dc2626; background: #fde8e8; }

.empty-state {
  text-align: center;
  color: var(--text-soft);
  padding: 2.5rem 1.5rem;
  border: 1px dashed #cdd7e3;
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state svg { width: 40px; height: 40px; color: #cbd5e1; margin: 0 auto 0.8rem; }

/* ---------- Forms ---------- */
input, textarea, select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  transition: border var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea { resize: vertical; }

.contact__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.contact__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 1.2rem; }

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.error-msg {
  color: #dc2626;
  font-size: 0.82rem;
  min-height: 1rem;
  display: block;
  margin-top: 0.3rem;
}

input.invalid, textarea.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-success {
  background: #dcfce7;
  color: #047857;
  border: 1px solid #a7f3cf;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  font-weight: 500;
  font-size: 0.92rem;
  display: none;
}

/* Contact info side panel */
.contact__info {
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #cbd9e8;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact__info h3 { color: #fff; margin-bottom: 1.4rem; font-size: 1.2rem; }

.contact__info ul { list-style: none; }

.contact__info li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 1.3rem;
}

.contact__info li:last-child { margin-bottom: 0; }

.contact__info .ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #7aa7ff;
}

.contact__info .ico svg { width: 19px; height: 19px; }

.contact__info .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8aa0b8;
  margin-bottom: 0.1rem;
}

.contact__info a { color: #e2e9f1; }
.contact__info a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #9fb0c2;
  margin-top: auto;
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.92rem;
}

.social {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  list-style: none;
}

.social a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #cbd9e8;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.social a svg { width: 18px; height: 18px; }

.social a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__photo img { animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero__grid,
  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero__photo { order: -1; }
  .about__photo { position: static; max-width: 340px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 3rem 0; }
  .nav__toggle { display: flex; }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 5%;
    transform: translateY(-150%);
    transition: transform 0.35s ease;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav__menu.open { transform: translateY(0); }
  .nav__menu a { display: block; padding: 0.85rem; border-radius: 8px; }

  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .hero__photo img { width: 230px; height: 230px; }
  .hero { padding: 3.5rem 0; }
}
