/* ==========================================================================
   Portfolio — Styles
   Palette: Deep navy (#0b1120), Blue accent (#3B82F6), Cyan alt (#06B6D4),
   Off-white (#F5F5F5).
   ========================================================================== */

/* ---------- CSS Custom Properties (Dark default) ---------- */
:root {
  /* Shared tokens */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --radius: 10px;
  --transition: 0.3s ease;
  --max-width: 1140px;
  --nav-height: 64px;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #111c30;
  --surface: #182338;
  --text: #e8ecf1;
  --text-muted: #94a3b8;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-alt: #06B6D4;
  --border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(11, 17, 32, 0.85);
}

[data-theme="light"] {
  --bg: #F5F5F5;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #555;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-alt: #0891B2;
  --border: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(245, 245, 245, 0.85);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* Hide default cursor on non-touch devices */
@media (pointer: fine) {
  body, a, button { cursor: none; }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Utility ---------- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.container--narrow {
  max-width: 680px;
}

.accent {
  color: var(--accent);
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a:focus::after {
  width: 100%;
}

.nav__links a:hover,
.nav__links a:focus {
  color: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: border-color var(--transition), color var(--transition);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="dark"] .icon--sun { display: none; }
[data-theme="dark"] .icon--moon { display: block; }
[data-theme="light"] .icon--sun { display: block; }
[data-theme="light"] .icon--moon { display: none; }

/* Burger menu (mobile) */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* Animated floating orbs */
.hero__bg::before,
.hero__bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite alternate;
}

.hero__bg::before {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.12);
  top: 10%;
  left: 15%;
}

.hero__bg::after {
  width: 350px;
  height: 350px;
  background: rgba(6, 182, 212, 0.1);
  bottom: 10%;
  right: 15%;
  animation-delay: -4s;
}

@keyframes float {
  to { transform: translate(30px, -30px) scale(1.05); }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

.hero__greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero__name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  display: inline-flex;
}

/* Staggered letter animation */
.letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(-40deg);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__name.revealed .letter {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

.hero__name.revealed .letter:nth-child(1) { transition-delay: 0.05s; }
.hero__name.revealed .letter:nth-child(2) { transition-delay: 0.12s; }
.hero__name.revealed .letter:nth-child(3) { transition-delay: 0.19s; }
.hero__name.revealed .letter:nth-child(4) { transition-delay: 0.26s; }
.hero__name.revealed .letter:nth-child(5) { transition-delay: 0.33s; }

.hero__title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  min-height: 1.8em;
}

.cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn--outline {
  border-color: var(--text-muted);
  color: var(--text);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn--ghost {
  background: none;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--full {
  width: 100%;
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 6rem 0;
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
}

/* Subtle section separator */
.section + .section--alt::before,
.section--alt + .section:not(.section--alt)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section__heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
}

.section__heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  border-radius: 2px;
  margin: 0.75rem auto 2.5rem;
}

.section__subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

/* ---------- ABOUT ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.about__skills h3 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skills-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition);
}

.skills-list li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- PROJECTS ---------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.5s ease, box-shadow var(--transition);
}

.card:hover,
.card:focus-within {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.card__img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__emoji {
  font-size: 3.5rem;
}

.card__body {
  padding: 1.5rem;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.card__tags span {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.card__links {
  display: flex;
  gap: 0.5rem;
}

/* ---------- EXPERIENCE / TIMELINE ---------- */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 2rem;
}

/* Background track (always visible, faint) */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

/* Filled progress line (grows with scroll) */
.timeline::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  width: 2px;
  height: var(--tl-fill, 0px);
  background: var(--accent);
  border-radius: 1px;
  z-index: 1;
}

.timeline__item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

/* Timeline item bidirectional reveal */
.timeline__item.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline__item.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.timeline__marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--bg);
  z-index: 2;
  transform: scale(0.5);
  transition: background 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.timeline__item.revealed .timeline__marker {
  background: var(--accent);
  transform: scale(1);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.timeline__date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline__content h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline__company {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline__content p:last-child {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.resume-cta {
  text-align: center;
  margin-top: 3rem;
}

/* ---------- CERTIFICATIONS ---------- */
.certs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
  border-color: var(--accent);
}

.cert-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1rem;
}

.cert-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cert-card__org {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.cert-card__date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.cert-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

a.cert-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.cert-card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--transition);
}

a.cert-card:hover .cert-card__link {
  color: var(--accent-hover);
}

/* ---------- CONTACT GRID ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}

.contact__intro {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.contact__channels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact__channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.contact__channel:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.contact__channel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  flex-shrink: 0;
}

.contact__channel-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0;
}

.contact__channel-value {
  font-weight: 600;
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

/* ---------- CONTACT FORM ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group textarea {
  resize: vertical;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__inner p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__views {
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.footer__views.visible {
  opacity: 1;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links li {
    text-align: center;
  }

  .nav__links a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .nav__burger {
    display: flex;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__bg::before,
  .hero__bg::after {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4rem 0;
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Focus visible outlines for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .cursor-dot,
  .cursor-outline,
  .grain {
    display: none !important;
  }
}

/* =============================================
   ENHANCEMENT FEATURES
   ============================================= */

/* ---------- 1. Custom Cursor ---------- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
}

.cursor-dot.hovering {
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.15);
}

.cursor-outline.hovering {
  width: 50px;
  height: 50px;
  opacity: 0.8;
  border-color: var(--accent);
}

/* ---------- 5. Film Grain Overlay ---------- */
.grain {
  position: fixed;
  inset: -10%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
  animation: grain-shift 0.5s steps(8) infinite;
}

@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -3%); }
  30% { transform: translate(3%, 1%); }
  50% { transform: translate(-1%, 3%); }
  70% { transform: translate(2%, -2%); }
  90% { transform: translate(-3%, 1%); }
}

/* ---------- 6. Mouse Spotlight ---------- */
.hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 60%),
              var(--bg);
  transition: background var(--transition);
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.06),
    transparent 60%
  );
  transition: opacity 0.3s;
}

[data-theme="light"] body::before {
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.03),
    transparent 60%
  );
}

/* ---------- 7. Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  z-index: 10001;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* ---------- 8. Hire Badge ---------- */
.hire-badge {
  position: absolute;
  bottom: 5rem;
  right: 5%;
  width: 110px;
  height: 110px;
  z-index: 2;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity var(--transition);
}

.hire-badge:hover {
  opacity: 1;
}

.hire-badge svg {
  animation: spin 12s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hire-badge__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--accent-alt);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px rgba(6, 182, 212, 0.4); }
  50% { box-shadow: 0 0 14px rgba(6, 182, 212, 0.8); }
}

/* ---------- Back to Top Button ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* ---------- Form Feedback ---------- */
.form-group input.error,
.form-group textarea.error {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-error {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.2rem;
}

.form-success {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-alt);
  font-weight: 600;
  display: none;
}

.form-success.visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Nav Active Link ---------- */
.nav__links a.active {
  color: var(--accent);
}

.nav__links a.active::after {
  width: 100%;
}

/* ---------- 3. Card Tilt (perspective container) ---------- */
.card {
  transform-style: preserve-3d;
  perspective: 800px;
}

/* ---------- 9. Confetti (Easter Egg) ---------- */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 99999;
  pointer-events: none;
  border-radius: 2px;
  animation: confetti-fall 1.5s ease-out forwards;
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ---------- Mobile: hide custom cursor & resize badge ---------- */
@media (max-width: 768px) {
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }

  .hire-badge {
    width: 80px;
    height: 80px;
    bottom: 6rem;
    right: 3%;
  }

  .hire-badge svg {
    width: 80px;
    height: 80px;
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
  }
}

@media (max-width: 950px) and (min-width: 769px) {
  .hire-badge {
    bottom: 2rem;
    right: 2%;
    width: 90px;
    height: 90px;
  }

  .hire-badge svg {
    width: 90px;
    height: 90px;
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }

  body::before {
    display: none;
  }
}
