p { text-wrap: pretty; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');


/* --- CUSTOM VARIABLES & THEMING --- */
:root {
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Default theme is Cosmic Space Dark */
  --bg-primary: #000000;
  --bg-secondary: #030305;
  --bg-tertiary: #060609;

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  /* Space Cyan to Space Cobalt gradients */
  --accent: #00d2ff;
  --accent-hover: #0072ff;
  --accent-glow: rgba(0, 210, 255, 0.15);
  --accent-secondary: #8a2be2;

  /* Multiverse Portal Glow Accent */
  --portals-accent: #39ff14;
  --portals-accent-glow: rgba(57, 255, 20, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shadow: rgba(0, 0, 0, 0.85);

  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;

  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-elastic: all 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* --- LIGHT THEME (HIGH CONTRAST PREMIUM MINIMALIST) --- */
[data-theme="light"] {
  --bg-primary: #f9fafb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f3f4f6;

  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --accent: #0072ff;
  --accent-hover: #0056b3;
  --accent-glow: rgba(0, 114, 255, 0.05);

  --accent-secondary: #00d2ff;

  /* Portal Accent Light */
  --portals-accent: #09a009;
  --portals-accent-glow: rgba(9, 160, 9, 0.08);

  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-shadow: rgba(0, 0, 0, 0.02);
}

/* --- DARK THEME OVERRIDE (synced with default variables) --- */
[data-theme="dark"] {
  --bg-primary: #080a21;
  --bg-secondary: #0b0e2c;
  --bg-tertiary: #151b4f;

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #8492a6;

  --accent: #00d2ff;
  --accent-hover: #0072ff;
  --accent-glow: rgba(0, 210, 255, 0.2);
  --accent-secondary: #8a2be2;

  /* Multiverse Portal Glow Accent */
  --portals-accent: #39ff14;
  --portals-accent-glow: rgba(57, 255, 20, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.125);
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-shadow: rgba(0, 0, 0, 0.65);
}

/* --- DARK THEME CARD CONTRAST OVERRIDES --- */
[data-theme="dark"] .service-minimal-card,
[data-theme="dark"] .fluid-glass-card,
[data-theme="dark"] .glass-card {
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --glass-bg: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-shadow: rgba(0, 0, 0, 0.12);
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 40px var(--glass-shadow);
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* Ensure headings have correct color inside cards */
[data-theme="dark"] .service-minimal-card h1,
[data-theme="dark"] .service-minimal-card h2,
[data-theme="dark"] .service-minimal-card h3,
[data-theme="dark"] .service-minimal-card h4,
[data-theme="dark"] .fluid-glass-card h1,
[data-theme="dark"] .fluid-glass-card h2,
[data-theme="dark"] .fluid-glass-card h3,
[data-theme="dark"] .fluid-glass-card h4,
[data-theme="dark"] .glass-card h1,
[data-theme="dark"] .glass-card h2,
[data-theme="dark"] .glass-card h3,
[data-theme="dark"] .glass-card h4 {
  color: #0f172a !important;
}

/* Ensure svgs inside buttons/cards inherit the correct theme color */
[data-theme="dark"] .service-minimal-card svg,
[data-theme="dark"] .fluid-glass-card svg,
[data-theme="dark"] .glass-card svg {
  fill: currentColor;
}

/* Specific styling for primary and secondary buttons within light bento cards */
[data-theme="dark"] .service-minimal-card .btn-primary,
[data-theme="dark"] .fluid-glass-card .btn-primary,
[data-theme="dark"] .glass-card .btn-primary {
  background: #0f172a !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}
[data-theme="dark"] .service-minimal-card .btn-primary:hover,
[data-theme="dark"] .fluid-glass-card .btn-primary:hover,
[data-theme="dark"] .glass-card .btn-primary:hover {
  background: #1e293b !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}
[data-theme="dark"] .service-minimal-card .btn-secondary,
[data-theme="dark"] .fluid-glass-card .btn-secondary,
[data-theme="dark"] .glass-card .btn-secondary {
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #334155 !important;
}
[data-theme="dark"] .service-minimal-card .btn-secondary:hover,
[data-theme="dark"] .fluid-glass-card .btn-secondary:hover,
[data-theme="dark"] .glass-card .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
  transform: translateY(-2px);
}

/* Activity feed log item */
[data-theme="dark"] .activity-item {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

/* Badge styles inside cards */
[data-theme="dark"] .service-minimal-card .badge,
[data-theme="dark"] .fluid-glass-card .badge,
[data-theme="dark"] .glass-card .badge {
  background: rgba(0, 210, 255, 0.08) !important;
  color: #0077aa !important;
}

/* --- RESET & BASIC STYLES --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: #080a21 !important;
  background-image: linear-gradient(to bottom, #131742 0%, #0d1030 50%, #17123d 100%) !important;
  background-attachment: fixed !important;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
video,
canvas {
  max-width: 100%;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}

p, .service-card-text, .services-section-desc, .timeline-item p {
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.62;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* --- GLOBAL FOOTER --- */
footer {
  padding: clamp(3rem, 7vw, 5rem) 0 2rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 210, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(8, 10, 33, 0.96) 0%, rgba(4, 6, 24, 0.98) 100%) !important;
}

footer .container {
  max-width: 1180px;
}

footer .grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(150px, 0.65fr) minmax(260px, 0.9fr) !important;
  gap: clamp(2rem, 5vw, 4rem) !important;
  align-items: start;
  margin-bottom: 2.5rem !important;
  text-align: left !important;
}

footer .grid > div {
  min-width: 0;
}

footer h4 {
  color: var(--text-primary) !important;
  font-size: 1rem !important;
  margin-bottom: 1rem !important;
  letter-spacing: 0;
}

footer h4:first-child {
  color: var(--accent) !important;
}

footer p {
  max-width: 420px !important;
  color: var(--text-secondary) !important;
  font-size: 0.92rem !important;
  line-height: 1.7 !important;
  text-align: left !important;
  margin-bottom: 0 !important;
}

footer ul {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.45rem !important;
  font-size: 0.92rem !important;
}

footer li {
  min-width: 0;
}

footer a {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
}

footer a:hover {
  color: var(--accent) !important;
}

footer .footer-logo {
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px;
}

footer .btn.btn-secondary {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

footer .btn.btn-secondary:hover {
  background: rgba(0, 210, 255, 0.12) !important;
  border-color: rgba(0, 210, 255, 0.36) !important;
  transform: translateY(-1px);
}

footer .grid + div {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  gap: 1rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-top: 1.5rem !important;
  color: var(--text-muted) !important;
  font-size: 0.84rem !important;
}

footer .container > p:only-child {
  max-width: none !important;
  text-align: center !important;
}

@media (max-width: 900px) {
  footer .grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr) !important;
  }

  footer .grid > div:first-child {
    grid-column: 1 / -1;
  }

  footer p {
    max-width: 640px !important;
  }
}

@media (max-width: 640px) {
  footer {
    padding: 2.5rem 0 1.5rem !important;
  }

  footer .container {
    padding-inline: 1.25rem !important;
  }

  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 1.9rem !important;
    margin-bottom: 2rem !important;
  }

  footer h4 {
    margin-bottom: 0.75rem !important;
  }

  footer ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.35rem 1rem !important;
  }

  footer p {
    max-width: none !important;
    font-size: 0.9rem !important;
  }

  footer .grid + div {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 1.25rem !important;
    font-size: 0.8rem !important;
  }
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border: 2px solid var(--bg-primary);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* --- REUSABLE UTILITIES & LAYOUTS --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--accent) 60%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px hsla(var(--accent-hue), var(--accent-saturation), 60%, 0.3);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 2rem;
  box-shadow: 0 8px 32px var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: hsla(var(--accent-hue), var(--accent-saturation), 60%, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* --- HEADER & NAVIGATION --- */
body > header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(6, 10, 19, 0.6) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}
header .site-logo {
  color: #ffffff !important;
}
header .site-logo span {
  color: var(--accent) !important;
}
header .nav-links a {
  color: #e2e8f0 !important;
  opacity: 0.8;
}
header .nav-links a:hover {
  color: var(--accent) !important;
  opacity: 1;
}
header .nav-actions svg {
  fill: #ffffff !important;
  opacity: 0.8;
}
header .nav-actions a:hover svg {
  fill: var(--accent) !important;
  opacity: 1;
}
header .nav-actions .btn {
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
header .nav-actions .btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--accent) !important;
}
header .mobile-menu-toggle span {
  background: #ffffff !important;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* --- PREMIUM GLOWING TEXT LOGO --- */
.site-logo {
  font-family: var(--font-display);
  font-size: 1.52rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  transition: var(--transition-smooth);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.site-logo > span {
  white-space: nowrap;
}

.site-logo-accent {
  color: var(--accent);
  font-weight: 700;
  transition: var(--transition-smooth);
}

.site-logo:hover {
  text-shadow: 0 0 12px var(--accent-glow), 0 0 24px var(--accent-glow);
}

.site-logo:hover .site-logo-accent {
  color: #fff;
  text-shadow: 0 0 12px var(--accent), 0 0 20px var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--accent);
}

/* --- SECTIONS --- */
section {
  padding: 8rem 0 4rem;
  position: relative;
}

/* Background Gradients */
.glow-effect {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 1s ease forwards;
}

/* --- TOOL SPECIFIC STYLES --- */
.tool-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.input-field {
  width: 100%;
  padding: 0.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}

.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Password Strength Bar */
.pwd-meter-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.pwd-meter-bar {
  height: 100%;
  width: 0%;
  transition: width 0.4s ease-in-out, background-color 0.4s ease-in-out;
}

/* Google SEO Snippet Simulator */
.seo-preview-card {
  background: #ffffff;
  color: #1a0dab;
  border-radius: 8px;
  padding: 1.2rem;
  font-family: Arial, sans-serif;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-top: 1rem;
}

.seo-preview-url {
  color: #202124;
  font-size: 12px;
  margin-bottom: 4px;
  word-break: break-all;
}

.seo-preview-title-text {
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 4px;
  font-weight: normal;
  color: #1a0dab;
  cursor: pointer;
  word-break: break-word;
}

.seo-preview-title-text:hover {
  text-decoration: underline;
}

.seo-preview-desc-text {
  color: #4d5156;
  font-size: 14px;
  line-height: 1.58;
  word-break: break-word;
}

/* HSL Sliders & Swatches */
.hsl-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hsl-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-secondary);
}

.palette-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-top: 1rem;
}

.swatch {
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.5rem;
  color: #fff;
  font-size: 0.65rem;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  border: 1px solid var(--glass-border);
}

.swatch-label {
  pointer-events: none;
}

.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  padding: 0.8rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--accent-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  margin-top: 1rem;
}

/* --- MULTILANGUAGE SWITCHER --- */
html.lang-en .lang-it { display: none !important; }
html.lang-it .lang-en { display: none !important; }

/* --- PRIVACY & COOKIE BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: 90%;
  max-width: 600px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px var(--glass-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-smooth);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* --- ABOUT PAGE & CV TIMELINE --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  width: 2px;
  background: var(--glass-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 45px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.timeline-org {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.cv-image-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 3rem 0;
}

.cv-image {
  max-width: 100%;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--glass-shadow);
  transition: var(--transition-smooth);
}

.cv-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* --- PAGE OVERRIDES (MULTI-STYLE DESIGN) --- */

/* 1. SERVICES PAGE: Reverted to Homepage design, no overrides needed */


/* 2. TOOLS PAGE: Warm Ivory & Sand Theme (Minimalist) */
/* --- PAGE OVERRIDES (COHESIVE GRID THEME) --- */

/* 1. SERVICES PAGE: Reverted to Homepage design, no overrides needed */


/* 2. TOOLS PAGE */
body.tools-page .glass-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.tools-page .glass-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 30px var(--glass-shadow), 0 0 15px var(--accent-glow);
}

body.tools-page .input-field {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
}

/* 3. CONTACT PAGE */
body.contact-page .glass-card {
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

body.contact-page .glass-card:hover {
  border-color: var(--accent);
  box-shadow: 0 15px 45px rgba(6, 182, 212, 0.2);
}

/* Floating Blobs for Contact Page */
.blob-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 380px;
  height: 380px;
  background: var(--accent);
  top: 15%;
  left: 10%;
}

.blob-2 {
  width: 480px;
  height: 480px;
  background: #a18cd1;
  bottom: 15%;
  right: 10%;
  animation-duration: 25s;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(70px, 40px) scale(1.15); }
}

/* --- SLIDER SHOWCASE STYLES --- */
.slider-container {
  position: relative;
  overflow: hidden;
}
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 2;
}
.slider-btn {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: var(--transition-smooth);
}
.slider-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.1);
}
.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.indicator.active {
  width: 25px;
  border-radius: 5px;
  background: var(--accent);
}
@media (max-width: 768px) {
  .slide {
    flex-direction: column;
    padding: 2rem 1.5rem !important;
    text-align: center;
    justify-content: center;
    height: auto;
  }
  .slider-container {
    height: auto !important;
    min-height: 520px;
  }
  .slide .slide-visual {
    margin-top: 1.5rem;
    transform: scale(0.85);
  }
}

/* --- NARRATIVE SECTIONS STYLES --- */

/* --- HERO SECTION --- */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #070714 0%, #000000 80%);
  padding: 8rem 0 5rem;
  overflow: hidden;
}

#hero-stars-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.hero-badge {
  background: rgba(0, 210, 255, 0.1);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.2);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-family: var(--font-body);
}

.hero-ctas {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700;
  border: 1px solid #ffffff !important;
  padding: 0.9rem 2rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}

.btn-hero-primary:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

.btn-hero-secondary {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  padding: 0.9rem 2rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: #ffffff !important;
  transform: translateY(-2px);
}

/* --- PORTFOLIO AURORA BACKGROUND --- */
.fluid-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  z-index: 1;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 210, 255, 0.6) 0%, transparent 40%),
    radial-gradient(circle at 80% 40%, rgba(138, 43, 226, 0.65) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(255, 0, 128, 0.55) 0%, transparent 50%),
    #000000;
  filter: blur(80px);
  animation: fluidGlow 25s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes fluidGlow {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(-45%, -55%) rotate(180deg) scale(1.15);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
  }
}

.portfolio-section {
  position: relative;
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: #000;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-container {
  position: relative;
  z-index: 2;
  max-width: 1440px;
}

.portfolio-heading {
  max-width: 960px;
  margin: 0 auto clamp(2.25rem, 4vw, 3.5rem);
  text-align: center;
}

.portfolio-heading h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: stretch;
}

.portfolio-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(4, 10, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s ease, box-shadow 0.45s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(135, 232, 255, 0.48);
  box-shadow: 0 38px 85px rgba(0, 0, 0, 0.52), 0 0 38px rgba(0, 210, 255, 0.1);
}

.portfolio-preview {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  color: #fff;
  background: #eef1e8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-browser-bar {
  position: relative;
  z-index: 4;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(6, 13, 25, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.portfolio-browser-dots {
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
}

.portfolio-browser-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6258;
}

.portfolio-browser-dots i:nth-child(2) { background: #ffc04a; }
.portfolio-browser-dots i:nth-child(3) { background: #37d17f; }

.portfolio-browser-url {
  min-width: 0;
  flex: 1;
  padding: 0.26rem 0.7rem;
  overflow: hidden;
  color: #8fa2b9;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font: 500 0.67rem var(--font-mono);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-preview > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 477;
  display: block;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.portfolio-card:hover .portfolio-preview > img {
  transform: scale(1.04);
  filter: saturate(1.08);
}

.portfolio-preview-action {
  position: absolute;
  z-index: 5;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  color: #07101f;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  font-size: 0.74rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover .portfolio-preview-action,
.portfolio-preview:focus-visible .portfolio-preview-action {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card-body {
  min-height: 370px;
  padding: clamp(1.35rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.portfolio-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portfolio-index {
  color: #63758a;
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.14em;
}

.portfolio-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.65rem;
  color: #aef7ce;
  background: rgba(50, 205, 127, 0.08);
  border: 1px solid rgba(50, 205, 127, 0.2);
  border-radius: 999px;
  font: 700 0.66rem var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.portfolio-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43df82;
  box-shadow: 0 0 0 4px rgba(67, 223, 130, 0.12);
}

.portfolio-status-build {
  color: #bfeeff;
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.2);
}

.portfolio-status-build i {
  background: #42d7ff;
  box-shadow: 0 0 0 4px rgba(66, 215, 255, 0.12);
}

.portfolio-kicker {
  margin: 0 0 0.5rem;
  color: #65ddf8;
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-card h3 {
  margin: 0 0 0.9rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.portfolio-description {
  margin: 0;
  color: #a9b7c9;
  font-size: 0.96rem;
  line-height: 1.7;
}

.portfolio-tags {
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow: hidden;
  list-style: none;
}

.portfolio-tags li {
  flex: 0 0 auto;
  padding: 0.42rem 0.65rem;
  color: #cbd7e5;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  font: 600 0.68rem var(--font-mono);
  white-space: nowrap;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.6rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}

.portfolio-link:hover {
  gap: 0.85rem;
  color: #7ceaff;
  border-color: #7ceaff;
}

.portfolio-preview-swimmer {
  background: #e6f4f0;
}

.swimmer-preview-scene {
  position: relative;
  height: auto;
  aspect-ratio: 1024 / 477;
  overflow: hidden;
  background:
    linear-gradient(155deg, transparent 0 47%, rgba(255, 255, 255, 0.15) 47.2% 47.5%, transparent 47.7%),
    linear-gradient(135deg, #f4ead0 0 38%, #6fd0c5 38% 62%, #0d3f47 62% 100%);
}

.swimmer-preview-scene::before,
.swimmer-preview-scene::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.swimmer-preview-scene::before {
  width: 330px;
  height: 330px;
  right: -125px;
  top: -160px;
}

.swimmer-preview-scene::after {
  width: 210px;
  height: 210px;
  left: -90px;
  bottom: -125px;
}

.swimmer-preview-copy {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: clamp(18px, 4vw, 34px);
  max-width: 40%;
}

.swimmer-preview-copy span {
  color: #0e5558;
  font: 800 0.62rem var(--font-mono);
  letter-spacing: 0.16em;
}

.swimmer-preview-copy strong {
  display: block;
  margin-top: 0.5rem;
  color: #09363d;
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 2vw, 1.9rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.swimmer-route {
  position: absolute;
  z-index: 2;
  width: min(50%, 300px);
  right: 0;
  top: 26px;
}

.swimmer-route svg { width: 100%; overflow: visible; }

.swimmer-route-shadow,
.swimmer-route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.swimmer-route-shadow {
  stroke: rgba(0, 0, 0, 0.12);
  stroke-width: 9;
}

.swimmer-route-line {
  stroke: #fff;
  stroke-width: 4;
  stroke-dasharray: 8 9;
}

.swimmer-route-label {
  position: absolute;
  right: 24%;
  top: 3%;
  color: #fff;
  font: 800 0.58rem var(--font-mono);
  letter-spacing: 0.14em;
}

.swimmer-route-point {
  position: absolute;
  width: 12px;
  height: 12px;
  left: 49%;
  top: 47%;
  background: #ff755f;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 117, 95, 0.2);
}

.swimmer-live-card {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 4vw, 34px);
  bottom: 14px;
  padding: 0.62rem 0.72rem;
  color: #e9ffff;
  background: rgba(5, 33, 41, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(5, 33, 41, 0.24);
  backdrop-filter: blur(10px);
}

.swimmer-live-card span {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  color: #8be9db;
  font: 800 0.55rem var(--font-mono);
  letter-spacing: 0.12em;
}

.swimmer-live-card span i {
  width: 6px;
  height: 6px;
  background: #49e489;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(73, 228, 137, 0.13);
}

.swimmer-live-card strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
}

.portfolio-preview-sipmu {
  background: #030916;
}

.portfolio-preview > .sipmu-cover-image {
  object-position: center;
}

@media (max-width: 1280px) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-card-sipmu {
    width: calc((100% - clamp(1rem, 2.5vw, 2rem)) / 2);
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-card { width: 100%; max-width: 680px; margin-inline: auto; }
  .portfolio-card-sipmu { grid-column: auto; justify-self: stretch; }
}

@media (max-width: 520px) {
  .portfolio-section { padding: 4.5rem 0; }
  .portfolio-heading { text-align: left; }
  .portfolio-grid { gap: 1.15rem; }
  .portfolio-card { border-radius: 18px; }
  .portfolio-preview { min-height: 0; }
  .portfolio-preview > img,
  .swimmer-preview-scene {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .portfolio-preview > img { object-fit: contain; }
  .portfolio-preview-action { display: none; }
  .portfolio-card-body { min-height: 0; padding: 1.25rem; }
  .portfolio-card-topline { align-items: flex-start; }
  .portfolio-status { max-width: 64%; text-align: right; }
  .portfolio-tags { margin-top: 0.25rem; gap: 0.25rem; }
  .portfolio-tags li { padding: 0.32rem; font-size: 0.55rem; }
  .portfolio-link { width: 100%; min-height: 44px; justify-content: space-between; }
  .swimmer-preview-copy { top: 18px; max-width: 46%; }
  .swimmer-preview-copy strong { font-size: 1.25rem; }
  .swimmer-route { width: 48%; right: -4%; top: 20px; }
  .swimmer-live-card { left: 18px; bottom: 10px; }
}

@media (max-width: 360px) {
  .portfolio-heading h2 { font-size: 2rem; }
  .swimmer-preview-copy { max-width: 44%; }
  .swimmer-route { width: 50%; right: -6%; }
  .swimmer-preview-copy strong { font-size: 1.12rem; }
  .portfolio-status { font-size: 0.59rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fluid-bg { animation: none; }
  .portfolio-card,
  .portfolio-preview > img,
  .portfolio-preview-action { transition: none; }
}

/* --- SERVICES LIST SECTION --- */
.services-list-section {
  background: transparent;
  padding: 6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.services-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.services-badge {
  background: rgba(0, 210, 255, 0.1);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  display: inline-block;
}

.services-section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.services-section-desc {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.6;
}

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

@media (max-width: 992px) {
  .services-minimal-grid {
    grid-template-columns: 1fr;
  }
}

.service-minimal-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--border-radius-md);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: var(--transition-smooth);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.service-minimal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 210, 255, 0.1);
  border-color: var(--accent);
}

.service-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.service-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
}

.service-card-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #0072ff;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
}

.service-minimal-card:hover .service-card-link {
  color: #00d2ff;
}

/* --- CINEMATIC INTRO ANIMATIONS --- */
.cinematic-title-animation {
  animation: cinematicEntrance 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cinematic-subtitle-animation {
  animation: cinematicSubtitle 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cinematicEntrance {
  0% {
    opacity: 0;
    filter: blur(15px);
    letter-spacing: -6px;
    transform: scale(0.8) translateY(30px);
    color: #ffffff;
    text-shadow: 0 0 10px #ffffff, 0 0 20px rgba(0, 210, 255, 0.8), 0 0 40px rgba(0, 210, 255, 0.6);
  }
  50% {
    opacity: 0.5;
    filter: blur(5px);
    color: #ffffff;
    text-shadow: 0 0 15px #ffffff, 0 0 25px rgba(0, 210, 255, 0.9), 0 0 50px rgba(0, 210, 255, 0.8);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    letter-spacing: -1.5px;
    transform: scale(1) translateY(0);
    color: #ffffff;
    text-shadow: 0 0 8px #ffffff, 0 0 15px #00d2ff, 0 0 30px #00d2ff, 0 0 50px rgba(0, 210, 255, 0.6);
  }
}

@keyframes cinematicSubtitle {
  0% {
    opacity: 0;
    filter: blur(10px);
    letter-spacing: 0px;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    letter-spacing: 3px;
    transform: scale(1) translateY(0);
  }
}

@keyframes rotatePortal {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- ASTEROIDS EASTER EGG MODAL --- */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 20000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.game-modal.active {
  opacity: 1;
  pointer-events: all;
}
.game-container {
  background: #000;
  border: 2px solid var(--accent);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  width: 90%;
  max-width: 640px;
  position: relative;
  box-shadow: 0 0 30px var(--accent-glow);
  text-align: center;
}
.game-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.game-close:hover {
  color: var(--accent);
}
#game-canvas {
  background: #050505;
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
  margin: 1rem auto;
  max-width: 100%;
  height: auto !important;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

/* --- CUSTOM GALAXY & PORTAL ANIMATIONS --- */
@keyframes portal-float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

@keyframes portal-pulse-shadow {
  0% {
    box-shadow: 0 8px 32px var(--glass-shadow), 0 0 10px rgba(0, 210, 255, 0.05);
    border-color: var(--glass-border);
  }
  50% {
    box-shadow: 0 8px 32px var(--glass-shadow), 0 0 25px rgba(0, 210, 255, 0.15), 0 0 10px rgba(138, 43, 226, 0.1);
    border-color: rgba(0, 210, 255, 0.2);
  }
  100% {
    box-shadow: 0 8px 32px var(--glass-shadow), 0 0 10px rgba(0, 210, 255, 0.05);
    border-color: var(--glass-border);
  }
}

@keyframes text-glow-pulse {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 255, 255, 0.15), 0 0 15px rgba(0, 210, 255, 0.1); }
  50% { text-shadow: 0 0 12px rgba(255, 255, 255, 0.3), 0 0 25px var(--accent), 0 0 15px var(--accent-secondary); }
}

.portal-float-slow {
  animation: portal-float 9s ease-in-out infinite;
}

.portal-float-mid {
  animation: portal-float 7s ease-in-out infinite;
}

.portal-float-fast {
  animation: portal-float 5s ease-in-out infinite;
}

.bento-card, .glass-card {
  animation: portal-pulse-shadow 8s ease-in-out infinite;
}

/* Elegant text headers glow */
.gradient-text {
  animation: text-glow-pulse 6s ease-in-out infinite alternate;
}

/* Custom premium hover glow for buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--text-primary) !important;
  color: var(--bg-primary) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--text-primary) !important;
  color: var(--bg-primary) !important;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2), 0 0 15px var(--accent-glow) !important;
}

.btn-secondary {
  border: 1px solid var(--glass-border) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(0, 210, 255, 0.08) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 15px var(--accent-glow) !important;
}

/* Glass card hover improvement */
.glass-card:hover, .bento-card:hover {
  animation-play-state: paused; /* Pause pulsation during interactive hover to let hover styles take priority */
}

/* --- GLOBAL SPACE BACKGROUND DECORATIONS --- */
.space-planet {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -2;
  filter: blur(40px);
  opacity: 0.25;
  mix-blend-mode: screen;
}

.planet-cyan {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.4) 0%, transparent 70%);
  top: 25%;
  left: -50px;
  animation: floatPlanet 40s infinite alternate ease-in-out;
}

.planet-purple {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.35) 0%, transparent 70%);
  bottom: 20%;
  right: -100px;
  animation: floatPlanet 50s infinite alternate ease-in-out;
}

.planet-violet {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 0, 128, 0.25) 0%, transparent 70%);
  top: 60%;
  left: 30%;
  animation: floatPlanet 45s infinite alternate ease-in-out;
}

@keyframes floatPlanet {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -40px) scale(1.1); }
  100% { transform: translate(-30px, 60px) scale(0.95); }
}

/* --- QUANT FINANCE DEMO SECTION --- */
.finance-demo-section {
  background: transparent;
  padding: 6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.finance-demo-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.finance-demo-badge {
  background: rgba(57, 255, 20, 0.1);
  color: var(--portals-accent);
  border: 1px solid rgba(57, 255, 20, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  display: inline-block;
}

.finance-demo-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.finance-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 992px) {
  .finance-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.calc-sliders-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.calc-slider-label {
  color: var(--text-secondary);
}

.calc-slider-value {
  color: var(--accent);
  font-family: var(--font-mono);
}

.calc-range-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.calc-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent);
  transition: transform 0.2s;
}

.calc-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: #ffffff;
}

.calc-toggle-container {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 0.3rem;
  gap: 0.3rem;
}

.calc-toggle-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.calc-toggle-btn.active {
  background: var(--accent);
  color: #000000;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.results-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 2rem;
}

.main-result-box {
  text-align: center;
}

.main-result-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.main-result-val {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 20px var(--accent-glow);
}

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

.greek-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  text-align: center;
}

.greek-name {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 1px;
}

.greek-val {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-container {
  width: 100%;
  height: 200px;
  position: relative;
  margin-top: 1rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 1.5rem;
}

#payoff-chart {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- AI CHATBOT WIDGET STYLES --- */
#chatbot-launcher {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  box-shadow: 0 8px 30px rgba(0, 210, 255, 0.35), 0 0 20px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  transition: var(--transition-elastic);
  animation: fabPulse 3s infinite alternate;
}

#chatbot-launcher:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 12px 35px rgba(0, 210, 255, 0.5), 0 0 25px var(--accent);
}

#chatbot-launcher svg {
  width: 28px;
  height: 28px;
  fill: #000000;
}

@keyframes fabPulse {
  0% { transform: scale(1); box-shadow: 0 8px 30px rgba(0, 210, 255, 0.35), 0 0 10px var(--accent-glow); }
  100% { transform: scale(1.04); box-shadow: 0 8px 35px rgba(0, 210, 255, 0.55), 0 0 25px rgba(138, 43, 226, 0.3); }
}

#chatbot-box {
  position: fixed;
  bottom: 105px;
  right: 30px;
  width: 380px;
  height: 520px;
  border-radius: var(--border-radius-lg);
  background: rgba(8, 10, 33, 0.94);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  opacity: 0;
  transform: translateY(30px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#chatbot-box.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (max-width: 480px) {
  #chatbot-box {
    width: calc(100% - 40px);
    height: 80vh;
    right: 20px;
    bottom: 95px;
  }
}

.chat-header {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--portals-accent);
  box-shadow: 0 0 8px var(--portals-accent);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.chat-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 0 4px;
}

.chat-close-btn:hover {
  color: #ff4d4d;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.chat-bubble.bot {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-bubble.user {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.95) 0%, rgba(0, 114, 255, 0.95) 100%);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.15);
}

.chat-bubble.loading {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-bubble.loading span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1.4s infinite both;
}

.chat-bubble.loading span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble.loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-input-area {
  padding: 0.8rem 1.2rem 1.2rem 1.2rem;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.chat-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-smooth);
}

.chat-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px var(--accent-glow);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.chat-send-btn:hover {
  background: #ffffff;
  transform: scale(1.08);
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
  fill: #000000;
  margin-left: 2px;
}


/* --- MOBILE RESPONSIVE ADAPTATIONS --- */

/* Mobile Hamburger Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 0 26px;
  width: 26px;
  min-width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 210;
  position: relative;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-smooth);
  transform-origin: center;
}

/* Hamburger to X animations */
.navbar.mobile-active .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.navbar.mobile-active .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}
.navbar.mobile-active .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Base transitions for responsive elements */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .navbar {
    height: 70px;
    gap: 0.75rem;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(8, 10, 33, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 150;
    pointer-events: none;
    padding-top: 5rem;
  }
  
  .navbar.mobile-active .nav-links {
    transform: translateY(0);
    pointer-events: auto;
  }
  
  .nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  
  .navbar.mobile-active .nav-links li {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Sequential animation delay for menu items */
  .navbar.mobile-active .nav-links li:nth-child(1) { transition-delay: 0.1s; }
  .navbar.mobile-active .nav-links li:nth-child(2) { transition-delay: 0.15s; }
  .navbar.mobile-active .nav-links li:nth-child(3) { transition-delay: 0.2s; }
  .navbar.mobile-active .nav-links li:nth-child(4) { transition-delay: 0.25s; }
  .navbar.mobile-active .nav-links li:nth-child(5) { transition-delay: 0.3s; }
  
  .nav-links a {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
  }
  
  .nav-actions {
    margin-left: auto;
    margin-right: 1.5rem;
    flex-shrink: 0;
  }
  
  /* Reposition LinkedIn inside menu for cleaner mobile bar */
  .nav-actions a[title="Profilo LinkedIn"] {
    display: none !important;
  }
  
  /* Grid & Card Spacing Reductions */
  .container {
    padding: 0 1.25rem !important;
  }
  
  .glass-card, .service-minimal-card {
    padding: 2rem 1.25rem !important;
  }
  
  .grid {
    gap: 1.25rem !important;
  }
  
  /* Fix text justification for smaller screens */
  p, .service-card-text {
    text-align: left !important;
  }
  
  .about-page .glass-card {
    padding: 2.5rem 1.5rem !important;
  }
}

@media (max-width: 768px) {
  section {
    padding: 6rem 0 3rem;
  }
  
  .hero-title {
    letter-spacing: -1px;
  }
  
  .fluid-glass-card {
    padding: 2rem 1rem !important;
  }
  
  /* Stacking grid elements */
  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
  
  /* Founder Card responsive */
  .about-page .glass-card[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 2rem 1.25rem !important;
  }
}

@media (max-width: 480px) {
  #intro-overlay,
  #page-loader {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .navbar {
    height: 64px;
  }

  .site-logo {
    font-size: clamp(1.05rem, 4.8vw, 1.25rem);
    letter-spacing: 0;
    gap: 0.35rem !important;
  }

  .site-logo img {
    width: 28px !important;
    height: 28px !important;
  }

  .nav-actions {
    gap: 0.5rem !important;
    margin-right: 0.75rem !important;
  }

  #lang-toggle {
    padding: 0.55rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  #easter-egg-btn {
    display: none !important;
  }

  .space-planet {
    display: none;
  }

  .glow-effect {
    width: 100%;
    height: 100vw;
  }

  .fluid-bg {
    width: 100%;
    height: 100%;
  }

  .cookie-banner {
    width: calc(100% - 24px);
    max-height: 45vh;
    overflow-y: auto;
    bottom: 12px;
    padding: 1rem;
  }

  .cookie-banner .btn,
  .cookie-banner button {
    width: 100%;
    min-height: 44px;
  }

  .admin-dashboard h1 {
    font-size: clamp(1.7rem, 9vw, 2.2rem) !important;
    overflow-wrap: anywhere;
  }

  .admin-dashboard {
    padding-top: 6rem !important;
  }

  .admin-page .nav-actions .btn {
    display: none !important;
  }

}

@media (max-width: 360px) {
  .navbar {
    gap: 0.5rem;
  }

  .site-logo {
    min-width: 0;
    font-size: 1.05rem;
    gap: 0.35rem !important;
  }

  .site-logo img {
    width: 28px !important;
    height: 28px !important;
  }

  .site-logo > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-actions {
    gap: 0.45rem !important;
    margin-right: 0.5rem !important;
  }

  #easter-egg-btn {
    display: none !important;
  }

  .mobile-menu-toggle {
    flex: 0 0 26px;
    min-width: 26px;
    width: 26px;
  }

}

@media (max-width: 768px) {
  .footer a,
  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  footer p a {
    display: inline !important;
    min-height: 0 !important;
  }

  .service-card-link,
  .btn,
  button,
  input,
  select,
  textarea,
  [role="button"] {
    min-height: 44px;
  }
}

/* --- MOBILE GAME CONTROLLER OVERRIDES --- */
.mobile-game-controls {
  display: none;
  touch-action: none;
}
.game-control-btn {
  box-shadow: none !important;
  transform: none !important;
  transition: transform 0.1s ease;
}
.game-control-btn:active {
  transform: scale(0.95) !important;
  background: var(--accent) !important;
  color: #fff !important;
}


/* --- ADMIN DASHBOARD LIGHT CLEAN STYLING OVERRIDES --- */
.admin-page {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}
.admin-page header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
.admin-page header .site-logo {
  color: #0f172a !important;
}
.admin-page header .nav-links a {
  color: #334155 !important;
}
.admin-page header .nav-links a:hover {
  color: #0072ff !important;
}
.admin-page .metric-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  color: #0f172a !important;
}
.admin-page .metric-card:hover {
  border-color: #0072ff !important;
}
.admin-page .metric-card h3, .admin-page .metric-card h4, .admin-page .metric-card p {
  color: #0f172a !important;
}
.admin-page .chart-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
.admin-page .preview-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}
.admin-page .preview-card h4 {
  color: #0f172a !important;
}
.admin-page .preview-card p {
  color: #4b5563 !important;
}
.admin-page .preview-card .mode-seo p {
  color: #4d5156 !important;
}
.admin-page .preview-thumbnail {
  background: #f1f5f9 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.admin-page .preview-badge {
  background: rgba(0, 114, 255, 0.08) !important;
  color: #0072ff !important;
  border: 1px solid #0072ff !important;
}
.admin-page .insights-output-box {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
.admin-page footer {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #4b5563 !important;
}
.admin-page footer p, .admin-page footer span {
  color: #4b5563 !important;
}

/* Prevent slogan from wrapping awkwardly in hero section */
.hero-title {
  text-wrap: normal !important;
}

/* --- OFFICIAL NEBULA'S BRAND SYSTEM --- */
.site-logo--wordmark {
  gap: 0 !important;
  line-height: 1;
}
.game-victory-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(120, 243, 206, .32);
  border-radius: 16px;
  background: rgba(120, 243, 206, .08);
  text-align: left;
}
.game-victory-panel[hidden], .game-retry-button[hidden] { display: none !important; }
.game-victory-panel h4 { margin: 0 0 .5rem; color: #fff; font-size: clamp(1rem, 3vw, 1.35rem); }
.game-victory-panel p { margin: 0 0 .8rem; color: var(--text-secondary); font-size: .82rem; line-height: 1.5; }
.game-victory-panel > div { display: flex; flex-wrap: wrap; gap: .55rem; }
.game-retry-button { width: 100%; margin-top: .85rem; }

.brand-wordmark {
  display: block;
  width: auto !important;
  height: 58px !important;
  max-width: 190px;
  object-fit: contain;
  transform: none !important;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.site-logo:hover .brand-wordmark,
.footer-brand-link:hover .brand-wordmark {
  filter: drop-shadow(0 0 9px rgba(0, 160, 227, 0.42));
}

.brand-mark {
  display: inline-block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
}

.brand-wordmark--footer {
  height: 66px !important;
  max-width: 180px;
}

@media (max-width: 480px) {
  .brand-wordmark,
  .site-logo .brand-wordmark {
    width: auto !important;
    height: 50px !important;
    max-width: 150px;
  }

  .brand-wordmark--footer {
    height: 60px !important;
    max-width: 168px;
  }
}

@media (max-width: 360px) {
  .brand-wordmark,
  .site-logo .brand-wordmark {
    height: 46px !important;
    max-width: 136px;
  }
}

/* --- MAIN SITE REFINEMENT 2026 --- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

#easter-egg-btn,
.easter-egg-btn,
[data-arcade-header] {
  display: none !important;
}

.social-icon-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.social-icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor !important;
  opacity: 1 !important;
}

.social-icon-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(124, 234, 255, 0.55);
  transform: translateY(-2px);
}

#lang-toggle {
  min-width: 46px;
  padding: 0.58rem 0.8rem;
  font-size: 0.82rem;
}

.hero-section {
  min-height: min(900px, 92vh);
  padding: 10rem 0 6.5rem;
}

.hero-content {
  width: 100%;
  max-width: 1160px;
}

.hero-title {
  width: min(1220px, calc(100vw - 3rem));
  max-width: 100%;
  margin: 0 auto 1.8rem;
  font-size: min(5.35rem, 4.45vw);
  font-weight: 780;
  line-height: 1.04;
  letter-spacing: -0.06em;
  text-wrap: normal !important;
}

.hero-line {
  display: block;
  padding-bottom: 0.14em;
  margin-bottom: -0.1em;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #eef7ff 38%, #8beee5 68%, #ffffff 100%);
  background-size: 220% auto;
  background-clip: text;
  -webkit-background-clip: text;
  animation: hero-text-flow 9s ease-in-out infinite;
}

.hero-line:nth-child(2) {
  background-image: linear-gradient(100deg, #dbe8f8 0%, #9fb7dd 38%, #d5b4ff 70%, #dbe8f8 100%);
  animation-delay: -2s;
}

.hero-line:nth-child(3) {
  background-image: linear-gradient(100deg, #65e9f5 0%, #77c9ff 36%, #c58cff 72%, #65e9f5 100%);
  animation-delay: -4s;
}

@keyframes hero-text-flow {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-desc {
  max-width: 700px;
  margin: 0 auto 2.75rem;
  color: #a8b4c5;
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.7;
  text-align: center !important;
  text-wrap: balance;
}

.hero-ctas {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero-cta {
  min-height: 72px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
  color: #050811 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.23);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-cta svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.hero-cta-whatsapp { background: #eafff1 !important; }
.hero-cta-portfolio { background: #f7fbff !important; }
.hero-cta-tools { background: #f7f2ff !important; }

.hero-cta:hover {
  color: #050811 !important;
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35), 0 0 24px rgba(117, 232, 255, 0.12);
}

.portfolio-heading h2 {
  font-family: var(--font-body);
  font-size: clamp(2.15rem, 4.2vw, 3.8rem);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.services-list-section {
  position: relative;
  padding: clamp(5.5rem, 9vw, 8rem) 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 82% 8%, rgba(0, 210, 255, 0.08), transparent 34%),
    #050811;
  background-size: 72px 72px, 72px 72px, auto, auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.services-container {
  max-width: 1440px;
}

.services-editorial-header {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: clamp(3rem, 6vw, 5.25rem);
}

.section-kicker {
  grid-column: 1 / -1;
  margin: 0 0 -1.75rem;
  color: #65ddf8;
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.services-editorial-header h2,
.contact-copy h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(2.7rem, 5.3vw, 5.25rem);
  font-weight: 690;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.services-intro {
  margin: 0;
  color: #a9b7c9;
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  line-height: 1.7;
}

.services-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.service-panel {
  min-width: 0;
  padding: clamp(1.8rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.012);
  transition: background 0.3s ease;
}

.service-panel + .service-panel {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.service-panel:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.service-panel-top {
  min-height: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.service-index {
  color: #66758a;
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.14em;
}

.service-line-icon {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: #77e9ff;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-label {
  margin: 0 0 1rem;
  color: #7ceaff;
  font: 700 0.7rem var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-panel h3 {
  margin: 0 0 1.2rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 2.2vw, 2.15rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.service-panel > p:not(.service-label) {
  margin: 0 0 1.65rem;
  color: #9eacbd;
  font-size: 0.95rem;
  line-height: 1.7;
}

.service-panel ul {
  margin: 0 0 2.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.service-panel li {
  padding: 0.38rem 0.58rem;
  color: #b8c6d7;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  font: 600 0.66rem var(--font-mono);
}

.service-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .85rem;
  margin: -.85rem 0 1.55rem;
}

.service-tool-links a {
  color: #dce7f4;
  font-size: .72rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--panel-accent, #7ceaff) 58%, transparent);
  text-underline-offset: .22em;
}

.service-tool-links a:hover { color: var(--panel-accent, #7ceaff); }

.service-panel > a {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.6rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.25s ease, gap 0.25s ease, border-color 0.25s ease;
}

.service-panel > a:hover {
  gap: 0.85rem;
  color: #7ceaff;
  border-color: #7ceaff;
}

.contact-section {
  position: relative;
  padding: clamp(5.5rem, 9vw, 8rem) 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 210, 255, 0.12), transparent 34%),
    radial-gradient(circle at 88% 78%, rgba(137, 55, 255, 0.1), transparent 32%),
    #02040a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-shell {
  max-width: 1320px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 0.8fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
}

.contact-copy .section-kicker {
  margin: 0 0 1.5rem;
}

.contact-lead {
  max-width: 570px;
  margin: 1.8rem 0 2rem;
  color: #a9b7c9;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
}

.contact-promises {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.contact-promises > span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #d8e1ec;
  font-size: 0.9rem;
}

.contact-promises i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #72e8ff;
  box-shadow: 0 0 0 5px rgba(114, 232, 255, 0.08);
}

.contact-direct-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
}

.contact-direct-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.88rem;
  font-weight: 650;
}

.contact-form-panel {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: grid;
  gap: 1.35rem;
  background: rgba(9, 14, 27, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.contact-field {
  display: grid;
  gap: 0.55rem;
}

.contact-field label {
  color: #dce5ef;
  font-size: 0.78rem;
  font-weight: 680;
  letter-spacing: 0.04em;
}

.contact-optional {
  color: #8795a8;
  font-size: 0.88em;
  font-weight: 560;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  outline: none;
  font: 500 0.96rem var(--font-body);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.contact-field textarea {
  min-height: 145px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(114, 232, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(114, 232, 255, 0.07);
}

.contact-submit {
  min-height: 56px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #050811;
  background: #f7fbff;
  border: 0;
  border-radius: 10px;
  font: 750 0.92rem var(--font-body);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(124, 234, 255, 0.13);
}

.contact-privacy {
  margin: -0.35rem 0 0;
  color: #6f7d90;
  font-size: 0.72rem;
  text-align: center !important;
}

@media (max-width: 1100px) {
  .hero-line { white-space: normal; }
  .hero-title {
    width: min(900px, calc(100vw - 2.5rem));
    font-size: clamp(2.75rem, 6.1vw, 4.8rem);
  }
  .contact-shell { gap: 3.5rem; }
}

@media (max-width: 900px) {
  .header-socials { gap: 0.25rem; }
  .social-icon-link { width: 34px; height: 34px; }
  .hero-section { min-height: auto; padding: 9.5rem 0 5rem; }
  .hero-ctas { grid-template-columns: 1fr; max-width: 560px; }
  .hero-cta { min-height: 60px; }
  .services-editorial-header { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-kicker { margin-bottom: 0; }
  .services-row { grid-template-columns: 1fr; }
  .service-panel + .service-panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
  .contact-shell { grid-template-columns: 1fr; }
  .contact-copy { max-width: 680px; }
}

@media (max-width: 600px) {
  .hero-title { font-size: clamp(2.05rem, 10.5vw, 3.35rem); line-height: 1.05; }
  .hero-line { margin-bottom: 0.08em; }
  .portfolio-heading { text-align: left; }
  .services-editorial-header h2,
  .contact-copy h2 { font-size: clamp(2.45rem, 12vw, 3.6rem); }
  .service-panel { padding: 1.75rem 0.25rem; }
  .contact-form-panel { border-radius: 18px; }
}

@media (max-width: 480px) {
  .header-socials .social-icon-link:nth-child(2),
  .header-socials .social-icon-link:nth-child(3) { display: none; }
  .nav-actions { margin-right: 0.65rem !important; }
  .hero-section { padding-top: 7.5rem; }
  .hero-desc { text-align: center !important; }
  .hero-cta { min-height: 58px; }
  .contact-direct-links { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 360px) {
  .header-socials { display: flex; }
  #lang-toggle { display: none; }
  .nav-actions { margin-left: auto; }
  .hero-title { font-size: 10vw; }
  .contact-form-panel { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .social-icon-link,
  .hero-cta,
  .service-panel,
  .contact-submit { transition: none; }
}

/* --- ABOUT PAGE REBUILD --- */
.about-page {
  background: #02040a;
}

.about-page .space-planet,
.about-page > .glow-effect {
  display: none;
}

.about-rebuild {
  position: relative;
  z-index: 1;
  color: #fff;
  background: #02040a;
}

.about-hero-modern {
  padding: clamp(10rem, 16vw, 13.5rem) 0 clamp(4.5rem, 8vw, 7rem);
  background:
    radial-gradient(circle at 82% 20%, rgba(0, 210, 255, 0.12), transparent 32%),
    radial-gradient(circle at 16% 72%, rgba(123, 53, 255, 0.12), transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #02040a;
  background-size: auto, auto, 80px 80px, 80px 80px, auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.about-hero-grid {
  max-width: 1340px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 7rem);
}

.about-hero-grid .section-kicker {
  margin: 0 0 1.5rem;
}

.about-hero-grid h1 {
  margin: 0;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(3.2rem, 7.4vw, 7.5rem);
  font-weight: 690;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.about-hero-lead {
  margin: 0 0 0.45rem;
  color: #abb8c9;
  font-size: clamp(1.05rem, 1.65vw, 1.25rem);
  line-height: 1.7;
}

.about-proof-strip {
  max-width: 1340px;
  margin-top: clamp(4rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.about-proof-strip > div {
  padding: 1.5rem clamp(1rem, 2.5vw, 2rem);
  display: grid;
  gap: 0.45rem;
}

.about-proof-strip > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.about-proof-strip strong {
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.about-proof-strip span {
  color: #8290a3;
  font-size: 0.8rem;
}

.about-people-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: #050811;
}

.about-people-intro {
  max-width: 1340px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.about-people-intro .section-kicker {
  margin: 0;
}

.about-people-intro > p:last-child {
  max-width: 530px;
  margin: 0;
  color: #98a6b8;
  font-size: 1rem;
  line-height: 1.7;
}

.about-people-list {
  max-width: 1340px;
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.about-person {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  min-height: 570px;
  background: #080c16;
}

.about-person-reverse .about-person-media {
  grid-column: 2;
}

.about-person-reverse .about-person-content {
  grid-column: 1;
  grid-row: 1;
}

.about-person-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #101725;
}

.about-person-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(2, 4, 10, 0.62));
  pointer-events: none;
}

.about-person-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.82) contrast(1.03);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.about-person:hover .about-person-media img {
  transform: scale(1.025);
  filter: saturate(1) contrast(1.03);
}

.about-person-media > span {
  position: absolute;
  z-index: 2;
  left: 1.35rem;
  bottom: 1.2rem;
  color: rgba(255, 255, 255, 0.72);
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.14em;
}

.about-person-content {
  padding: clamp(2rem, 6vw, 5.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-person-role {
  margin: 0 0 1.1rem !important;
  color: #72e8ff !important;
  font: 700 0.7rem var(--font-mono) !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-person-content h2 {
  margin: 0 0 1.5rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 4.5vw, 4.8rem);
  font-weight: 670;
  line-height: 1;
  letter-spacing: -0.06em;
}

.about-person-content > p:not(.about-person-role) {
  max-width: 650px;
  margin: 0 0 2rem;
  color: #9caabd;
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.75;
}

.about-person-content ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.about-person-content li {
  padding: 0.42rem 0.65rem;
  color: #c2cede;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font: 600 0.68rem var(--font-mono);
}

.about-principles-section {
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: #eef3f8;
  color: #07101f;
}

.about-principles-grid {
  max-width: 1340px;
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 0.85fr);
  border-top: 1px solid rgba(7, 16, 31, 0.18);
  border-bottom: 1px solid rgba(7, 16, 31, 0.18);
}

.about-principles-title,
.about-principle {
  padding: clamp(1.6rem, 3.4vw, 3rem);
}

.about-principle {
  border-left: 1px solid rgba(7, 16, 31, 0.18);
}

.about-principles-title .section-kicker {
  margin: 0 0 1.4rem;
  color: #006d83;
}

.about-principles-title h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(2.2rem, 3.8vw, 4rem);
  font-weight: 680;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.about-principle > span {
  color: #718096;
  font: 700 0.7rem var(--font-mono);
}

.about-principle h3 {
  margin: 3rem 0 1rem;
  color: #07101f;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 670;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.about-principle p {
  margin: 0;
  color: #536176;
  font-size: 0.9rem;
  line-height: 1.65;
}

.about-final-cta {
  padding: clamp(5rem, 10vw, 9rem) 0;
  text-align: center;
  background:
    radial-gradient(circle at 50% 120%, rgba(0, 210, 255, 0.16), transparent 45%),
    #02040a;
}

.about-final-cta p {
  margin: 0 0 1rem;
  color: #72e8ff;
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center !important;
}

.about-final-cta h2 {
  max-width: 850px;
  margin: 0 auto 2.25rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(2.55rem, 5.3vw, 5.2rem);
  font-weight: 680;
  line-height: 1;
  letter-spacing: -0.06em;
}

.about-final-cta a {
  min-height: 56px;
  min-width: 220px;
  padding: 0.9rem 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: #07101f;
  background: #fff;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 720;
}

@media (max-width: 1000px) {
  .about-hero-grid { grid-template-columns: 1fr; }
  .about-hero-lead { max-width: 650px; }
  .about-principles-grid { grid-template-columns: 1fr 1fr; }
  .about-principle:nth-child(3) { border-left: 0; border-top: 1px solid rgba(7, 16, 31, 0.18); }
  .about-principle:nth-child(4) { border-top: 1px solid rgba(7, 16, 31, 0.18); }
}

@media (max-width: 992px) {
  .about-hero-modern { padding-top: 8.5rem; }
  .about-proof-strip { grid-template-columns: 1fr; }
  .about-proof-strip > div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
  .about-people-intro { align-items: flex-start; flex-direction: column; }
  .about-person { grid-template-columns: 1fr; min-height: 0; }
  .about-person-media { aspect-ratio: 4 / 5; max-height: 600px; }
  .about-person-reverse .about-person-media { grid-column: 1; }
  .about-person-reverse .about-person-content { grid-column: 1; grid-row: auto; }
  .about-person-content { padding: 2rem 1.35rem 2.5rem; }
  .about-principles-grid { grid-template-columns: 1fr; }
  .about-principle,
  .about-principle:nth-child(3),
  .about-principle:nth-child(4) { border-left: 0; border-top: 1px solid rgba(7, 16, 31, 0.18); }
  .about-principle h3 { margin-top: 1.5rem; }
}

@media (max-width: 480px) {
  .about-hero-grid h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .about-person-content h2 { font-size: clamp(1.8rem, 8vw, 2.2rem); }
  .about-principles-title,
  .about-principle { padding: 1.6rem 0.2rem; }
}

/* --- NAVIGATION, HERO & TOOLS REFINEMENT 2026-07 --- */
@media (min-width: 993px) {
  .navbar {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    gap: 1.5rem;
  }

  .navbar .logo {
    display: flex;
    align-items: center;
    justify-self: start;
    line-height: 0;
  }
  .navbar > nav { justify-self: center; }
  .navbar .nav-actions { justify-self: end; }

  .nav-links {
    gap: 0.2rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
  }

  header .nav-links a {
    display: block;
    padding: 0.6rem 0.92rem;
    color: #f7fbff !important;
    opacity: 0.9;
    border-radius: 999px;
  }

  header .nav-links a.active,
  header .nav-links a[aria-current="page"] {
    color: #07101a !important;
    opacity: 1;
    background: #fff;
  }
}

header a:focus-visible,
header button:focus-visible {
  outline: 2px solid #75e8ff;
  outline-offset: 3px;
}

.hero-ctas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero-cta-services { background: #fff9ec !important; }
.hero-ctas + .hero-desc { margin: 1.75rem auto 0; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tools-page-modern {
  color: #f7fbff;
  background: #050811;
}

.tools-page-modern main {
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 14% 18%, rgba(0, 210, 255, 0.12), transparent 32%),
    radial-gradient(circle at 88% 34%, rgba(134, 69, 255, 0.11), transparent 30%),
    #050811;
  background-size: 72px 72px, 72px 72px, auto, auto, auto;
}

.tools-hero {
  padding: clamp(10rem, 16vw, 14rem) 0 clamp(5rem, 9vw, 8rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tools-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: end;
}

.tools-kicker {
  margin: 0 0 1.1rem;
  color: #72e8ff;
  font: 700 0.72rem var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tools-hero h1 {
  margin: 0;
  max-width: 900px;
  padding-bottom: 0.08em;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(3rem, 6.2vw, 6.5rem);
  font-weight: 690;
  line-height: 1.02;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.tools-hero-copy > p {
  margin: 0 0 1.5rem;
  color: #b1bdcc;
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.68;
}

.tools-proof {
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.tools-proof > span,
.tool-editorial-card li {
  padding: 0.48rem 0.68rem;
  color: #dbe8f7;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  font: 650 0.7rem var(--font-mono);
}

.tools-proof > span {
  min-width: 0;
  display: grid;
  place-items: center;
  text-align: center;
  white-space: nowrap;
}

.tools-proof > span > span {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font: inherit;
}

.tools-showcase { padding: 0; }
.tools-showcase .container { max-width: 1440px; }
.tools-showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tool-editorial-card {
  min-height: 690px;
  padding: clamp(2rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  background: rgba(5, 8, 17, 0.72);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tool-editorial-card--weather { border-right: 0; }
.tool-editorial-top { display: flex; justify-content: space-between; gap: 1rem; color: #74e7ff; font: 700 0.68rem var(--font-mono); letter-spacing: 0.1em; }
.tool-editorial-top span:last-child { text-align: right; }

.tool-editorial-card h2 {
  max-width: 620px;
  margin: clamp(5rem, 9vw, 8rem) 0 1.4rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 4.2vw, 4.8rem);
  font-weight: 660;
  line-height: 1;
  letter-spacing: -0.055em;
}

.tool-editorial-card > p { max-width: 600px; margin: 0; color: #aeb9c8; font-size: 1rem; line-height: 1.7; }
.tool-editorial-card ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0 3rem; padding: 0; list-style: none; }
.tool-editorial-link { margin-top: auto; min-height: 58px; padding: 0.9rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #07101a; background: #fff; border-radius: 9px; font-size: 0.9rem; font-weight: 760; }
.tool-editorial-link:hover { color: #07101a; transform: translateY(-3px); }

.tools-method,
.tools-faq { padding: clamp(5.5rem, 10vw, 9rem) 0; }
.tools-method { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.tools-section-heading { max-width: 870px; margin-bottom: 4rem; }
.tools-section-heading h2,
.tools-faq h2 { margin: 0; color: #fff; font-family: var(--font-body); font-size: clamp(2.6rem, 5.4vw, 5.3rem); font-weight: 660; line-height: 1; letter-spacing: -0.06em; }
.tools-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, 0.14); border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.tools-steps article { min-height: 290px; padding: 2rem; }
.tools-steps article + article { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.tools-steps article > span { color: #72e8ff; font: 700 0.72rem var(--font-mono); }
.tools-steps h3 { margin: 4rem 0 0.8rem; color: #fff; font-size: 1.45rem; }
.tools-steps p { margin: 0; color: #99a8ba; line-height: 1.65; }
.tools-faq-grid { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(3rem, 8vw, 8rem); }
.tools-faq details { padding: 1.45rem 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.tools-faq details:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.tools-faq summary { color: #fff; cursor: pointer; font-size: 1.08rem; font-weight: 680; }
.tools-faq details p { margin: 1rem 0 0; color: #a9b5c5; line-height: 1.65; }
.tools-footer { padding: 3rem 0; background: #02040a; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.tools-footer-grid { display: grid; grid-template-columns: 0.8fr 1fr 1fr; align-items: center; gap: 2rem; }
.tools-footer-grid p { margin: 0; color: #8f9daf; font-size: 0.88rem; line-height: 1.55; }
.tools-footer-grid > div { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 1rem; }
.tools-footer-grid > div a { color: #c7d3e1; font-size: 0.78rem; }

@media (max-width: 1100px) {
  .hero-ctas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tools-hero-copy { max-width: 680px; }
  .tool-editorial-card { min-height: 620px; }
}

@media (max-width: 992px) {
  .navbar { display: flex; }
  .tools-showcase-grid { grid-template-columns: 1fr; }
  .tool-editorial-card { min-height: 560px; border-right: 0; }
  .tools-faq-grid { grid-template-columns: 1fr; }
  .tools-footer-grid { grid-template-columns: 1fr; }
  .tools-footer-grid > div { justify-content: flex-start; }
}

@media (max-width: 900px) {
  .hero-ctas { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .tools-hero { padding-top: 8.5rem; }
  .tools-hero h1 { max-width: 11ch; font-size: clamp(2.55rem, 11.5vw, 3.75rem); line-height: 1.04; }
  .tools-steps { grid-template-columns: 1fr; }
  .tools-steps article { min-height: 240px; }
  .tools-steps article + article { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .tool-editorial-card { min-height: 0; padding: 2rem 1.25rem; }
  .tool-editorial-card h2 { margin-top: 1.5rem; }
  .tool-editorial-link { margin-top: 2rem; }
}

/* Services + contact: warmer, differentiated visual system */
.services-list-section {
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 8% 12%, rgba(20, 184, 166, 0.2), transparent 34%),
    radial-gradient(circle at 52% 88%, rgba(99, 102, 241, 0.2), transparent 38%),
    radial-gradient(circle at 96% 18%, rgba(236, 72, 153, 0.15), transparent 32%),
    linear-gradient(135deg, #07131d 0%, #0c1024 48%, #160c24 100%);
  background-size: 72px 72px, 72px 72px, auto, auto, auto, auto;
}

.services-list-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.035), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.025));
}

.services-container {
  position: relative;
  z-index: 1;
}

.services-row {
  gap: clamp(0.8rem, 1.5vw, 1.25rem);
  border: 0;
}

.service-panel {
  --panel-accent: #73e8f5;
  position: relative;
  isolation: isolate;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(115, 232, 245, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 4%, rgba(45, 212, 191, 0.22), transparent 32%),
    linear-gradient(155deg, rgba(12, 55, 63, 0.94), rgba(6, 23, 34, 0.96) 62%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-panel:nth-child(2) {
  --panel-accent: #b7a4ff;
  border-color: rgba(167, 139, 250, 0.24);
  background:
    radial-gradient(circle at 90% 5%, rgba(139, 92, 246, 0.28), transparent 34%),
    linear-gradient(155deg, rgba(34, 31, 78, 0.96), rgba(13, 20, 48, 0.97) 64%);
}

.service-panel:nth-child(3) {
  --panel-accent: #ffb88d;
  border-color: rgba(251, 146, 60, 0.22);
  background:
    radial-gradient(circle at 92% 4%, rgba(244, 114, 182, 0.24), transparent 33%),
    linear-gradient(155deg, rgba(70, 30, 58, 0.95), rgba(31, 18, 43, 0.97) 64%);
}

.service-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, var(--panel-accent), transparent);
  box-shadow: 0 0 24px var(--panel-accent);
  opacity: 0.72;
}

.service-panel + .service-panel {
  border-left: 1px solid color-mix(in srgb, var(--panel-accent) 24%, transparent);
}

.service-panel:hover {
  transform: translateY(-7px);
  border-color: color-mix(in srgb, var(--panel-accent) 48%, transparent);
  box-shadow: 0 34px 84px rgba(0, 0, 0, 0.32), 0 0 34px color-mix(in srgb, var(--panel-accent) 10%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.service-panel .service-index,
.service-panel .service-label,
.service-panel .service-line-icon {
  color: var(--panel-accent);
  stroke: var(--panel-accent);
}

.service-panel .service-index { opacity: 0.78; }

.service-panel li {
  color: #e3ebf5;
  background: color-mix(in srgb, var(--panel-accent) 8%, rgba(255, 255, 255, 0.035));
  border-color: color-mix(in srgb, var(--panel-accent) 19%, rgba(255, 255, 255, 0.08));
}

.service-panel > a:hover {
  color: var(--panel-accent);
  border-color: var(--panel-accent);
}

.contact-section {
  background:
    radial-gradient(circle at 4% 8%, rgba(34, 211, 238, 0.2), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(192, 132, 252, 0.22), transparent 36%),
    linear-gradient(125deg, #071d29 0%, #0d1730 46%, #211034 100%);
}

.contact-section::before,
.contact-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(4px);
}

.contact-section::before {
  width: 420px;
  height: 420px;
  top: -260px;
  left: 32%;
  background: rgba(45, 212, 191, 0.1);
}

.contact-section::after {
  width: 520px;
  height: 520px;
  right: -300px;
  bottom: -330px;
  background: rgba(236, 72, 153, 0.1);
}

.contact-shell {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 4vw, 4.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  background:
    radial-gradient(circle at 0 0, rgba(103, 232, 249, 0.09), transparent 32%),
    linear-gradient(135deg, rgba(10, 25, 42, 0.76), rgba(28, 17, 51, 0.72));
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.contact-copy .section-kicker { color: #79e8f6; }

.contact-promises > span:nth-child(2) i {
  background: #b7a4ff;
  box-shadow: 0 0 0 5px rgba(183, 164, 255, 0.1);
}

.contact-promises > span:nth-child(3) i {
  background: #ffb88d;
  box-shadow: 0 0 0 5px rgba(255, 184, 141, 0.1);
}

.contact-form-panel {
  background:
    radial-gradient(circle at 100% 0, rgba(167, 139, 250, 0.13), transparent 30%),
    rgba(13, 20, 39, 0.82);
  border-color: rgba(181, 199, 255, 0.2);
  box-shadow: 0 28px 80px rgba(1, 4, 14, 0.32), 0 0 46px rgba(139, 92, 246, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.contact-field input,
.contact-field textarea {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(196, 214, 255, 0.16);
}

.contact-submit {
  background: linear-gradient(100deg, #ecfeff 0%, #f4f1ff 52%, #fff1f7 100%);
  box-shadow: 0 12px 30px rgba(126, 231, 255, 0.1);
}

@media (max-width: 900px) {
  .services-row { gap: 1rem; }
  .service-panel { min-height: 0; }
  .service-panel + .service-panel {
    border-top: 1px solid color-mix(in srgb, var(--panel-accent) 24%, transparent);
    border-left: 1px solid color-mix(in srgb, var(--panel-accent) 24%, transparent);
  }
  .contact-shell { border-radius: 28px; }
}

@media (max-width: 600px) {
  .services-list-section,
  .contact-section { padding-inline: 0.65rem; }
  .service-panel { padding: 1.75rem 1.35rem; border-radius: 20px; }
  .contact-shell { padding: 1.4rem !important; border-radius: 22px; }
}
