/* M Usama Afzal - personal portfolio
   Colours: navy #171C70, orange #EE7E2C */

:root {
  --navy: #171C70;
  --navy-dark: #10144F;
  --navy-soft: #23287E;
  --orange: #EE7E2C;
  --orange-dark: #D96E1D;
  --ink: #1B1E28;
  --muted: #5A5E6E;
  --bg: #FFFFFF;
  --soft: #F4F5FA;
  --line: #E4E6F0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 28, 112, 0.10);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); }

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

.container.narrow { max-width: 820px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-dot { color: var(--orange); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover { color: var(--orange); }

.site-nav a.nav-cta {
  color: #fff;
  background: var(--navy);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.site-nav a.nav-cta:hover { background: var(--orange); }

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(160deg, var(--navy-dark), var(--navy) 60%, var(--navy-soft));
  background-size: 56px 56px, 56px 56px, cover;
  color: #fff;
  padding: 96px 0 88px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.8rem, 7vw, 4.4rem);
  font-weight: 800;
  margin-bottom: 20px;
  animation: heroIn 0.7s ease both;
}

.hero-pitch {
  font-size: 1.2rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
  animation: heroIn 0.7s 0.12s ease both;
}

.hero-meta {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  animation: heroIn 0.7s 0.22s ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 40px;
  animation: heroIn 0.7s 0.32s ease both;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 20px rgba(238, 126, 44, 0.35);
}

.btn-primary:hover { background: var(--orange-dark); }

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  animation: heroIn 0.7s 0.42s ease both;
}

.hero-facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-facts strong {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: #fff;
}

.hero-facts span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.hero-card {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: rotate(1.5deg);
  animation: heroIn 0.7s 0.3s ease both;
  transition: transform 0.3s ease;
}

.hero-card:hover { transform: rotate(0deg) translateY(-4px); }

.hero-card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.hero-checklist {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.hero-checklist li {
  padding: 8px 0 8px 30px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
}

.hero-checklist li:last-child { border-bottom: 0; }

.hero-checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--orange);
  border-bottom: 2.5px solid var(--orange);
  transform: rotate(-45deg);
}

.hero-card-foot {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-soft { background: var(--soft); }

.section-eyebrow {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.section-intro {
  color: var(--muted);
  max-width: 640px;
  font-size: 1.05rem;
}

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

#about p { color: #33364a; }

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.edu-item {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.edu-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--orange);
}

.edu-degree {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.edu-school { color: var(--ink); margin-bottom: 4px; }
.edu-meta { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Timeline ---------- */

.timeline {
  list-style: none;
  margin: 40px 0 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--line);
}

.timeline-item {
  position: relative;
  padding: 0 0 40px 24px;
}

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

.timeline-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--orange);
}

.timeline-date {
  color: var(--orange);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.timeline-item h3 { margin-bottom: 2px; }

.timeline-org {
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.timeline-item p:last-child { color: #33364a; }

/* ---------- Skills ---------- */

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 40px;
}

.tool-chip {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.tool-chip:hover {
  background: var(--orange);
  transform: translateY(-2px);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.skill-block:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--orange);
}

.skill-block h3 { margin-bottom: 12px; }

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

.skill-block li {
  padding: 6px 0 6px 22px;
  position: relative;
  color: #33364a;
}

.skill-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- Cards (services / work) ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
}

#work .cards-grid { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--orange);
}

.card-num {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--orange);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.card h3 { margin-bottom: 8px; }
.card p:last-child { color: #33364a; }

.services-note {
  margin-top: 36px;
  background: var(--navy);
  color: #fff;
  text-align: center;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 20px 24px;
  border-radius: var(--radius);
}

/* ---------- Contact ---------- */

.section-cta {
  background: var(--navy);
  color: #fff;
}

.section-cta h2 { color: #fff; }
.section-cta .section-eyebrow { color: var(--orange); }
.section-cta p { color: rgba(255, 255, 255, 0.85); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.contact-card {
  display: block;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-3px);
  border-color: var(--orange);
}

.contact-label {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.contact-value {
  color: #fff;
  font-weight: 600;
  word-break: break-word;
  margin: 0;
}

.contact-actions { margin: 36px 0 0; justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 26px 0;
  font-size: 0.92rem;
}

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

.footer-inner p { margin: 0; }

.back-top {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.back-top:hover { color: var(--orange); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 72px 0 64px; }
  .hero-card { max-width: 520px; transform: rotate(0deg); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  #work .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(23, 28, 112, 0.10);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a.nav-cta {
    margin-top: 12px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .cards-grid { grid-template-columns: 1fr; }
  #work .cards-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .hero-facts { gap: 24px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .timeline { padding-left: 20px; }
  .timeline-item { padding-left: 16px; }
  .timeline-item::before { left: -29px; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1, .hero-pitch, .hero-meta, .hero-actions, .hero-facts, .hero-card {
    animation: none;
  }
  .btn, .card, .skill-block, .edu-item, .tool-chip, .contact-card, .hero-card {
    transition: none;
  }
}
