/* ═══════════════════════════════════════════════════════
   SECTIONS — Hero, About, Skills, Projects, Certs, Contact
═══════════════════════════════════════════════════════ */

/* ─── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 80px) 48px 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 0%, transparent 80%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.glow-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(100,255,218,0.07) 0%, transparent 70%);
  top: -200px;
  right: -150px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(125,100,255,0.05) 0%, transparent 70%);
  bottom: -100px;
  left: 10%;
}

.hero-deco {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  pointer-events: none;
  z-index: 0;
}

.deco-a {
  width: 480px;
  height: 480px;
  top: 8%;
  right: 4%;
  border-style: dashed;
  animation: slowSpin 40s linear infinite;
}

.deco-b {
  width: 220px;
  height: 220px;
  bottom: 14%;
  right: 20%;
  border-color: rgba(100, 255, 218, 0.12);
  animation: slowSpin 25s linear infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(10px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: badgePulse 2.4s ease-in-out infinite;
}

.hero-title {
  font-family: var(--fh);
  font-size: clamp(3.2rem, 7.5vw, 7rem);
  font-weight: 700;
  line-height: 0.93;
  letter-spacing: -0.04em;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 36px;
}

/* Typewriter lines */
.h-line {
  display: block;
}

.h-char {
  display: inline-block;
}

.h-shimmer {
  color: var(--text);
}

.h-shimmer .h-char {
  animation: shimmerChar 2.2s ease-in-out infinite;
}

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

.h-accent .h-char {
  animation: glowAccent 2.2s ease-in-out infinite;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-desc strong {
  color: var(--text);
  font-weight: 500;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 36px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  max-width: 760px;
  opacity: 0;
  transform: translateY(20px);
}

.qa-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(100, 255, 218, 0.32);
  background: rgba(100, 255, 218, 0.11);
  color: rgba(240, 237, 230, 0.96);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.qa-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(100, 255, 218, 0.7);
}

.h-stat { display: flex; flex-direction: column; gap: 2px; }

.h-stat-n {
  font-family: var(--fh);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.h-stat-l {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.h-stat-sep {
  width: 1px;
  height: 38px;
  background: var(--border);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
  opacity: 0;
}

.sh-text {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sh-line {
  width: 52px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

.sh-fill {
  height: 100%;
  background: var(--accent);
  animation: lineSlide 2.2s ease-in-out infinite 1.2s;
}

@media (min-width: 769px) {
  .hero.story-active .hero-content {
    will-change: transform, opacity;
  }

  .hero.story-active .hero-caps {
    position: absolute;
    left: 0;
    top: 58%;
    width: min(90vw, 860px);
    margin-top: 0;
    gap: 12px;
  }

  .hero.story-active .qa-chip {
    box-shadow: 0 0 0 1px rgba(100, 255, 218, 0.15), 0 16px 30px rgba(0, 0, 0, 0.35);
  }

  .hero.story-active .hero-title,
  .hero.story-active .hero-desc,
  .hero.story-active .hero-btns,
  .hero.story-active .hero-stats,
  .hero.story-active .hero-badge,
  .hero.story-active .hero-caps,
  .hero.story-active .hero-glow {
    will-change: transform, opacity, filter;
  }
}

@media (max-width: 768px) {
  .hero-caps {
    opacity: 1;
    transform: none;
    margin-top: 24px;
  }

  .qa-chip {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }
}

/* ─── About ────────────────────────────────────────── */
.s-about { background: var(--bg); }

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 88px;
  align-items: start;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.about-body p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.about-body strong {
  color: var(--text);
  font-weight: 500;
}

.about-cta-links {
  display: flex;
  gap: 28px;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.35s var(--ease), background 0.35s, transform 0.35s var(--ease);
}

.spec-card:hover {
  border-color: rgba(100, 255, 218, 0.28);
  background: rgba(100, 255, 218, 0.025);
  transform: translateY(-4px);
}

.spec-ico {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.spec-card h3 {
  font-family: var(--fh);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.spec-card p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── Skills ───────────────────────────────────────── */
.s-skills { background: var(--bg-alt); }

.skills-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.skill-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}

.skill-cat:hover {
  border-color: rgba(100, 255, 218, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(100, 255, 218, 0.06);
}

.cat-name {
  font-family: var(--fh);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

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

.tool {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text);
  transition: color 0.2s;
}

.tool:hover { color: var(--accent); }

.t-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}

.t-badge {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(100, 255, 218, 0.07);
  border: 1px solid rgba(100, 255, 218, 0.18);
  border-radius: 5px;
  font-size: 0.7rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* ─── Projects ─────────────────────────────────────── */
.s-projects {
  background: var(--bg);
}

/* Horizontal scroll track */
.proj-scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  position: relative;
  perspective: 1400px;
  scroll-snap-type: none;
  scroll-padding: 0 6px;
  scroll-behavior: auto;
  /* hide scrollbar, still scrollable */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.proj-scroll-wrapper::-webkit-scrollbar { display: none; }
.proj-scroll-wrapper.is-auto-paused {
  cursor: grab;
}

.proj-scroll-wrapper.is-user-interacting {
  cursor: grabbing;
}

.proj-track {
  display: flex;
  gap: 24px;
  width: max-content;
  align-items: stretch;
  transform-style: preserve-3d;
  /* light side padding so first/last card can breathe */
  padding: 8px 6px;
}

/* Progress bar under track */
.proj-progress {
  margin-top: 24px;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08));
  border-radius: 999px;
  overflow: hidden;
}

.proj-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fffd7 0%, #64ffda 45%, #9dffe9 100%);
  box-shadow: 0 0 24px rgba(100, 255, 218, 0.45);
  transition: width 0.16s ease-out;
}

.proj-card {
  display: block;
  width: clamp(300px, 72vw, 420px);
  flex-shrink: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  opacity: 0;
  transform: translateY(22px) scale(0.96);
  transform-origin: center center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity, box-shadow;
  transition: border-color 0.35s var(--ease), background 0.35s,
              transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              opacity 0.45s var(--ease);
  transition-delay: var(--proj-delay, 0ms);
}

.proj-scroll-wrapper.is-visible .proj-card {
  opacity: 1;
  transform: translateY(0) scale(0.98);
}

.proj-card:hover {
  border-color: rgba(100, 255, 218, 0.22);
  background: rgba(100, 255, 218, 0.03);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(100, 255, 218, 0.08);
}

.proj-card.is-active {
  border-color: rgba(100, 255, 218, 0.32);
  background: rgba(100, 255, 218, 0.05);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(100, 255, 218, 0.16);
}

.proj-card.is-active .proj-tags span {
  color: #9fffea;
  border-color: rgba(100, 255, 218, 0.35);
}

.proj-lang {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 100px;
}

.proj-lang.ts {
  background: rgba(49, 120, 198, 0.14);
  color: #3178C6;
  border: 1px solid rgba(49, 120, 198, 0.28);
}

.proj-lang.js {
  background: rgba(247, 223, 30, 0.1);
  color: #F7DF1E;
  border: 1px solid rgba(247, 223, 30, 0.24);
}

.proj-lang.private {
  background: rgba(240, 237, 230, 0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}

.proj-client-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.proj-card--private {
  cursor: default;
  border-style: dashed;
}

.proj-card--private:hover {
  border-color: var(--border);
  background: var(--bg-card);
}

.proj-arrow {
  font-size: 1.2rem;
  color: var(--muted);
  transition: color 0.2s, transform 0.25s;
}

.proj-card:hover .proj-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.proj-card h3 {
  font-family: var(--fh);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.proj-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.proj-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.proj-tags span {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 11px;
  border-radius: 100px;
}

.proj-all {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 200px;
  border-style: dashed;
}

.proj-all span:first-child {
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color 0.2s;
}

.proj-all:hover span:first-child { color: var(--accent); }

.proj-big-arrow {
  font-family: var(--fh);
  font-size: 2.5rem;
  color: var(--muted);
  transition: transform 0.3s var(--ease), color 0.25s;
}

.proj-all:hover .proj-big-arrow {
  transform: translateX(10px);
  color: var(--accent);
}

@media (max-width: 960px) {
  .proj-track {
    gap: 16px;
    padding-right: 14px;
  }

  .proj-card {
    width: min(84vw, 420px);
    padding: 24px;
  }
}

@media (max-width: 580px) {
  .proj-scroll-wrapper {
    scroll-padding: 0 2px;
  }

  .proj-track {
    gap: 14px;
    padding: 4px 2px;
  }

  .proj-card {
    width: 86vw;
    padding: 22px;
  }

  .proj-progress {
    margin-top: 18px;
    height: 3px;
  }
}

/* ─── Certifications ───────────────────────────────── */
.s-certs { background: var(--bg-alt); }

.certs-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.cert-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.35s var(--ease), border-color 0.35s var(--ease);
}

.cert-item:hover {
  padding-left: 10px;
  border-bottom-color: rgba(100, 255, 218, 0.25);
}

.cert-item:hover .cert-title {
  color: var(--accent);
}

/* ── Icon wrapper ─────────────────────────────────── */
.cert-icon-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
}

/* GitHub org avatars — fill container completely */
.cert-icon-wrap.iw-fill {
  border: none;
}
.cert-icon-wrap.iw-fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* simpleicons SVG — centered on colored bg */
.cert-icon-wrap.iw-svg img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

/* Google favicon service — centered, 32px */
.cert-icon-wrap.iw-fav img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

/* ── Text ──────────────────────────────────────────── */
.cert-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cert-title {
  font-family: var(--fh);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.3s var(--ease);
}

.cert-org {
  font-size: 0.7875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid rgba(100, 255, 218, 0.15);
  padding: 4px 11px;
  border-radius: 100px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── Contact ──────────────────────────────────────── */
.s-contact {
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding: 152px 0 140px;
}

.contact-bg-txt {
  position: absolute;
  bottom: -40px;
  right: -30px;
  font-family: var(--fh);
  font-size: clamp(120px, 22vw, 260px);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.04);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

.s-contact .container {
  position: relative;
  z-index: 1;
}

.contact-title {
  font-family: var(--fh);
  font-size: clamp(3.25rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}

.contact-title em {
  font-style: normal;
  color: var(--accent);
}

.contact-sub {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 60px;
}

.contact-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.c-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 36px;
  min-width: 210px;
  transition: border-color 0.35s var(--ease), background 0.35s,
              transform 0.35s var(--ease);
}

.c-link:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-4px);
}

.c-link-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.c-link-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.c-link-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.c-link-val {
  font-family: var(--fh);
  font-size: 1.1875rem;
  font-weight: 600;
}

.c-link:hover .c-link-val { color: var(--accent); }
