/* ============================================================
   DESIGN TOKENS — LUXURY BURGUNDY & OBSIDIAN TECH
   ============================================================ */
:root {
  --bg-darkest: #070406;
  --bg-primary: #0D070A;
  --bg-secondary: #140C10;
  --bg-surface: #1B1016;
  --bg-surface-elevated: #24161E;
  --bg-glass: rgba(22, 13, 18, 0.72);
  --bg-glass-card: rgba(27, 16, 22, 0.65);

  --burgundy-deep: #4E1523;
  --burgundy: #8A243A;
  --burgundy-bright: #B83350;
  --rosewood: #D83F61;
  --crimson-vivid: #F44E74;
  --glow-burgundy: rgba(216, 63, 97, 0.28);

  --gold: #DEC6A0;
  --gold-light: #EFE2CE;
  --gold-muted: #9E8867;
  --gold-border: rgba(222, 198, 160, 0.2);

  --text-primary: #FAF6F4;
  --text-secondary: #D6C7C1;
  --text-muted: #94817A;
  --text-faint: #5E504A;

  --border-subtle: rgba(184, 51, 80, 0.16);
  --border-medium: rgba(184, 51, 80, 0.28);
  --border-bright: rgba(216, 63, 97, 0.45);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1240px;
  --edge: clamp(20px, 5vw, 64px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(138, 36, 58, 0.22) 0%, transparent 60%),
    radial-gradient(circle at 90% 25%, rgba(184, 51, 80, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 10% 65%, rgba(78, 21, 35, 0.16) 0%, transparent 50%);
  background-attachment: fixed;
}

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

img {
  max-width: 100%;
  display: block;
}

/* Ambient Grain Texture */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.34s; }
.reveal-delay-4 { transition-delay: 0.46s; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--edge);
  background: rgba(13, 7, 10, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--rosewood) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #FFF;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px var(--glow-burgundy);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  font-weight: 400;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--burgundy-bright), var(--gold));
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}

.nav-links a:hover::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   BUTTONS & BADGES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-family: var(--font-body);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--rosewood) 100%);
  color: #FFF;
  box-shadow: 0 4px 20px var(--glow-burgundy);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--burgundy-bright) 0%, var(--crimson-vivid) 100%);
  box-shadow: 0 8px 28px rgba(216, 63, 97, 0.4);
  color: #FFF;
}

.btn-secondary {
  background: rgba(27, 16, 22, 0.85);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(36, 22, 30, 0.95);
  border-color: var(--burgundy-bright);
  color: #FFF;
  transform: translateY(-2px);
}

.btn-gold {
  background: rgba(222, 198, 160, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.btn-gold:hover {
  background: rgba(222, 198, 160, 0.22);
  border-color: var(--gold);
  color: #FFF;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-burgundy {
  background: rgba(184, 51, 80, 0.15);
  color: var(--crimson-vivid);
  border: 1px solid var(--border-medium);
}

.badge-gold {
  background: rgba(222, 198, 160, 0.12);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

/* Pulse indicator */
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulseGreen 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ============================================================
   HERO SECTION — SPLIT LAYOUT
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 88vh;
  padding: 120px var(--edge) 48px;
  max-width: var(--container);
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 110px var(--edge) 40px;
    gap: 40px;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-eyebrow-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(50px, 6.8vw, 88px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  margin-bottom: 24px;
}

.hero-title em {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: #CCA86E;
  display: inline-block;
}

.hero-bio {
  max-width: 580px;
  font-size: clamp(15px, 1.25vw, 17.5px);
  color: var(--text-secondary);
  line-height: 1.72;
  margin-bottom: 36px;
}

.hero-bio .bio-name {
  color: #FFFFFF;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero Metrics */
.hero-metrics {
  border-top: 1px solid var(--border-subtle);
  padding: 36px var(--edge) 70px;
  max-width: var(--container);
  margin: 0 auto;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 768px) {
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }
}

.metric-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
  backdrop-filter: blur(8px);
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--burgundy-bright);
}

.metric-num {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-num span {
  color: var(--crimson-vivid);
  font-size: 18px;
}

.metric-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* ============================================================
   FLOATING DEVICE COMPOSITION (HERO RIGHT PANEL)
   ============================================================ */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

@media (max-width: 1024px) {
  .hero-visual { display: none; }
}

.floating-phones-comp {
  position: relative;
  width: 100%;
  height: 520px;
}

.comp-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(184, 51, 80, 0.28) 0%, rgba(138, 36, 58, 0.1) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.float-phone {
  position: absolute;
}

.float-phone .phone-mockup {
  width: 200px;
  max-width: 200px;
}

/* Center phone — primary, upfront */
.float-phone.center-front {
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: floatCenter 7s ease-in-out infinite;
}

/* Back-left phone — rotated left */
.float-phone.back-left {
  z-index: 2;
  top: 48%;
  left: 3%;
  opacity: 0.75;
  filter: brightness(0.75);
  animation: floatLeft 7s ease-in-out infinite 1.8s;
}

/* Back-right phone — rotated right */
.float-phone.back-right {
  z-index: 2;
  top: 48%;
  right: 3%;
  opacity: 0.75;
  filter: brightness(0.75);
  animation: floatRight 7s ease-in-out infinite 3.5s;
}

/* Static transforms applied via pseudo-elements workaround - use inline style approach in JS, or just initial CSS */
.float-phone.back-left .phone-mockup {
  transform: perspective(900px) rotateY(20deg) rotateZ(-5deg) scale(0.76) translateY(-50%);
  transform-origin: center center;
}

.float-phone.back-right .phone-mockup {
  transform: perspective(900px) rotateY(-20deg) rotateZ(5deg) scale(0.76) translateY(-50%);
  transform-origin: center center;
}

@keyframes floatCenter {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50%       { transform: translate(-50%, -50%) translateY(-20px); }
}

@keyframes floatLeft {
  0%, 100% { top: 48%; }
  50%       { top: 43%; }
}

@keyframes floatRight {
  0%, 100% { top: 48%; }
  50%       { top: 43%; }
}

.float-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  background: rgba(13, 7, 10, 0.9);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  z-index: 4;
}

.float-label.active-label {
  color: var(--gold);
  border-color: var(--gold-border);
}

/* ============================================================
   SECTION HEADERS & WORK FILTER
   ============================================================ */
section {
  padding: 90px var(--edge);
  position: relative;
}

.section-header {
  max-width: var(--container);
  margin: 0 auto 52px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 28px;
}

.section-title-wrap { max-width: 600px; }

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--crimson-vivid);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Quick Project Navigation */
.project-quick-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.quick-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26, 15, 20, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
  backdrop-filter: blur(8px);
}

.quick-nav-pill .quick-nav-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
}

.quick-nav-pill:hover {
  background: var(--burgundy);
  border-color: var(--rosewood);
  color: #FFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--glow-burgundy);
}

.quick-nav-pill:hover .quick-nav-num {
  color: #FFF;
}

/* ============================================================
   PROJECT CARDS — ECOSYSTEM CARDS
   ============================================================ */
.work-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.ecosystem-card {
  scroll-margin-top: 90px;
  background: linear-gradient(180deg, rgba(27, 16, 22, 0.88) 0%, rgba(15, 9, 12, 0.97) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.ecosystem-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9), 0 0 60px rgba(184, 51, 80, 0.08);
}

/* Top shimmer line */
.ecosystem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rosewood), var(--gold), transparent);
  opacity: 0.45;
}

/* ============================================================
   PROJECT LABEL & NUMBER BACKGROUND
   ============================================================ */
.project-num-bg {
  position: absolute;
  top: -16px;
  right: 28px;
  font-family: var(--font-display);
  font-size: clamp(110px, 14vw, 190px);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.035);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.05em;
}

.project-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.project-label-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold);
}

.project-label-sep {
  height: 1px;
  width: 56px;
  background: linear-gradient(90deg, var(--gold-border), transparent);
  flex-shrink: 0;
}

.project-label-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ============================================================
   ARCHITECTURE FLOW DIAGRAM
   ============================================================ */
.eco-arch-flow {
  margin: 0 0 32px;
  padding: 18px 22px;
  background: rgba(10, 5, 8, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  z-index: 1;
}

.arch-flow-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arch-flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.arch-flow-apps {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.arch-app-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 18px;
  background: rgba(27, 16, 22, 0.85);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  min-width: 110px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.arch-app-node:hover {
  border-color: var(--rosewood);
  transform: translateY(-2px);
}

.arch-app-icon { font-size: 22px; line-height: 1; }

.arch-app-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.arch-app-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.arch-flow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
}

.arch-connector-line {
  width: 2px;
  height: 24px;
  background: linear-gradient(180deg, var(--rosewood), var(--gold));
}

.arch-connector-arrow {
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
  margin-top: -2px;
}

.arch-flow-backend { width: 100%; }

.arch-backend-node {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(184, 51, 80, 0.12) 0%, rgba(10, 5, 8, 0.9) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--rosewood);
}

.arch-backend-icon { font-size: 28px; flex-shrink: 0; }

.arch-backend-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.arch-backend-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.5;
}

/* ============================================================
   ECOSYSTEM HEADER & ROLE SWITCHER
   ============================================================ */
.ecosystem-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.ecosystem-meta { max-width: 680px; }

.ecosystem-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ecosystem-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.ecosystem-pitch {
  font-size: 16.5px;
  color: var(--text-secondary);
  line-height: 1.62;
}

.ecosystem-actions { flex-shrink: 0; }

/* Role Switcher Tabs */
.role-switcher {
  display: flex;
  gap: 6px;
  background: rgba(10, 5, 8, 0.75);
  border: 1px solid var(--border-medium);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  width: fit-content;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.role-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.role-tab:hover { color: var(--text-primary); }

.role-tab.active {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--rosewood) 100%);
  color: #FFF;
  box-shadow: 0 4px 14px var(--glow-burgundy);
}

/* Role Content Panels */
.role-panel {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.role-panel.active { display: block; }

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

.role-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 960px) {
  .role-layout { grid-template-columns: 1fr; }
}

.role-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.role-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.role-desc {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.role-info-clean {
  margin-top: 18px;
  margin-bottom: 24px;
  max-width: 840px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-info-clean .role-title {
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.role-info-clean .role-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Feature Checkpoints */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.feature-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(216, 63, 97, 0.15);
  color: var(--crimson-vivid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Architecture Highlight Box */
.arch-box {
  background: rgba(10, 5, 8, 0.88);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.arch-box-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.arch-box-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.58;
}

.tech-tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold-light);
}

/* ============================================================
   DEVICE MOCKUPS (IPHONE 15 PRO & MAC DASHBOARD)
   ============================================================ */
.device-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Phone Mockup */
.phone-mockup {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 19.5;
  background: #000;
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 0 0 2px #26171E,
    0 0 0 4px #120A0E,
    0 25px 60px -15px rgba(0, 0, 0, 0.9),
    0 0 40px var(--glow-burgundy);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.phone-mockup:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 0 0 2px var(--rosewood),
    0 0 0 5px #120A0E,
    0 35px 70px -15px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(216, 63, 97, 0.4);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Inspection Overlay */
.inspect-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 7, 10, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
  z-index: 5;
  color: #FFF;
  font-size: 13px;
  font-weight: 600;
  border-radius: inherit;
}

.phone-mockup:hover .inspect-overlay,
.web-mockup:hover .inspect-overlay {
  opacity: 1;
}

.inspect-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--glow-burgundy);
}

/* Web Dashboard Mockup */
.web-mockup {
  position: relative;
  width: 100%;
  background: #140C10;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow:
    0 25px 60px -15px rgba(0, 0, 0, 0.9),
    0 0 35px var(--glow-burgundy);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.web-mockup:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: var(--rosewood);
}

.web-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1B1016;
  border-bottom: 1px solid var(--border-subtle);
}

.web-dots { display: flex; gap: 6px; }

.web-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.web-dots span:nth-child(1) { background: #FF5F56; }
.web-dots span:nth-child(2) { background: #FFBD2E; }
.web-dots span:nth-child(3) { background: #27C93F; }

.web-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.web-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  overflow: hidden;
}

.web-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Secondary Multi-device gallery strip */
.multi-screen-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.thumb-card {
  flex: 0 0 100px;
  height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #000;
}

.thumb-card:hover {
  border-color: var(--rosewood);
  transform: translateY(-3px) scale(1.03);
}

.thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   AI & COMPUTER VISION (ISHARA) — PIPELINE GRID
   ============================================================ */
.ai-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}

@media (max-width: 860px) { .ai-pipeline-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ai-pipeline-grid { grid-template-columns: 1fr; } }

.pipeline-step {
  background: rgba(10, 5, 8, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  transition: all 0.25s ease;
}

.pipeline-step:hover {
  border-color: var(--rosewood);
  transform: translateY(-2px);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(222, 198, 160, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 10px;
}

.step-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

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

/* ============================================================
   DEVICE TRIO STAGE — Staggered 3-Phone Cluster
   ============================================================ */
.device-trio-stage {
  position: relative;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0 16px;
  overflow: visible;
}

.trio-phone-wrap {
  position: absolute;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), z-index 0.1s;
  cursor: pointer;
}

.trio-phone-wrap .phone-mockup {
  max-width: 200px;
  width: 200px;
}

.trio-phone-wrap.center-phone {
  z-index: 3;
  transform: translateX(0) scale(1);
}

.trio-phone-wrap.left-phone {
  z-index: 2;
  transform: translateX(-160px) translateY(30px) scale(0.82) rotate(-4deg);
}

.trio-phone-wrap.right-phone {
  z-index: 2;
  transform: translateX(160px) translateY(30px) scale(0.82) rotate(4deg);
}

.trio-phone-wrap:hover {
  z-index: 5;
}

.trio-phone-wrap.center-phone:hover {
  transform: translateX(0) translateY(-8px) scale(1.03);
}

.trio-phone-wrap.left-phone:hover {
  transform: translateX(-160px) translateY(18px) scale(0.86) rotate(-2deg);
}

.trio-phone-wrap.right-phone:hover {
  transform: translateX(160px) translateY(18px) scale(0.86) rotate(2deg);
}

/* ============================================================
   WEB TRIO STAGE — 3 Admin Screenshots Side by Side
   ============================================================ */
.web-trio-stage {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 14px;
  align-items: center;
  margin: 36px 0 8px;
}

.web-trio-item {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.web-trio-left  { transform: perspective(900px) rotateY(6deg)  translateY(14px) scale(0.94); opacity: 0.82; }
.web-trio-center { transform: perspective(900px) rotateY(0deg)   translateY(0)   scale(1);    z-index: 2; }
.web-trio-right { transform: perspective(900px) rotateY(-6deg) translateY(14px) scale(0.94); opacity: 0.82; }

.web-trio-stage:hover .web-trio-left  { opacity: 1; transform: perspective(900px) rotateY(4deg)  translateY(10px) scale(0.96); }
.web-trio-stage:hover .web-trio-right { opacity: 1; transform: perspective(900px) rotateY(-4deg) translateY(10px) scale(0.96); }

@media (max-width: 860px) {
  .web-trio-stage {
    grid-template-columns: 1fr;
  }
  .web-trio-left, .web-trio-right {
    display: none;
  }
  .web-trio-center {
    transform: none;
  }
}

/* ============================================================
   SKILLS MODULES — REFINED ENGINEERING TAXONOMY
   ============================================================ */
.skills-modules-section {
  padding: 80px 0 100px;
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  scroll-margin-top: 90px;
}

.skills-modules-header {
  margin-bottom: 44px;
}

.modules-eyebrow-wrap {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}

.modules-eyebrow-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.modules-main-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.modules-main-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  font-family: 'Fraunces', Georgia, serif;
  margin-left: 4px;
}

.modules-main-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.68;
  max-width: 860px;
  margin-top: 14px;
}

.skills-modules-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 1300px) {
  .skills-modules-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 850px) {
  .skills-modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 580px) {
  .skills-modules-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.skill-module-card {
  background: rgba(18, 10, 15, 0.78);
  border: 1px solid rgba(222, 198, 160, 0.12);
  border-radius: 12px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.skill-module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(222, 198, 160, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(222, 198, 160, 0.05);
}

.module-card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-muted);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.module-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.module-card-desc {
  font-size: 12.8px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
  flex-grow: 1;
}

.module-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.mod-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(222, 198, 160, 0.03);
  border: 1px solid rgba(222, 198, 160, 0.2);
  color: #DEC6A0;
  white-space: nowrap;
  letter-spacing: -0.1px;
  transition: all 0.2s ease;
}

.skill-module-card:hover .mod-tag {
  border-color: rgba(222, 198, 160, 0.32);
}

.mod-tag:hover {
  background: rgba(222, 198, 160, 0.1);
  color: #FFF;
  border-color: rgba(222, 198, 160, 0.55);
}

/* ============================================================
   CAPABILITIES / SKILLS GRID (CONTACT PAGE REUSE)
   ============================================================ */
.skills-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 960px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

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

.skill-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--rosewood) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px var(--glow-burgundy);
}

.skill-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.skill-card-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ============================================================
   CONTACT & ABOUT
   ============================================================ */
.contact-container {
  max-width: var(--container);
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(27, 16, 22, 0.9) 0%, rgba(13, 7, 10, 0.95) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 5vw, 64px);
  box-shadow: 0 25px 60px -20px rgba(0, 0, 0, 0.8);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}

.contact-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(13, 7, 10, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.contact-row:hover {
  border-color: var(--rosewood);
  color: var(--text-primary);
  transform: translateX(4px);
}

.contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(216, 63, 97, 0.15);
  color: var(--crimson-vivid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.contact-row-text dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-muted);
}

.contact-row-text dd {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  max-width: var(--container);
  margin: 60px auto 30px;
  padding: 0 var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-faint);
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   LIGHTBOX MODAL
   ============================================================ */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 4, 6, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9);
  object-fit: contain;
}

.lightbox-caption {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(27, 16, 22, 0.9);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: var(--burgundy);
  border-color: var(--rosewood);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  section { padding: 60px var(--edge); }

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

  .hero-split {
    padding: 100px 24px 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .bento-flutter,
  .bento-multirole {
    grid-column: span 1;
    grid-row: span 1;
  }

  .ecosystem-title { font-size: 26px; }
  .ecosystem-card { border-radius: 20px; }

  .device-trio-stage { height: 340px; }

  .trio-phone-wrap .phone-mockup { max-width: 155px; width: 155px; }
  .trio-phone-wrap.left-phone  { transform: translateX(-120px) translateY(24px) scale(0.8) rotate(-4deg); }
  .trio-phone-wrap.right-phone { transform: translateX(120px)  translateY(24px) scale(0.8) rotate(4deg); }

  .site-nav .nav-links { display: none; }
}

@media (max-width: 480px) {
  .metrics-strip { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 38px; }
  .device-trio-stage { height: 280px; }
  .trio-phone-wrap .phone-mockup { max-width: 130px; width: 130px; }
  .trio-phone-wrap.left-phone  { transform: translateX(-90px)  translateY(20px) scale(0.78) rotate(-4deg); }
  .trio-phone-wrap.right-phone { transform: translateX(90px)   translateY(20px) scale(0.78) rotate(4deg); }
}
