/* ═══════════════════════════════════════════════════════════════════════════
   Alex Kosachov Portfolio — Main Stylesheet
   Design: Maritime Professional · Navy/Ocean · Dark-mode compatible
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
  --navy:        #1B4F8A;
  --navy-dark:   #0D2E54;
  --navy-deep:   #07192E;
  --navy-light:  #2E78C5;
  --ocean:       #0A3D6B;
  --sky:         #4A9FD4;
  --sky-light:   #A8D4EF;
  --white:       #FFFFFF;
  --off-white:   #F4F8FC;
  --text:        #1A2535;
  --text-muted:  #5B6F8A;
  --text-light:  #8EA5BC;
  --border:      #D1E3F0;
  --gold:        #E8B84B;
  --success:     #2ECC71;
  --card-bg:     #FFFFFF;
  --section-alt: #F0F6FC;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;

  --shadow-sm:   0 2px 8px rgba(27,79,138,.08);
  --shadow-md:   0 6px 24px rgba(27,79,138,.12);
  --shadow-lg:   0 12px 48px rgba(27,79,138,.18);
  --shadow-xl:   0 24px 72px rgba(27,79,138,.24);

  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
}

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

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection {
  background: var(--navy);
  color: var(--white);
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--navy-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
  padding: 20px 0;
}

.nav.scrolled {
  background: rgba(7, 25, 46, 0.96);
  backdrop-filter: blur(16px);
  padding: 12px 0;
  box-shadow: 0 2px 24px rgba(0,0,0,.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--sky);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--sky-light);
}

.nav-cta {
  background: var(--sky);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  transition: background var(--transition) !important;
}

.nav-cta:hover {
  background: var(--navy-light) !important;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--ocean) 50%, var(--navy-dark) 100%);
  overflow: hidden;
}

/* Ocean wave SVG background */
.hero-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  opacity: 0.15;
}

/* Grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Glowing orb */
.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(46,120,197,0.2) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 8px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--sky-light);
  font-weight: 500;
  animation: fade-in-up 0.8s ease forwards;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-name {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.0;
  letter-spacing: -2px;
  margin-bottom: 16px;
  animation: fade-in-up 0.8s ease 0.1s both;
}

.hero-name span {
  color: var(--sky);
}

.hero-title {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--sky-light);
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 24px;
  animation: fade-in-up 0.8s ease 0.2s both;
}

.hero-desc {
  font-size: clamp(16px, 1.8vw, 18px);
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 560px;
  animation: fade-in-up 0.8s ease 0.3s both;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  animation: fade-in-up 0.8s ease 0.4s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--sky);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,120,197,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--sky-light);
  border: none;
  padding-left: 0;
  padding-right: 0;
  font-size: 14px;
}

.btn-ghost:hover {
  color: var(--white);
}

/* Hero stats strip */
.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
  animation: fade-in-up 0.8s ease 0.5s both;
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}

/* Hero visual panel */
.hero-visual {
  position: relative;
  animation: fade-in-up 0.8s ease 0.3s both;
}

.hero-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.hero-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero-metric-row:last-child { border-bottom: none; }

.hero-metric-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.hero-metric-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.badge-bv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,184,75,0.15);
  border: 1px solid rgba(232,184,75,0.4);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 16px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  animation: float 2s ease-in-out infinite;
}

.scroll-indicator-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
}

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

/* ─── About / Stats Section ─────────────────────────────────────────────── */
.about {
  padding: 100px 0;
  background: var(--section-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 16px;
}

.about-text p strong {
  color: var(--text);
}

.about-timeline {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 24px;
  position: relative;
}

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

.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(27,79,138,0.15);
}

.timeline-content {
  padding-top: 8px;
}

.timeline-year {
  font-size: 12px;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-unit {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--sky);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.stat-card.highlighted {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-color: transparent;
}

.stat-card.highlighted .stat-number {
  color: var(--white);
}

.stat-card.highlighted .stat-unit {
  color: var(--sky-light);
}

.stat-card.highlighted .stat-label {
  color: rgba(255,255,255,0.7);
}

/* ─── Platform Diagram ───────────────────────────────────────────────────── */
.platform {
  padding: 100px 0;
  background: var(--white);
}

.platform-header {
  text-align: center;
  margin-bottom: 64px;
}

.diagram-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.diagram-container {
  position: relative;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--ocean) 100%);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  overflow: hidden;
}

.diagram-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

#platform-svg {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

/* Product tooltip */
.diagram-tooltip {
  position: absolute;
  background: rgba(255,255,255,0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  width: 280px;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.diagram-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.tooltip-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.tooltip-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tooltip-metric {
  background: var(--section-alt);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
}

/* Platform legend */
.platform-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ─── Portfolio Case Studies ─────────────────────────────────────────────── */
.portfolio {
  padding: 100px 0;
  background: var(--section-alt);
}

.portfolio-header {
  text-align: center;
  margin-bottom: 48px;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: var(--transition);
  font-family: var(--font-sans);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.portfolio-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--navy-light);
}

.portfolio-card.hidden {
  display: none;
}

.card-header {
  padding: 24px 24px 16px;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  position: relative;
  overflow: hidden;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 8px;
}

.card-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
}

.card-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.card-body {
  padding: 20px 24px;
  flex: 1;
}

.card-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.card-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.card-metric-label {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.card-metric-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
  max-width: 55%;
}

.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tech-tag {
  background: var(--section-alt);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
}

.card-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-year {
  font-size: 12px;
  color: var(--text-light);
}

.card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--sky);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}

.portfolio-card:hover .card-cta {
  gap: 8px;
}

/* Status badges */
.card-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-active {
  background: rgba(46,204,113,0.15);
  color: #27AE60;
  border: 1px solid rgba(46,204,113,0.3);
}

.status-succeeded {
  background: rgba(74,159,212,0.15);
  color: var(--sky);
  border: 1px solid rgba(74,159,212,0.3);
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,25,46,0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  padding: 40px 48px 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.modal-close:hover {
  background: rgba(255,255,255,0.2);
}

.modal-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
}

.modal-body {
  padding: 40px 48px;
}

.modal-section {
  margin-bottom: 32px;
}

.modal-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--section-alt);
}

.modal-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-metric {
  background: var(--section-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.modal-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.modal-metric-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.modal-arch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arch-item {
  padding: 16px;
  background: var(--section-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--navy);
}

.arch-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.arch-item-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-tech-tag {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}

.modal-role-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ─── Technical Skills ───────────────────────────────────────────────────── */
.skills {
  padding: 100px 0;
  background: var(--white);
}

.skills-header {
  text-align: center;
  margin-bottom: 64px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.skill-category {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: var(--transition);
}

.skill-category:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--sky);
  transform: translateY(-2px);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.skill-cat-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  background: var(--section-alt);
  border-radius: var(--radius-sm);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--navy);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.skill-tag:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.skill-tag.highlight {
  background: rgba(27,79,138,0.08);
  border-color: rgba(27,79,138,0.25);
  font-weight: 700;
}

/* ─── Highlights / Callouts ──────────────────────────────────────────────── */
.highlights {
  padding: 100px 0;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--ocean) 100%);
  overflow: hidden;
  position: relative;
}

.highlights::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.highlights-header {
  text-align: center;
  margin-bottom: 64px;
}

.highlights-header .section-title {
  color: var(--white);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 2;
}

.highlight-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  transition: var(--transition);
}

.highlight-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
}

.highlight-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.highlight-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.highlight-text {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
}

.highlight-stat {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 24px;
  font-weight: 900;
  color: var(--sky-light);
}

/* ─── Contact ────────────────────────────────────────────────────────────── */
.contact {
  padding: 100px 0;
  background: var(--section-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-availability {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-md);
  padding: 28px;
  color: var(--white);
}

.contact-avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--sky-light);
}

.contact-avail-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.contact-avail-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.contact-avail-text {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.contact-link:hover {
  border-color: var(--sky);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.contact-link-icon {
  font-size: 20px;
  width: 36px;
  text-align: center;
}

.contact-link-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-link-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

/* Contact form side */
.contact-form-panel h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.contact-form-panel p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.role-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: var(--transition);
}

.role-card:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.role-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.role-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--navy-deep);
  padding: 40px 0;
  color: rgba(255,255,255,0.5);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
}

.footer-brand span { color: var(--sky); }

.footer-text {
  font-size: 13px;
  text-align: center;
}

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

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

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

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 100px;
  }

  .hero-visual { max-width: 480px; }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7,25,46,0.98);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }

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

  .nav-mobile-toggle {
    display: flex;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

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

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

  .modal-header { padding: 32px 24px 24px; }
  .modal-body { padding: 24px; }

  .modal-metrics-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-name { letter-spacing: -1px; }
  .hero-ctas { flex-direction: column; }
  .btn { justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 3px; }

/* ─── Wave SVG animation ────────────────────────────────────────────────── */
.wave-path {
  animation: wave-move 8s ease-in-out infinite;
  transform-origin: center bottom;
}

.wave-path-2 {
  animation: wave-move 10s ease-in-out infinite reverse;
  transform-origin: center bottom;
  opacity: 0.6;
}

@keyframes wave-move {
  0%, 100% { d: path("M0,40 C200,0 400,80 600,40 C800,0 1000,60 1200,40 L1200,100 L0,100 Z"); }
  50% { d: path("M0,60 C200,80 400,20 600,60 C800,100 1000,30 1200,60 L1200,100 L0,100 Z"); }
}

/* Connection line animation */
.conn-line {
  stroke-dasharray: 8 4;
  animation: dash-move 2s linear infinite;
}

@keyframes dash-move {
  to { stroke-dashoffset: -36; }
}
