/* ========================================
   Portfolio CSS - Cyber/Neon Theme
   ======================================== */

/* JetBrains Mono */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin-700.woff2') format('woff2');
}

/* Inter */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-700.woff2') format('woff2');
}

/* CSS Variables */
:root {
  --bg-primary: hsl(220, 20%, 4%);
  --bg-secondary: hsl(220, 20%, 8%);
  --bg-card: hsl(220, 20%, 10%);
  --text-primary: hsl(160, 100%, 95%);
  --text-secondary: hsl(220, 10%, 55%);
  --accent: hsl(160, 100%, 50%);
  --accent-dim: hsl(160, 80%, 40%);
  --accent-secondary: hsl(185, 100%, 50%);
  --border: hsl(220, 15%, 18%);
  --glow: 0 0 20px hsla(160, 100%, 50%, 0.4);
  --glow-strong: 0 0 40px hsla(160, 100%, 50%, 0.6);
  --radius: 12px;
  --radius-sm: 8px;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Effects */
.bg-grid {
  display: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(hsla(220, 15%, 18%, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, hsla(220, 15%, 18%, 0.3) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -2;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: hsla(160, 100%, 50%, 0.1);
  top: 20%;
  left: 20%;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: hsla(185, 100%, 50%, 0.1);
  bottom: 20%;
  right: 20%;
  animation-delay: -3s;
}

/* Typography */
.text-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  transition: all 0.3s;
}

.navbar.scrolled {
  background: hsla(220, 20%, 4%, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-text {
  color: var(--text-primary);
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.nav-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.nav-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: var(--glow);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-glow {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: var(--glow);
}

.btn-glow:hover {
  box-shadow: var(--glow-strong);
  transform: translateY(-2px);
}

.btn-cyber {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-cyber:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem 2rem;
  position: relative;
}

.hero-content {
  max-width: 900px;
  animation: slideUp 0.8s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-wrapper {
  --avatar-zoom: 1;
  /* 👈 TWEAK THIS: 1 = full image, 2+ = zoom in */
  --avatar-ring: 4px;
  /* 👈 TWEAK THIS: green ring thickness */
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: var(--avatar-ring) solid var(--accent);
  box-shadow:
    var(--glow),
    0 0 40px hsla(160, 100%, 50%, 0.2);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--avatar-zoom));
  object-position: center;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: hsla(220, 20%, 10%, 0.8);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-name {
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: normal;
}

.hero-handle {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.hero-title {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.hero-tagline {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  min-height: 1.5em;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem 1.25rem;
  background: hsla(220, 20%, 8%, 0.6);
  border: 1px solid hsla(160, 100%, 50%, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    transform 0.25s ease,
    box-shadow 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    hsla(160, 100%, 50%, 0.05) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.stat-card:hover {
  border-color: hsla(160, 100%, 50%, 0.45);
  background: hsla(220, 20%, 11%, 0.75);
  transform: translateY(-3px);
  box-shadow:
    0 8px 28px hsla(160, 100%, 50%, 0.1),
    0 0 0 1px hsla(160, 100%, 50%, 0.18);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  font-size: 1.25rem;
  color: var(--accent);
  opacity: 0.75;
  transition: opacity 0.25s, transform 0.25s;
}

.stat-card:hover .stat-icon {
  opacity: 1;
  transform: scale(1.12);
}

.stat-value {
  display: block;
  font-size: clamp(0.95rem, 2vw, 1.4rem);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  left: 50%;
  margin-left: -13px;
  bottom: 2.75rem;
  z-index: 2;
  display: inline-block;
  text-decoration: none;
  animation: bounce 2s infinite;
  transition: opacity 0.2s ease;
}

.scroll-indicator:hover {
  opacity: 0.9;
}

.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid hsla(160, 100%, 50%, 0.5);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scroll-indicator:hover .scroll-mouse {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 2s infinite;
}

/* Sections */
.section {
  padding: 6rem 1.5rem;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1rem auto 0;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 1.5rem;
  background: hsla(220, 20%, 10%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.skill-card:hover {
  border-color: hsla(160, 100%, 50%, 0.5);
  transform: translateY(-4px);
}

.skill-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.skill-icon {
  width: 48px;
  height: 48px;
  background: hsla(160, 100%, 50%, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.skill-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.skill-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.skill-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1rem;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 3px;
  transition: width 1s ease-out;
}

.skill-level {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 0.5rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  padding: 1.5rem;
  background: hsla(220, 20%, 10%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.project-card:hover {
  border-color: hsla(160, 100%, 50%, 0.5);
  transform: translateY(-4px);
}

.project-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: hsla(160, 100%, 50%, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link:hover {
  text-decoration: underline;
}

.projects-more {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

/* Timeline */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

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

.timeline-date {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.timeline-content {
  padding: 1.25rem;
  background: hsla(220, 20%, 10%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.timeline-content h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-card {
  padding: 2.5rem 2rem;
  background: hsla(220, 20%, 10%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.contact-card > .btn {
  margin-top: 0.5rem;
}

.contact-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.contact-card > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.contact-link {
  display: block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

/* ----------------------------------------
   Social links

   Each row used to be its own centred flex
   line, so the icons, names and handles
   never lined up — they drifted by up to
   23px depending on how long each label was.
   The list now owns the column tracks and
   each row adopts them via subgrid, so all
   three columns align down the whole box.
   ---------------------------------------- */
.social-links {
  display: grid;
  grid-template-columns: auto auto 1fr;
  row-gap: 0.75rem;
  column-gap: 0.75rem;
  width: 100%;
}

.social-link {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  text-align: left;
  transition:
    border-color 0.3s,
    background-color 0.3s;
}

/* Fallback: fixed tracks give the same alignment without subgrid */
@supports not (grid-template-columns: subgrid) {
  .social-links {
    display: flex;
    flex-direction: column;
  }

  .social-link {
    grid-template-columns: 1.35rem 6.5rem 1fr;
    column-gap: 0.75rem;
  }
}

.social-link i {
  justify-self: center;
}

.social-link:hover {
  border-color: hsla(160, 100%, 50%, 0.5);
  background: hsla(220, 20%, 12%, 0.5);
}

.social-handle {
  justify-self: end;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.services-bar {
  padding: 1.5rem;
  background: hsla(220, 20%, 8%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.services-bar > p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.service-tag {
  padding: 0.5rem 1rem;
  border: 1px solid hsla(160, 100%, 50%, 0.3);
  color: var(--accent);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  transition: all 0.3s;
}

.service-tag:hover {
  background: hsla(160, 100%, 50%, 0.1);
}

/* ========================================
   Resume-derived sections
   ======================================== */

/* Hero location line */
.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.hero-location i {
  color: var(--accent);
  margin-right: 0.15rem;
}

/* Technical stack band */
.stack-band {
  margin-top: 2rem;
}

.stack-inner {
  padding: 1.75rem;
  background: hsla(220, 20%, 8%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.stack-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.stack-rows {
  display: grid;
  gap: 0.9rem;
}

.stack-row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  align-items: start;
}

.stack-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-top: 0.2rem;
}

.stack-label i {
  color: var(--accent);
  width: 1rem;
  text-align: center;
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Timeline additions */
.timeline-now {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid hsla(160, 100%, 50%, 0.35);
  border-radius: 50px;
  background: hsla(160, 100%, 50%, 0.08);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-now::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.timeline-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.timeline-bullets li:last-child {
  margin-bottom: 0;
}

.timeline-bullets li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Education card */
.edu-wrap {
  max-width: 800px;
  margin: 2.5rem auto 0;
}

.edu-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: hsla(220, 20%, 10%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}

.edu-card:hover {
  border-color: hsla(160, 100%, 50%, 0.5);
}

.edu-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(160, 100%, 50%, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 1.35rem;
}

.edu-body {
  min-width: 0;
}

.edu-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.edu-top h3 {
  font-size: 1.05rem;
}

.edu-date {
  flex-shrink: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.edu-body h4 {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  margin: 0.25rem 0 0.9rem;
}

.edu-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Achievements */
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.achieve-card {
  position: relative;
  padding: 1.5rem;
  background: hsla(220, 20%, 10%, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.3s,
    transform 0.3s;
}

.achieve-card:hover {
  border-color: hsla(160, 100%, 50%, 0.5);
  transform: translateY(-4px);
}

.achieve-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(160, 100%, 50%, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.achieve-year {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.achieve-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

/* Six nav items need a little more room before the burger takes over */
@media (max-width: 1024px) {
  .nav-links {
    gap: 1.25rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }
}

@media (max-width: 900px) {
  .navbar {
    padding: 0.85rem 1.25rem;
  }

  .scroll-indicator {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: hsla(220, 20%, 5%, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem 1.75rem 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    animation: navSlideDown 0.25s ease-out;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 0.5rem 0;
    width: 100%;
    border-bottom: 1px solid hsla(220, 15%, 18%, 0.4);
  }

  .nav-link:last-of-type {
    border-bottom: none;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.25rem;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .stack-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stack-label {
    padding-top: 0;
  }

  .stack-inner {
    padding: 1.25rem;
  }

  .edu-card {
    flex-direction: column;
    gap: 1rem;
  }

  .achieve-grid {
    grid-template-columns: 1fr;
  }

  .achieve-year {
    top: 1.25rem;
    right: 1.25rem;
  }
}

@media (max-width: 768px) {
  /* Mobile menu handled at 900px */

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }

  .stat-card {
    padding: 1.1rem 0.5rem;
    gap: 0.35rem;
  }

  .hero-name {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    letter-spacing: normal;
    white-space: nowrap;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 1rem;
  }

  /* Grid/flex children default to min-width:auto, so a long unbreakable
     handle like "HackTheBox zahidoverflow" pushes the card past the
     viewport instead of wrapping. */
  .contact-grid,
  .contact-card,
  .social-links,
  .social-link {
    min-width: 0;
  }

  .contact-card {
    padding: 1.5rem 1rem;
  }

  .social-link {
    padding: 0.75rem 0.6rem;
    column-gap: 0.5rem;
  }

  .social-link span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .social-handle {
    font-size: 0.8rem;
  }

  .section {
    padding: 4rem 1rem;
  }

  .hero {
    padding: 5rem 1rem 2rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .services-list {
    flex-direction: column;
  }

  .hero-name {
    font-size: clamp(1rem, 5.5vw, 1.4rem);
    letter-spacing: normal;
    white-space: nowrap;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }

  .stat-card {
    padding: 0.85rem 0.25rem;
  }

  .stat-icon {
    font-size: 0.95rem;
  }

  .stat-value {
    font-size: clamp(0.68rem, 2.5vw, 0.9rem);
    white-space: normal;
    word-break: break-word;
  }

  .stat-label {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
  }
}

/* ========================================
   Floating WhatsApp Button (FAB)
   ======================================== */
.wa-float {
  position: fixed;
  bottom: max(var(--wa-bottom, 24px), env(safe-area-inset-bottom, 24px));
  right: max(24px, env(safe-area-inset-right, 24px));
  z-index: 990;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  cursor: pointer;
  /* Hidden by default until visitor scrolls down */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(22px) scale(0.85);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.wa-float.wa-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  animation: wa-pulse 2.5s ease-in-out infinite;
}

.wa-float.wa-visible:hover {
  transform: scale(1.1) translateY(-3px);
  background: linear-gradient(135deg, #2ae771 0%, #17a090 100%);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.65);
  animation: none;
  color: #ffffff;
}

.wa-float:focus-visible {
  outline: 2px solid var(--accent, #00ff88);
  outline-offset: 4px;
}

.wa-float-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  background: rgba(10, 15, 25, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.wa-float-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: none;
  border-left-color: rgba(10, 15, 25, 0.94);
}

.wa-float:hover .wa-float-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@keyframes wa-pulse {
  0%,
  100% {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 0 12px rgba(37, 211, 102, 0);
  }
}

@media (max-width: 768px) {
  .wa-float {
    width: 52px;
    height: 52px;
    font-size: 1.65rem;
    bottom: max(var(--wa-bottom, 18px), env(safe-area-inset-bottom, 18px));
    right: max(18px, env(safe-area-inset-right, 18px));
  }

  .wa-float-tooltip {
    display: none;
  }
}
