/* ============================================================
   styles/portfolio.css
   MidManStudio Portfolio — Mid-D-Man
   Theme: Cobalt + Neon Cyan + Glowing Crimson
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Core palette */
  --cobalt:       #0047ab;
  --cobalt-light: #4169e1;
  --cobalt-deep:  #002d6e;
  --cobalt-faint: rgba(65, 105, 225, 0.08);

  --cyan-neon:    #00d4ff;
  --cyan-faint:   rgba(0, 212, 255, 0.12);

  --crimson:      #dc143c;
  --crimson-glow: rgba(220, 20, 60, 0.25);
  --crimson-faint:rgba(220, 20, 60, 0.08);

  --gold:         #ffd700;

  /* Backgrounds */
  --bg-base:      #040812;
  --bg-surface:   #070f1f;
  --bg-card:      rgba(7, 15, 31, 0.8);
  --bg-card-hover:rgba(10, 20, 45, 0.9);
  --bg-glass:     rgba(65, 105, 225, 0.06);

  /* Text */
  --text-primary:  #e8edf8;
  --text-secondary:#8fa0c0;
  --text-muted:    #4a5880;
  --text-accent:   var(--cyan-neon);

  /* Borders */
  --border-subtle: rgba(65, 105, 225, 0.18);
  --border-active: rgba(65, 105, 225, 0.5);
  --border-glow:   rgba(0, 212, 255, 0.4);

  /* Typography */
  --font-display: 'Orbitron', monospace;
  --font-body:    'Rajdhani', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --section-gap: clamp(5rem, 10vw, 9rem);
  --container-w: 1180px;
  --container-px: clamp(1.2rem, 5vw, 3rem);

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Effects */
  --glow-cobalt:  0 0 30px rgba(65, 105, 225, 0.35), 0 0 60px rgba(65, 105, 225, 0.15);
  --glow-cyan:    0 0 20px rgba(0, 212, 255, 0.4), 0 0 50px rgba(0, 212, 255, 0.15);
  --glow-crimson: 0 0 20px var(--crimson-glow), 0 0 50px rgba(220, 20, 60, 0.1);
  --card-shadow:  0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 0 var(--border-subtle);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(0, 71, 171, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(0, 71, 171, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(220, 20, 60, 0.04) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.portfolio-app {
  position: relative;
  z-index: 1;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Shared layout ──────────────────────────────────────────── */
.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 2.5rem;
  opacity: 0.7;
}

.label-line {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--cobalt-light);
}

.section-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  color: var(--text-primary);
  margin-bottom: 3.5rem;
}

.section-title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--cobalt-light), var(--cyan-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scroll-reveal animations ────────────────────────────────── */
.reveal,
.reveal-left,
.reveal-right,
.reveal-up {
  opacity: 0;
  transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}

.reveal        { transform: translateY(24px); }
.reveal-left   { transform: translateX(-36px); }
.reveal-right  { transform: translateX(36px); }
.reveal-up     { transform: translateY(40px); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-up.visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays */
.delay-0 { transition-delay: 0s; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-light));
  color: #fff;
  box-shadow: var(--glow-cobalt);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
  background: linear-gradient(135deg, var(--cobalt-light), var(--cyan-neon));
  color: var(--bg-base);
}

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

.btn-ghost:hover {
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

/* ── Navigation ─────────────────────────────────────────────── */
.portfolio-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: all 0.35s var(--ease-smooth);
}

.portfolio-nav.scrolled {
  background: rgba(4, 8, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.8rem 0;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  flex-shrink: 0;
}

/* PNG logo — primary */
.nav-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  transition: filter 0.3s var(--ease-smooth);
}

.nav-logo-link:hover .nav-logo-img {
  filter: drop-shadow(0 0 8px var(--cyan-neon)) brightness(1.1);
}

/* SVG fallback */
.nav-logo-svg {
  flex-shrink: 0;
  transition: filter 0.3s var(--ease-smooth);
}

.nav-logo-link:hover .nav-logo-svg {
  filter: drop-shadow(0 0 8px var(--cyan-neon));
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.nav-logo-studio {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--cobalt-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: 5px;
  transition: color 0.25s, background 0.25s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--cobalt-faint);
}

.nav-cta {
  color: var(--cyan-neon) !important;
  border: 1px solid rgba(0, 212, 255, 0.3);
  padding: 0.45rem 1rem !important;
}

.nav-cta:hover {
  background: var(--cyan-faint) !important;
  border-color: var(--cyan-neon);
  box-shadow: var(--glow-cyan);
}

/* ── Overlay (behind drawer, blocks page interaction) ────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(2, 5, 14, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-smooth);
  cursor: pointer;
}

.nav-overlay.active {
  opacity: 1;
}

/* ── Hamburger — BurgerMenu.razor animation ported ───────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 4px;
  z-index: 1001;
  position: relative;
  /* Fixed height = 3 bars × height + 2 gaps: (6.5 × 3) + (8 × 2) = 35.5px */
  width: 40px;
  height: calc(6.5px * 3 + 8px * 2);
}

.nav-hamburger .bar {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 6.5px;
  border-radius: calc(8px / 2);
  background: var(--text-primary);
  opacity: 1;
  /* Default: animate both position AND rotation sequentially */
  transition-timing-function: cubic-bezier(.5, -0.35, .35, 1.5);
  transition-duration: 0.35s;
  transition-delay: 0.35s, 0s; /* position delayed, rotation instant */
}

/* Resting positions */
.nav-hamburger .bar--top {
  bottom: calc(50% + 13px + 6.5px / 2);
  transition-property: bottom, transform;
  transition-delay: 0.35s, 0s;
}

.nav-hamburger .bar--middle {
  top: calc(50% - 6.5px / 2);
  transition-property: opacity;
  transition-delay: 0.35s;
}

.nav-hamburger .bar--bottom {
  top: calc(50% + 14px / 2);
  transition-property: top, transform;
  transition-delay: 0.35s, 0s;
}

/* Open state — bars collapse to center then rotate */
.nav-hamburger.open .bar--top {
  bottom: calc(50% - 6.5px / 2);
  transform: rotate(135deg);
  transition-delay: 0s, 0.35s; /* position first, THEN rotate */
}

.nav-hamburger.open .bar--middle {
  opacity: 0;
  transition-duration: 0.05s;
  transition-delay: 0.35s;
}

.nav-hamburger.open .bar--bottom {
  top: calc(50% - 6.5px / 2);
  transform: rotate(225deg);
  transition-delay: 0s, 0.35s;
}

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: rgba(4, 8, 20, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-subtle);
  z-index: 999;
  padding-top: 5rem;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease-smooth);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-links {
  list-style: none;
  padding: 1.5rem var(--container-px);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-link {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.25s, padding-left 0.25s;
  letter-spacing: 0.04em;
}

.drawer-link:hover {
  color: var(--text-primary);
  padding-left: 0.9rem;
}

.drawer-cta {
  color: var(--cyan-neon) !important;
  border-bottom-color: rgba(0, 212, 255, 0.2) !important;
  margin-top: 1rem;
}

.drawer-cta:hover {
  color: #fff !important;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 0 6rem;
}

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

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(65, 105, 225, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 105, 225, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  animation: grid-drift 30s linear infinite;
}

@keyframes grid-drift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orb-pulse 8s ease-in-out infinite alternate;
}

.orb-blue {
  width: 600px;
  height: 600px;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(0, 71, 171, 0.35), transparent 70%);
}

.orb-crimson {
  width: 300px;
  height: 300px;
  top: 20%;
  right: 5%;
  background: radial-gradient(circle, rgba(220, 20, 60, 0.2), transparent 70%);
  animation-delay: -4s;
}

@keyframes orb-pulse {
  0%   { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.15) translate(3%, -3%); opacity: 1; }
}

.hero-content {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: slide-in-up 0.7s var(--ease-smooth) 0.3s forwards;
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: var(--glow-crimson);
  flex-shrink: 0;
}

.hero-headline {
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: slide-in-up 0.8s var(--ease-smooth) 0.5s forwards;
}

.hero-name {
  display: block;
  background: linear-gradient(100deg, #e8edf8 30%, var(--cyan-neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  display: block;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-sub-accent {
  color: transparent;
  background: linear-gradient(90deg, var(--cobalt-light), var(--cyan-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.hero-studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cobalt-faint);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: slide-in-up 0.7s var(--ease-smooth) 0.65s forwards;
}

.badge-label {
  color: var(--text-muted);
  text-transform: uppercase;
}

.badge-name {
  color: var(--cobalt-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-description {
  max-width: 560px;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.8rem;
  opacity: 0;
  animation: slide-in-up 0.7s var(--ease-smooth) 0.8s forwards;
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  opacity: 0;
  animation: slide-in-up 0.7s var(--ease-smooth) 0.95s forwards;
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: fade-in 1s ease 1.3s forwards;
}

.scroll-dot-track {
  width: 24px;
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.scroll-dot {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan-neon);
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { top: 5px; opacity: 1; }
  60%       { top: 22px; opacity: 0.3; }
}

/* Floating tech tags */
.hero-float-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-tag {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  background: rgba(0, 71, 171, 0.12);
  border: 1px solid rgba(65, 105, 225, 0.2);
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  opacity: 0.5;
  animation: float-drift 12s ease-in-out infinite;
}

.tag-1 { top: 18%; right: 8%;  animation-delay: 0s; }
.tag-2 { top: 35%; right: 5%;  animation-delay: 1.5s; }
.tag-3 { top: 55%; right: 12%; animation-delay: 3s; }
.tag-4 { top: 70%; right: 7%;  animation-delay: 4.5s; }
.tag-5 { top: 25%; right: 20%; animation-delay: 2s; }
.tag-6 { top: 80%; right: 18%; animation-delay: 5s; }

@keyframes float-drift {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ── About ──────────────────────────────────────────────────── */
.about-section {
  background: linear-gradient(180deg, transparent, rgba(0, 71, 171, 0.04), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.about-text .section-title {
  margin-bottom: 1.8rem;
}

.about-para {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.about-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.detail-icon {
  font-size: 1rem;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: border-color 0.3s;
}

.stat-card:hover {
  border-color: var(--border-active);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--cobalt-light), var(--cyan-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Skills */
.skills-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 1.2rem;
}

.skills-grid {
  display: grid;
  gap: 0.85rem;
}

.skill-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s;
}

.skill-pill:hover {
  border-color: var(--border-active);
}

.skill-pill-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cobalt-light);
}

.skill-bar-track {
  height: 3px;
  background: rgba(65, 105, 225, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cobalt), var(--cyan-neon));
  border-radius: 2px;
  transition: width 1s var(--ease-smooth) 0.3s;
  box-shadow: 0 0 6px var(--cyan-neon);
}

/* ── Services ───────────────────────────────────────────────── */
.services-section {
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s var(--ease-smooth), box-shadow 0.35s;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, transparent, var(--cobalt-light), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
  box-shadow: var(--card-shadow), var(--glow-cobalt);
}

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

.service-card--crimson:hover { border-color: rgba(220, 20, 60, 0.4); box-shadow: var(--card-shadow), var(--glow-crimson); }
.service-card--crimson:hover::before { background: linear-gradient(90deg, transparent, var(--crimson), transparent); }

.service-card--cyan:hover { border-color: var(--border-glow); box-shadow: var(--card-shadow), var(--glow-cyan); }
.service-card--cyan:hover::before { background: linear-gradient(90deg, transparent, var(--cyan-neon), transparent); }

.service-card--gold:hover { border-color: rgba(255, 215, 0, 0.3); }
.service-card--gold:hover::before { background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ── SVG Icon System ─────────────────────────────────────────── */
.detail-icon-svg {
  width: 16px; height: 16px;
  display: block; flex-shrink: 0;
  color: var(--cobalt-light);
}

.service-icon-svg   { width: 28px; height: 28px; display: block; color: currentColor; }
.contact-email-icon-svg { width: 18px; height: 18px; display: block; color: var(--cyan-neon); }
.social-icon-svg    { width: 18px; height: 18px; display: block; color: var(--cobalt-light); transition: color 0.25s; }
.success-icon-svg   { width: 26px; height: 26px; display: block; color: var(--cyan-neon); }

.social-link:hover .social-icon-svg { color: var(--text-primary); }

/* Service icon wrapper — replaces emoji */
.service-icon-wrap {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cobalt-faint);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 1.2rem;
  color: var(--cobalt-light);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.service-card:hover .service-icon-wrap {
  background: rgba(65,105,225,0.15);
  border-color: var(--border-active);
  color: var(--cyan-neon);
}
.service-card--crimson:hover .service-icon-wrap {
  background: var(--crimson-faint);
  border-color: rgba(220,20,60,0.3);
  color: var(--crimson);
}
.service-card--gold:hover .service-icon-wrap {
  background: rgba(255,215,0,0.08);
  border-color: rgba(255,215,0,0.25);
  color: var(--gold);
}

/* Social icon wrapper */
.social-icon-wrap {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--cobalt-faint);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  transition: background 0.3s, border-color 0.3s;
}
.social-link:hover .social-icon-wrap {
  background: rgba(65,105,225,0.15);
  border-color: var(--border-active);
}

/* Contact email row */
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* Form success icon */
.success-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--cobalt-faint);
  border: 2px solid var(--cobalt-light);
  box-shadow: var(--glow-cyan);
  animation: pop-in 0.5s var(--ease-spring);
}

.service-tagline {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 0.5rem;
}

.service-title {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.service-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--cobalt-light);
  background: var(--cobalt-faint);
  border: 1px solid rgba(65, 105, 225, 0.2);
  border-radius: 3px;
  padding: 0.2rem 0.55rem;
}

/* ── Projects ───────────────────────────────────────────────── */
.projects-section {
  background: linear-gradient(180deg, transparent, rgba(0, 71, 171, 0.04), transparent);
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: border-color 0.35s, transform 0.35s var(--ease-smooth), box-shadow 0.35s;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--card-shadow), var(--glow-cobalt);
}

.project-card--featured {
  border-color: rgba(65, 105, 225, 0.3);
}

.project-card--featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cobalt-light), var(--cyan-neon), var(--cobalt-light));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  background: var(--cobalt-faint);
  border: 1px solid rgba(65, 105, 225, 0.2);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
}

/* Status badges */
.project-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
}

.badge--featured {
  color: var(--cyan-neon);
  background: var(--cyan-faint);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge--progress {
  color: #f0a500;
  background: rgba(240, 165, 0, 0.08);
  border: 1px solid rgba(240, 165, 0, 0.3);
  animation: badge-pulse 2.5s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* In-progress card accent */
.project-card--progress {
  border-color: rgba(240, 165, 0, 0.2);
}

.project-card--progress::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f0a500, transparent);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

/* Legend */
.projects-legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-featured { background: var(--cyan-neon); box-shadow: 0 0 5px var(--cyan-neon); }
.dot-progress { background: #f0a500;          box-shadow: 0 0 5px #f0a500; }
.dot-done     { background: var(--text-muted); }

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  transition: all 0.25s;
  flex-shrink: 0;
}

.project-link-btn:hover {
  color: var(--cyan-neon);
  border-color: var(--border-glow);
  box-shadow: var(--glow-cyan);
}

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

.project-body {
  flex: 1;
}

.project-title {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.project-subtitle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--cobalt-light);
  margin-bottom: 0.9rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.project-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 0.18rem 0.5rem;
}

.projects-more {
  text-align: center;
}

/* ── Contact ────────────────────────────────────────────────── */
.contact-section {
  position: relative;
}

.contact-section .section-title {
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.contact-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-direct {
  margin-bottom: 2.5rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--cyan-neon);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  padding-bottom: 0.3rem;
  transition: all 0.25s;
}

.contact-email:hover {
  color: #fff;
  border-color: var(--cyan-neon);
}

.contact-email-icon {
  font-size: 1.1rem;
}

.socials-heading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.socials-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.3s var(--ease-smooth);
}

.social-link:hover {
  border-color: var(--border-active);
  background: var(--cobalt-faint);
  transform: translateX(4px);
}

.social-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.social-handle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.social-arrow {
  color: var(--cobalt-light);
  font-size: 0.9rem;
  transition: transform 0.25s, color 0.25s;
}

.social-link:hover .social-arrow {
  transform: translate(3px, -3px);
  color: var(--cyan-neon);
}

/* Contact Form */
.contact-form-wrap {
  position: sticky;
  top: 100px;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.35s;
}

.contact-form:focus-within {
  border-color: var(--border-active);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-input,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--cobalt-light);
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.12);
}

.form-submit {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-light));
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: var(--glow-cobalt);
}

.form-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--cobalt-light), var(--cyan-neon));
  color: var(--bg-base);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-submit--loading {
  opacity: 0.7;
}

.form-success-msg {
  text-align: center;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.form-success-msg p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@keyframes pop-in {
  0%   { transform: scale(0); }
  80%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
}

.footer-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

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

.footer-sep {
  color: var(--text-muted);
}

.footer-studio {
  color: var(--cobalt-light);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-built {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.footer-crimson {
  color: var(--crimson);
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes slide-in-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Media Queries ──────────────────────────────────────────── */

/* ≥ 1200px: Wide desktops — default styles handle this well */

/* < 1024px: Tablets landscape */
@media (max-width: 1023px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

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

  .hero-float-tags {
    display: none;
  }

  .contact-form-wrap {
    position: static;
  }
}

/* < 768px: Tablets portrait + large phones */
@media (max-width: 767px) {
  :root {
    --section-gap: clamp(3.5rem, 8vw, 6rem);
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-drawer {
    display: block;
  }

  /* Overlay only shown on mobile where drawer exists */
  .nav-overlay {
    display: block;
    pointer-events: none;
  }

  .nav-overlay.active {
    pointer-events: all;
  }

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

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

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

/* < 480px: Small phones */
@media (max-width: 479px) {
  .hero-cta-row {
    flex-direction: column;
  }

  .hero-cta-row .btn {
    width: 100%;
    justify-content: center;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 0.9rem 1.2rem;
  }

  .stat-number {
    font-size: 1.4rem;
    flex-shrink: 0;
  }

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

  .service-card {
    padding: 1.5rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal, .reveal-left, .reveal-right, .reveal-up {
    opacity: 1;
    transform: none;
  }
}
