/* ==========================================================================
   Portfolio refresh — type, surfaces, and small-screen layout
   Loaded last. Does not change markup or behavior.
   ========================================================================== */

:root {
  --bg: #07080d;
  --bg-secondary: #0c0e14;
  --card: #12141c;
  --accent: #5b8cff;
  --accent-2: #8eb0ff;
  --text: #f4f6fb;
  --muted: #a3adc2;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 18px;
  --radius-lg: 28px;
  --glass: rgba(12, 14, 20, 0.72);
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  letter-spacing: -0.011em;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.section-heading,
.about-heading,
.proj-name,
.domain-title,
.blog-title,
.contact-panel-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.navbar-brand,
.stat-number,
.about-stat-pill .number,
.btn,
.nav-link {
  font-family: var(--font-sans);
}

.section-label,
.hero-eyebrow,
.about-kicker,
.exp-period,
.proj-period,
.hero-meta-text,
.tech-item span,
.proj-tech span {
  font-family: var(--font-mono);
}

p,
.section-desc,
.hero-subtitle {
  color: var(--muted);
}

/* ── Display type ────────────────────────────────────────────────────────── */
.hero-title {
  font-size: clamp(3.4rem, 7.4vw, 6.4rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.hero-typing {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent-2);
  min-height: 1.35em;
}

.section-heading {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
}

.section-label,
.hero-eyebrow {
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.about-heading {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
}

/* ── Controls ────────────────────────────────────────────────────────────── */
.btn,
.btn-primary,
.btn.btn-primary,
.btn-ghost,
.btn.btn-outline-light {
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn-primary,
.btn.btn-primary {
  box-shadow: 0 8px 24px rgba(91, 140, 255, 0.28);
}

#mainNav.navbar {
  background: rgba(7, 8, 13, 0.72) !important;
  border-bottom-color: transparent;
}

#mainNav.navbar.scrolled {
  background: rgba(7, 8, 13, 0.9) !important;
}

#mainNav .nav-link {
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

#mainNav .navbar-nav .btn {
  border-radius: 999px;
  font-weight: 600;
}

/* ── Cards sit a little quieter ──────────────────────────────────────────── */
.glass-card,
.stats-grid,
.skill-cat-card,
.arch-card,
.ai-card,
.cert-card,
.proj-card,
.contact-panel,
.contact-info .box,
.mission-box,
.about-meta-item {
  border-color: var(--border);
}

.stats-grid {
  border-radius: 24px;
}

/* ── Desktop nav stays on one line between lg and xl ────────────────────── */
@media (min-width: 992px) and (max-width: 1199.98px) {
  #mainNav .nav-link {
    font-size: 0.78rem;
    padding: 0.45rem 0.42rem !important;
  }

  #mainNav .navbar-nav .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
  }
}

/* ── Tablet and phone ────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  #mainNav.navbar {
    height: auto;
    min-height: var(--nav-h);
  }

  #mainNav .container {
    min-height: var(--nav-h);
  }

  #mainNav .navbar-collapse {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    margin-top: 0;
    padding: 10px;
    background: rgba(12, 14, 20, 0.96);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  #mainNav .nav-link {
    font-size: 1rem;
    padding: 0.85rem 0.9rem !important;
    border-radius: 12px;
  }

  #mainNav .nav-link::after {
    display: none;
  }

  #mainNav .nav-link:hover,
  #mainNav .nav-link.active {
    background: rgba(255, 255, 255, 0.04);
  }

  #mainNav .navbar-nav .btn {
    width: 100%;
    margin: 8px 0 4px;
    padding: 0.8rem 1rem;
  }

  .hero {
    align-items: flex-start;
    min-height: auto;
    padding: calc(var(--nav-h) + 20px) 0 48px;
  }

  .hero-portrait {
    position: absolute;
    left: 50%;
    right: auto;
    top: calc(var(--nav-h) + 8px);
    transform: translateX(-50%);
    width: 108px;
    opacity: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }

  .hero-portrait img {
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
    object-position: center 15%;
    filter: none;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(7, 8, 13, 0.15) 0%, var(--bg) 88%);
  }

  .hero-content {
    padding-top: 132px;
  }

  .hero-copy {
    max-width: 40rem;
    margin-inline: auto;
    text-align: center;
  }

  .hero-eyebrow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    row-gap: 6px;
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: clamp(3rem, 13vw, 4.4rem);
  }

  .hero-subtitle {
    margin-inline: auto;
  }

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

  .section,
  .ftco-section {
    padding: 72px 0;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .about-media {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about-frame {
    margin-inline: auto;
  }

  .about-content {
    text-align: left;
  }

  .stats-section {
    margin-top: 0;
    padding-top: 4px;
  }

  .contact-panel {
    padding: 22px 18px;
  }

  .mouse-glow,
  .bg-blobs {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-content {
    padding-top: 124px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-typing {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .hero-meta {
    gap: 10px;
  }

  .stats-grid {
    padding: 8px 4px;
    gap: 0;
  }

  .stat-item:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .section,
  .ftco-section {
    padding: 56px 0;
  }

  .section-heading {
    font-size: clamp(2.15rem, 10vw, 2.8rem);
  }

  .skill-cat-card .skill-icons {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .exp-badge {
    margin-left: 0;
  }

  .map-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .whatsapp-float {
    left: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .back-to-top {
    right: 16px;
    bottom: 96px;
    width: 42px;
    height: 42px;
  }

  .blog-featured-body,
  .proj-card,
  .cert-card {
    padding: 18px;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 2.7rem;
  }

  .hero-portrait {
    width: 92px;
  }

  .hero-content {
    padding-top: 112px;
  }
}
