/* ==========================================================================
   Mohamed Alavudeen — 3D Portfolio
   Design system: neon dark (violet / cyan / pink), glassmorphism, 3D transforms
   ========================================================================== */

:root {
  --bg-deep: #0a0a0f;
  --surface: #12121a;
  --card-bg: rgba(26, 26, 46, 0.85);
  --primary: #6c3ce1;
  --secondary: #00d4ff;
  --accent: #ff6b9d;
  --glow: rgba(108, 60, 225, 0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --font-head: "Orbitron", "Space Grotesk", sans-serif;
  --font-body: "Inter", "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --radius: 18px;
  --nav-h: 72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

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

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

/* ---------- Background canvas & fog ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.bg-fog {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34vh;
  background: linear-gradient(
    to top,
    rgba(10, 10, 15, 0.95),
    rgba(108, 60, 225, 0.08) 55%,
    transparent
  );
  z-index: 1;
  pointer-events: none;
}

main,
.footer {
  position: relative;
  z-index: 2;
}

/* ---------- Custom cursor glow ---------- */
.cursor-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(108, 60, 225, 0.14),
    rgba(0, 212, 255, 0.05) 45%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s;
}

/* ---------- Typography helpers ---------- */
.mono {
  font-family: var(--font-mono);
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 32px 60px;
}
.section-head {
  margin-bottom: 56px;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--secondary);
  letter-spacing: 2px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 700;
  margin-top: 10px;
  background: linear-gradient(90deg, #fff 30%, var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub {
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 560px;
}

/* ---------- Glass card base ---------- */
.glass-card {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Tag rows ---------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-row span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(108, 60, 225, 0.12);
  border: 1px solid rgba(108, 60, 225, 0.35);
  transition: all 0.25s ease;
}
.tag-row span:hover {
  color: #fff;
  border-color: var(--secondary);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
  transform: translateY(-2px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  will-change: transform;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  box-shadow: 0 6px 24px rgba(108, 60, 225, 0.4);
}
.btn-primary:hover {
  box-shadow:
    0 10px 34px rgba(108, 60, 225, 0.65),
    0 0 20px rgba(0, 212, 255, 0.25);
}
.btn-ghost {
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.3);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s;
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex;
  gap: 30px;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}
.nav-links a:hover {
  color: #fff;
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) 32px 60px;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 150, 0.25);
  background: rgba(0, 255, 150, 0.06);
  margin-bottom: 16px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22e584;
  box-shadow: 0 0 0 0 rgba(34, 229, 132, 0.6);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 229, 132, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(34, 229, 132, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 229, 132, 0);
  }
}

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.5px;
  margin: 4px 0 8px;
  padding: 0;

  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-name-glow {
  width: 100%;
  max-width: 900px;
  margin: 0;
  padding: 0;
  text-align: left;
}
.hero-name .word {
  display: inline-block;
  white-space: nowrap;
}
.hero-name .char {
  display: inline-block;
}

.hero-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 18px;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--secondary);
  margin-top: 16px;
  min-height: 1.8em;
}
.role-prefix {
  color: var(--text-secondary);
}
.type-caret {
  animation: caret-blink 0.9s steps(1) infinite;
  color: var(--accent);
}
@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin-top: 22px;
  font-size: 1rem;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-support {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 1px;
}

.hero-tech-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hero-tech-labels span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  animation: float-label 4s ease-in-out infinite;
}
.hero-tech-labels span:nth-child(2n) {
  animation-delay: -1.3s;
}
.hero-tech-labels span:nth-child(3n) {
  animation-delay: -2.6s;
}
@keyframes float-label {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

/* ---------- Profile image ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 900px;
}
.hero-image {
  position: relative;
  width: 320px;
  height: 320px;
  transform-style: preserve-3d;
  animation: hero-bob 3s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hero-bob {
  from {
    translate: 0 -10px;
  }
  to {
    translate: 0 10px;
  }
}
.hero-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(108, 60, 225, 0.6);
  box-shadow: 0 0 40px rgba(108, 60, 225, 0.5);
  animation: glow-pulse 3.2s ease-in-out infinite;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.hero-image:hover img {
  transform: scale(1.03);
  box-shadow:
    0 0 60px rgba(108, 60, 225, 0.8),
    0 0 24px rgba(0, 212, 255, 0.4);
}
@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 24px rgba(108, 60, 225, 0.4);
  }
  50% {
    box-shadow: 0 0 48px rgba(108, 60, 225, 0.65);
  }
}
.glow-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 212, 255, 0.35);
  animation: spin 22s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Orbiting dots ring */
.orbit-ring {
  position: absolute;
  inset: -30px;
  animation: spin 14s linear infinite;
}
.orbit-ring i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
}
.orbit-ring i:nth-child(1) {
  transform: rotate(0deg) translateX(190px);
}
.orbit-ring i:nth-child(2) {
  transform: rotate(45deg) translateX(190px);
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.orbit-ring i:nth-child(3) {
  transform: rotate(90deg) translateX(190px);
}
.orbit-ring i:nth-child(4) {
  transform: rotate(135deg) translateX(190px);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.orbit-ring i:nth-child(5) {
  transform: rotate(180deg) translateX(190px);
}
.orbit-ring i:nth-child(6) {
  transform: rotate(225deg) translateX(190px);
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.orbit-ring i:nth-child(7) {
  transform: rotate(270deg) translateX(190px);
}
.orbit-ring i:nth-child(8) {
  transform: rotate(315deg) translateX(190px);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  position: relative;
}
.scroll-wheel {
  position: absolute;
  top: 8px;
  left: 50%;
  margin-left: -2px;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--secondary);
  animation: wheel 1.6s ease infinite;
}
@keyframes wheel {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid {
  display: grid;
  gap: 40px;
}
.about-paragraph {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 900px;
}
.about-subtitle {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.care-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--primary);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.care-card:nth-child(2) {
  border-left-color: var(--secondary);
}
.care-card:nth-child(3) {
  border-left-color: var(--accent);
}
.care-card:nth-child(4) {
  border-left-color: #8b5cf6;
}
.care-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.45),
    0 0 18px var(--glow);
}
.care-card h4 {
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 8px;
}
.care-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Stats + flip cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.flip-card {
  perspective: 1000px;
}
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}
.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
.flip-front {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(
    150deg,
    rgba(108, 60, 225, 0.3),
    rgba(0, 212, 255, 0.16)
  );
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--text-primary);
  font-size: 0.9rem;
}
.stat-card {
  height: 150px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Quick facts */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.fact {
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fact-wide {
  grid-column: 1 / -1;
}
.fact-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.fact-val {
  font-weight: 500;
  font-size: 0.95rem;
}

/* ==========================================================================
   TECH STACK
   ========================================================================== */
.stack-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.stack-sphere-wrap {
  position: relative;
}
#stack-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 520px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: radial-gradient(
    circle at 50% 45%,
    rgba(108, 60, 225, 0.14),
    rgba(10, 10, 15, 0.4) 70%
  );
  cursor: grab;
  touch-action: pan-y;
}
#stack-canvas:active {
  cursor: grabbing;
}
.stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.stack-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-frontend {
  background: #00d4ff;
  box-shadow: 0 0 8px #00d4ff;
}
.dot-backend {
  background: #6c3ce1;
  box-shadow: 0 0 8px #6c3ce1;
}
.dot-db {
  background: #22e584;
  box-shadow: 0 0 8px #22e584;
}
.dot-security {
  background: #ff6b9d;
  box-shadow: 0 0 8px #ff6b9d;
}
.dot-tools {
  background: #ffb347;
  box-shadow: 0 0 8px #ffb347;
}

.stack-groups {
  display: grid;
  gap: 22px;
}
.stack-group h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--secondary);
}

/* ==========================================================================
   EXPERIENCE — timeline
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 40px;
}
.timeline-line {
  position: absolute;
  left: 10px;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  transform-origin: top;
  box-shadow: 0 0 12px rgba(108, 60, 225, 0.6);
}
.timeline-card {
  position: relative;
  padding: 36px;
}
.timeline-dot {
  position: absolute;
  left: -38px;
  top: 44px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow:
    0 0 0 5px rgba(0, 212, 255, 0.2),
    0 0 18px var(--secondary);
}
.job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.job-head h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}
.job-company {
  color: var(--secondary);
  font-size: 0.95rem;
  font-weight: 500;
}
.job-period {
  color: var(--accent);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 157, 0.35);
  background: rgba(255, 107, 157, 0.08);
  white-space: nowrap;
}
.job-list {
  margin: 22px 0;
  padding-left: 20px;
  color: var(--text-secondary);
}
.job-list li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.job-list li::marker {
  color: var(--secondary);
}
.job-tags span {
  font-size: 0.72rem;
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
  perspective: 1400px;
}
.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transform-style: preserve-3d;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  will-change: transform;
}
.project-card:hover {
  transform: translateY(-10px) translateZ(24px) rotateX(2deg);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(108, 60, 225, 0.35);
}
.project-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .project-thumb {
  transform: scale(1.06);
}
.project-info {
  padding: 22px;
}
.project-cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.project-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  margin: 8px 0 10px;
}
.project-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.project-cta {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.25s ease;
}
.project-card:hover .project-cta {
  transform: translateX(6px);
}

/* ---------- Project modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 6, 12, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  position: relative;
  width: min(920px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 22px;
  background: linear-gradient(165deg, #16162a, #0d0d18);
  border: 1px solid rgba(108, 60, 225, 0.35);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(108, 60, 225, 0.25);
}
.modal-close {
  position: sticky;
  top: 14px;
  margin-left: calc(100% - 58px);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 15, 0.7);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 5;
  transition: all 0.25s;
}
.modal-close:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(255, 107, 157, 0.5);
  transform: rotate(90deg);
}
.modal-media {
  margin-top: -56px;
}
.modal-media img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}
.modal-body {
  padding: 32px 40px 44px;
}
.modal-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.modal-body h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin: 10px 0 16px;
}
.modal-body > p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.modal-features {
  padding-left: 20px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.modal-features li {
  margin-bottom: 6px;
}
.modal-features li::marker {
  color: var(--accent);
}
.modal-body .tag-row {
  margin-bottom: 26px;
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.service-card {
  position: relative;
  height: 260px;
}
.service-num {
  position: absolute;
  top: -16px;
  right: 10px;
  font-family: var(--font-head);
  font-size: 3.6rem;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(108, 60, 225, 0.55);
  z-index: 3;
  pointer-events: none;
}
.service-card .flip-front {
  align-items: flex-start;
  text-align: left;
  justify-content: flex-end;
}
.service-card .flip-back {
  align-items: flex-start;
  text-align: left;
}
.service-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.service-card .flip-back h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.service-card .flip-back p {
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   CURRENTLY
   ========================================================================== */
.mindset {
  text-align: center;
  margin-bottom: 56px;
}
.mindset-orbit {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 20px;
  animation: spin 18s linear infinite;
}
.mindset-word {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.2);
  animation: spin-rev 18s linear infinite; /* keep words upright */
}
.mindset-word:nth-child(1) {
  transform: rotate(0deg) translateX(150px);
}
.mindset-word:nth-child(2) {
  transform: rotate(90deg) translateX(150px);
  border-color: rgba(108, 60, 225, 0.5);
}
.mindset-word:nth-child(3) {
  transform: rotate(180deg) translateX(150px);
  border-color: rgba(255, 107, 157, 0.45);
}
.mindset-word:nth-child(4) {
  transform: rotate(270deg) translateX(150px);
  border-color: rgba(139, 92, 246, 0.5);
}
@keyframes spin-rev {
  to {
    rotate: -360deg;
  }
}
/* @media (max-width: 768px) {
  .mindset-orbit {
    animation: none;
    margin: 0px -5px;
  }

  .mindset-word {
    animation: none;
  }
} */

@media (max-width: 768px) {
  .mindset-orbit {
    width: 240px;
    height: 240px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vw - 40px);
  }

  .mindset-word {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

  .mindset-word:nth-child(1) {
    transform: rotate(0deg) translateX(105px);
  }

  .mindset-word:nth-child(2) {
    transform: rotate(90deg) translateX(105px);
  }

  .mindset-word:nth-child(3) {
    transform: rotate(180deg) translateX(105px);
  }

  .mindset-word:nth-child(4) {
    transform: rotate(270deg) translateX(105px);
  }
}
.mindset-quote {
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 2px;
  font-size: 0.95rem;
}

.currently-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.currently-card {
  padding: 28px;
}
.currently-wide {
  grid-column: 1 / -1;
}
.currently-card h3 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--secondary);
  margin-bottom: 12px;
  font-size: 1.05rem;
}
.currently-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-cloud span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(108, 60, 225, 0.35),
    rgba(0, 212, 255, 0.18)
  );
  border: 1px solid rgba(108, 60, 225, 0.4);
  animation: float-label 4.5s ease-in-out infinite;
}
.tag-cloud span:nth-child(2n) {
  animation-delay: -1.5s;
}
.tag-cloud span:nth-child(3n) {
  animation-delay: -3s;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  text-align: center;
}
.contact-text {
  max-width: 720px;
  margin: 0 auto 48px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  max-width: 900px;
  margin: 0 auto 44px;
}
.contact-card {
  height: 150px;
  text-decoration: none;
  color: inherit;
}
.contact-icon {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  box-shadow: 0 6px 20px rgba(108, 60, 225, 0.4);
  margin-bottom: 12px;
}
.contact-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}
.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  margin-top: 80px;
  padding: 0 32px 40px;
}
.footer-line {
  height: 2px;
  max-width: 1200px;
  margin: 0 auto 44px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary),
    var(--secondary),
    var(--accent),
    transparent
  );
  background-size: 200% 100%;
  animation: line-flow 6s linear infinite;
}
@keyframes line-flow {
  to {
    background-position: 200% 0;
  }
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto 30px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
}
.footer-tagline {
  color: var(--secondary);
  font-size: 0.88rem;
  margin: 6px 0;
}
.footer-msg {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.25s;
}
.footer-nav a:hover {
  color: var(--secondary);
}
.footer-copy {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* ---------- Reveal helper (GSAP sets initial state) ---------- */
.reveal {
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1023px) {
  .stack-layout {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    grid-template-columns: 1fr 0.7fr;
    gap: 28px;
  }
  .cursor-glow {
    display: none;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 90px 20px 40px;
  }
  .nav {
    padding: 0 20px;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    flex-direction: column;
    gap: 0;
    width: min(280px, 80vw);
    background: rgba(12, 12, 20, 0.97);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(20px);
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 44px;
  }
  .nav-burger {
    display: block;
  }
  .nav-burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-burger.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding-top: calc(var(--nav-h) + 24px);
  }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-ctas,
  .hero-tech-labels {
    justify-content: center;
  }
  .hero-visual {
    order: 2;
  }
  .hero-image {
    width: 180px;
    height: 180px;
  }
  .orbit-ring {
    display: none;
  }
  .scroll-hint {
    display: none;
  }

  .timeline {
    padding-left: 30px;
  }
  .timeline-card {
    padding: 24px;
  }
  .timeline-dot {
    left: -28px;
  }
  .service-card {
    height: 300px;
  }
  .currently-grid {
    grid-template-columns: 1fr;
  }
  .modal-body {
    padding: 24px 22px 34px;
  }
  .flip-card:hover .flip-inner {
    transform: none;
  } /* no hover flips on touch */
  .flip-card:active .flip-inner {
    transform: rotateY(180deg);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-contact a {
  position: relative;
  color: #b8b8c7;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.footer-contact a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #6c3ce1;
  transition: width 0.3s ease;
}

.footer-contact a:hover {
  color: #ffffff;
}

.footer-contact a:hover::after {
  width: 100%;
}
