/* ==========================================================================
   ARYAN'S DEN • AESTHETIC CHROMATIC PORTFOLIO & TELEMETRY
   Inspired by award-winning visual agency design with glass refraction
   ========================================================================== */

:root {
  --bg-deep: #060913;
  --bg-surface: rgba(14, 18, 28, 0.75);
  --text-main: #f5f7fa;
  --text-muted: #8e97a4;
  --text-dim: #545c69;
  
  /* Signature Video Colors */
  --accent-amber: #eaa827;       /* The golden serif accent */
  --accent-teal: #1bbca0;        /* Cyan-teal glow */
  --accent-magenta: #791c78;     /* Velvet magenta glow */
  --accent-blue: #14376e;        /* Deep oceanic blue glow */
  
  --font-display: 'Syne', -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body.inspiration-theme {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   FILM GRAIN & AMBIENT CHROMATIC GLOWS
   ========================================================================== */
.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
  transition: transform 1.2s ease-out;
}

.glow-blue {
  width: 65vw;
  height: 65vw;
  background: radial-gradient(circle, rgba(20, 55, 110, 0.75) 0%, rgba(6, 9, 19, 0) 70%);
  top: -15%;
  left: 10%;
}

.glow-magenta {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(121, 28, 120, 0.55) 0%, rgba(6, 9, 19, 0) 70%);
  top: 45%;
  left: -15%;
}

.glow-teal {
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(27, 188, 160, 0.35) 0%, rgba(6, 9, 19, 0) 70%);
  top: 40%;
  right: -10%;
}

.glow-amber {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(234, 168, 39, 0.25) 0%, rgba(6, 9, 19, 0) 70%);
  bottom: -10%;
  left: 20%;
}

/* ==========================================================================
   REFRACTION GLASS LENS (Signature Video Effect)
   ========================================================================== */
.refraction-lens {
  position: fixed;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 25;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px) contrast(1.15) brightness(1.1);
  -webkit-backdrop-filter: blur(2px) contrast(1.15) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 
    inset 0 0 24px rgba(255, 255, 255, 0.18),
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 35px rgba(27, 188, 160, 0.3),
    0 0 50px rgba(234, 168, 39, 0.2);
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

.lens-reflection {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 60%);
}

.lens-chromatic {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 45deg, rgba(255, 80, 80, 0.4), rgba(234, 168, 39, 0.5), rgba(27, 188, 160, 0.6), rgba(60, 120, 255, 0.5), rgba(255, 80, 80, 0.4));
  filter: blur(3px);
  opacity: 0.7;
  z-index: -1;
}

@media (hover: none) {
  .refraction-lens {
    display: none; /* Hide lens on pure touch devices for smooth mobile touch */
  }
}

/* ==========================================================================
   VIEWPORT WRAPPER & HEADER
   ========================================================================== */
.viewport-wrap {
  position: relative;
  z-index: 5;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 38px 0;
}

.brand-link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-decoration: none;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-item {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav-item:hover {
  color: var(--accent-amber);
}

.nav-status-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-status-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 8px var(--accent-teal);
}

/* ==========================================================================
   SECTION 1: HERO FOLD (Exact Match to Frame 01 & 08)
   ========================================================================== */
.hero-section {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8vh 0 6vh;
}

.hero-title-wrap {
  margin-top: 4vh;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 13vw, 12rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: #ffffff;
  user-select: none;
}

.hero-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.row-1 {
  gap: 0.28em;
}

.word-sans {
  font-family: var(--font-display);
  font-weight: 700;
}

.word-serif {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  color: var(--accent-amber);
  letter-spacing: -0.01em;
  margin-left: 0.25em;
  transform: translateY(-0.06em);
}

/* Bottom Metadata Grid */
.hero-footer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 32px;
  align-items: end;
  padding-top: 40px;
}

.meta-col {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
}

.meta-label {
  color: var(--text-main);
  font-weight: 600;
}

.meta-sub {
  color: var(--text-muted);
  font-weight: 500;
}

.col-scroll {
  text-align: right;
}

.scroll-arrow {
  color: var(--text-main);
  font-size: 1.4rem;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s ease;
}

.scroll-arrow:hover {
  transform: translateY(4px);
  color: var(--accent-amber);
}

/* ==========================================================================
   SECTION 2: WORK & PHILOSOPHY (Exact Match to Frame 04, 05, 06)
   ========================================================================== */
.work-section {
  min-height: 100vh;
  padding: 16vh 0 12vh;
  display: flex;
  align-items: center;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.work-statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}

.word-serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--accent-teal);
  letter-spacing: -0.01em;
}

.statement-meta {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 3D Stacked Deck Carousel */
.carousel-container {
  position: relative;
  perspective: 1200px;
}

.deck-wrapper {
  position: relative;
  height: 480px;
  width: 100%;
}

.deck-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 16, 24, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  transition: all 0.6s var(--ease-out-expo);
  user-select: none;
}

/* 3D Card Stack Transitions */
.deck-card.card-active {
  z-index: 3;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.deck-card.card-next-1 {
  z-index: 2;
  transform: translate3d(24px, -20px, -60px) scale(0.96);
  opacity: 0.75;
  filter: blur(1.5px);
}

.deck-card.card-next-2 {
  z-index: 1;
  transform: translate3d(48px, -40px, -120px) scale(0.92);
  opacity: 0.4;
  filter: blur(3px);
}

.card-top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 18px;
}

.card-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-main);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.card-action-btn:hover {
  background: var(--text-main);
  color: var(--bg-deep);
  transform: scale(1.08);
}

.card-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 24px;
}

.card-visual-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 20px;
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mockup-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-amber);
  margin-left: 8px;
}

.code-preview {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--accent-teal);
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.spec-tile {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-n {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-main);
}

.spec-l {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.defense-badge-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.defense-item {
  font-size: 0.82rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-caption h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-caption p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.carousel-dots {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  transform: scale(1.2);
}

/* ==========================================================================
   SECTION 3: FOOTER
   ========================================================================== */
.site-footer {
  padding: 12vh 0 6vh;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.footer-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
}

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

.footer-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent-amber);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.server-pill-link {
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.server-pill-link:hover {
  color: var(--accent-teal);
}

/* ==========================================================================
   RESTFUL HIDDEN ADMIN HUD DRAWER (API-Protected Server Controls)
   ========================================================================== */
.admin-hud-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.admin-hud-drawer.active {
  pointer-events: auto;
  visibility: visible;
}

.hud-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.admin-hud-drawer.active .hud-backdrop {
  opacity: 1;
}

.hud-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 620px;
  height: 100%;
  background: rgba(10, 14, 22, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 36px 32px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out-expo);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.7);
}

.admin-hud-drawer.active .hud-panel {
  transform: translateX(0);
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 20px;
}

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

.hud-symbol {
  font-size: 24px;
  color: var(--accent-amber);
}

.hud-brand h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.hud-brand p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hud-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.hud-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

/* HUD Auth Form */
.hud-auth-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
  margin-top: 20px;
}

.hud-auth-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.hud-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 14px;
  outline: none;
}

.hud-input:focus {
  border-color: var(--accent-teal);
}

.hud-btn {
  width: 100%;
  background: var(--accent-teal);
  color: #060913;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.hud-btn:hover {
  opacity: 0.9;
}

.hud-error {
  color: var(--accent-alert);
  font-size: 0.8rem;
  margin-top: 10px;
}

/* Quick Telemetry Strip */
.hud-stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.hud-stat-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px;
}

.hud-stat-l {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 4px;
}

.hud-stat-v {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}

.hud-section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-amber);
  margin: 24px 0 12px;
}

.hud-action-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hud-action-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-action-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.hud-terminal-bar {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px 14px;
  gap: 10px;
}

.hud-prompt-symbol {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-teal);
  white-space: nowrap;
}

.hud-term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.hud-btn-small {
  background: var(--accent-amber);
  color: #000;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}

.hud-console {
  background: #04060a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-top: 14px;
  padding: 14px;
}

.hud-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hud-console-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.hud-console-output {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 280px;
  overflow-y: auto;
  color: #e2e8f0;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Seamless on Phones & Tablets)
   ========================================================================== */
@media (max-width: 900px) {
  .viewport-wrap {
    padding: 0 24px;
  }

  .site-header {
    padding: 24px 0;
  }

  .header-nav {
    gap: 16px;
  }

  .hero-footer-meta {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .deck-wrapper {
    height: 420px;
  }
}
