/* =====================================================
   MORTSEB DASHBOARD - Ultra Modern Design System
   ===================================================== */

/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

/* CSS Variables */
:root {
  color-scheme: dark;
  
  /* Colors */
  --bg-primary: #030303;
  --bg-elevated: rgba(12, 12, 14, 0.85);
  --bg-card: rgba(18, 18, 22, 0.9);
  --bg-hover: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  
  --accent-primary: #f97316;
  --accent-secondary: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.4);
  --accent-subtle: rgba(249, 115, 22, 0.1);
  
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.5);
  
  /* Typography */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "Geist Mono", "SF Mono", Consolas, monospace;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px var(--accent-glow);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* =====================================================
   ANIMATED BACKGROUND
   ===================================================== */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -20%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: 50%;
  right: -15%;
  animation-delay: -7s;
  opacity: 0.4;
}

.orb-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: -10%;
  left: 30%;
  animation-delay: -14s;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-8);
  background: rgba(3, 3, 3, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px) saturate(180%);
  animation: slideDown 0.6s ease-out;
}

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

.global-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: var(--transition-base);
}

.global-brand:hover {
  transform: translateX(4px);
}

.global-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary) 0%, #fbbf24 100%);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.global-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.mark-inner {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 14px;
  color: #0a0a0a;
  letter-spacing: 0.05em;
}

.brand-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-text span {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 2px;
}

.global-links {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.global-links a {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.global-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-subtle);
}

.global-links a.is-active {
  color: var(--text-primary);
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
}

.link-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* =====================================================
   MAIN CONTAINER
   ===================================================== */

.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-16);
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: var(--space-16) 0;
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-6);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px var(--success-glow);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(48px, 7vw, 80px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}

.title-line {
  display: block;
}

.title-highlight {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #fbbf24 50%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.hero-lead {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.meta-available {
  color: var(--success);
}

.meta-divider {
  width: 1px;
  height: 32px;
  background: var(--border-default);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-base);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #ea580c 100%);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary svg {
  transition: var(--transition-fast);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

/* Hero Visual Card */
.hero-visual {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.visual-card {
  position: relative;
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.card-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );
  animation: cardShimmer 4s ease-in-out infinite;
}

@keyframes cardShimmer {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.visual-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.visual-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--success);
  width: fit-content;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.visual-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.stat {
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-1);
}

.visual-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* =====================================================
   PROJECTS SECTION
   ===================================================== */

.projects-section {
  padding: var(--space-20) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.section-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-description {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-5);
}

.card {
  position: relative;
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: var(--transition-base);
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out both;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

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

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; }
.card:nth-child(6) { animation-delay: 0.35s; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.card-head > div {
  flex: 1;
  min-width: 0;
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.card-status {
  flex-shrink: 0;
  padding: var(--space-1) var(--space-3);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: var(--radius-full);
  border: 1px solid;
  font-family: var(--font-mono);
}

.card-status[data-status="Live"] {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

.card-status[data-status="Local"] {
  color: var(--text-tertiary);
  border-color: var(--border-default);
  background: transparent;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition-fast);
  font-family: var(--font-sans);
}

.card-link:hover {
  gap: var(--space-3);
}

.card-link::after {
  content: '→';
  transition: var(--transition-fast);
}

/* =====================================================
   CAPABILITIES SECTION
   ===================================================== */

.capabilities-section {
  padding: var(--space-20) 0;
  border-top: 1px solid var(--border-subtle);
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.capability-card {
  padding: var(--space-8);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: var(--transition-base);
}

.capability-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.capability-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  color: var(--accent-primary);
  margin-bottom: var(--space-5);
}

.capability-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.capability-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
  padding: var(--space-10) var(--space-8);
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.footer-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-primary), #fbbf24);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: #0a0a0a;
}

.footer-brand span {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links a {
  color: var(--text-primary);
  transition: var(--transition-fast);
}

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

.footer-divider {
  color: var(--text-tertiary);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    min-height: auto;
    padding: var(--space-10) 0;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .visual-card {
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .global-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
  }
  
  .global-links {
    width: 100%;
    justify-content: flex-start;
  }
  
  .main-container {
    padding: 0 var(--space-4);
  }
  
  .hero-title {
    font-size: clamp(36px, 10vw, 56px);
  }
  
  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
  
  .meta-divider {
    display: none;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
