/* ============================================================
   Sameer Ahmad Khan — Portfolio (light, professional)
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #14171f;
  --text-dim: #565d6b;
  --text-faint: #98a0ac;
  --rule: #e5e7eb;
  --accent: #2454e0;
  --accent-ink: #ffffff;
  --max-width: 1080px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* ===== Underline hover effect ===== */
.underline-fx {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.25s ease, color 0.2s ease;
  padding-bottom: 1px;
}
.underline-fx:hover { background-size: 100% 1px; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--rule);
  background: rgba(255, 255, 255, 0.96);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  margin: 0 auto;
}
.nav-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-num {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  transition: color 0.2s ease;
}
.nav-links a:hover .nav-num, .nav-links a.active .nav-num { color: var(--accent); }

.nav-cta {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.nav-cta:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn-primary {
  display: inline-block;
  padding: 12px 26px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover { background: #1c40b3; }

.mark { color: var(--accent); }

/* ===== Hero / Contact statement ===== */
.hero {
  padding: 156px 0 96px;
}
.contact-section { padding: 96px 0 120px; }

.eyebrow {
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 20px;
}

.hero-name {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.hero-name--sm { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 28px; }

.hero-role {
  max-width: 620px;
  color: var(--text-dim);
  font-size: 1.08rem;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.hero-meta .sep { color: var(--text-faint); }

.contact-email {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
}

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin: 0 0 28px;
}

.prose { max-width: 640px; }
.prose p {
  color: var(--text-dim);
  font-size: 1.03rem;
  margin: 0 0 16px;
}
.prose strong { color: var(--text); font-weight: 600; }

.footnote {
  max-width: 640px;
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--text-faint);
  font-size: 0.86rem;
}

.section-note {
  max-width: 640px;
  margin: 0 0 28px;
  color: var(--text-dim);
  font-size: 0.98rem;
}

/* ===== Impact stat strip ===== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  margin: 0 0 40px;
  background: var(--bg);
}
.stat-block {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
}
.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.built-for {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.9;
}
.built-for-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-right: 10px;
}

/* ===== Flowing skills paragraph ===== */
.skills-flow {
  max-width: 720px;
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--text-dim);
  margin: 0;
}
.flow-cat {
  color: var(--text);
  font-weight: 700;
}

/* ===== Blog list ===== */
.blog-list { display: flex; flex-direction: column; }
.blog-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.blog-list .blog-item:first-child { border-top: 1px solid var(--rule); }
.blog-item:hover { color: var(--accent); }
.blog-item .arrow { color: var(--text-faint); font-weight: 400; flex-shrink: 0; transition: color 0.2s ease; }
.blog-item:hover .arrow { color: var(--accent); }
.blog-empty { color: var(--text-dim); font-size: 0.98rem; margin: 0; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 20px 24px 28px;
    gap: 18px;
    isolation: isolate;
  }
}

@media (max-width: 560px) {
  .hero { padding: 128px 0 72px; }
  .section { padding: 64px 0; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 16px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
