/* ==========================================================================
   MU'ARIF SUKMA JAYA — PRINCIPAL PORTFOLIO STYLESHEET
   Design Theme: Dark Technical Grid & High-End Editorial Typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Color Themes
   -------------------------------------------------------------------------- */
:root {
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, monospace;

  /* Default Dark Mode Palette */
  --bg-base: #06070a;
  --bg-surface: #0d0f15;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(6, 182, 212, 0.4);
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --navbar-bg: rgba(6, 7, 10, 0.85);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.light-theme {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.025);
  --bg-card-hover: rgba(0, 0, 0, 0.05);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(8, 145, 178, 0.4);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --accent-cyan: #0891b2;
  --accent-cyan-glow: rgba(8, 145, 178, 0.15);
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  --navbar-bg: rgba(248, 250, 252, 0.85);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Technical Grid & Ambient Noise Overlay */
.technical-grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 35%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, black 40%, transparent 85%);
  opacity: 0.6;
}

.ambient-spotlight {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 15%, var(--accent-cyan-glow) 0%, transparent 60%);
  opacity: 0.7;
}

/* Selection */
::selection {
  background: var(--accent-cyan);
  color: #000000;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-sans {
  font-family: var(--font-sans);
}

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

/* Container */
.container {
  width: 92%;
  max-width: 1240px;
  margin: 0 auto;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 4.5rem 0;
  }
}

/* --------------------------------------------------------------------------
   3. Preloader & Scroll Progress
   -------------------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), #38bdf8);
  z-index: 9999;
  transition: width 0.1s linear;
}

#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
}

.preloader-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  text-align: center;
}

.preloader-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.preloader-bar {
  width: 140px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.preloader-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: preloaderLineAnim 1.4s infinite ease-in-out;
}

.preloader-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@keyframes preloaderLineAnim {
  0% { left: -40%; width: 30%; }
  50% { left: 30%; width: 50%; }
  100% { left: 100%; width: 30%; }
}

/* Custom Dynamic Cursor */
.custom-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.25s ease, height 0.25s ease, background 0.25s ease;
  box-shadow: 0 0 15px var(--accent-cyan);
}

.custom-cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1), border-color 0.25s ease;
}

.custom-cursor.hovering {
  width: 24px;
  height: 24px;
  background: rgba(6, 182, 212, 0.3);
  backdrop-filter: blur(2px);
}

.custom-cursor-follower.hovering {
  width: 54px;
  height: 54px;
  border-color: var(--accent-cyan);
}

@media (hover: none) and (pointer: coarse) {
  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   4. Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  cursor: pointer;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              background 0.2s ease;
}

.brand-badge:hover {
  transform: scale(1.08);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px var(--accent-cyan);
}

.brand-badge:active {
  transform: scale(0.92);
}

.brand-info h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.brand-info span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: all var(--transition-normal);
}

.nav-links a:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.nav-links a.active {
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.palette-toggle-btn, .theme-toggle-btn, .mobile-menu-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.palette-toggle-btn:hover, .theme-toggle-btn:hover, .mobile-menu-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Designer Accent Palette Color Modes */
body.palette-amber {
  --accent-cyan: #ff9a00;
  --accent-cyan-glow: rgba(255, 154, 0, 0.25);
  --border-active: rgba(255, 154, 0, 0.45);
}

body.palette-violet {
  --accent-cyan: #a855f7;
  --accent-cyan-glow: rgba(168, 85, 247, 0.25);
  --border-active: rgba(168, 85, 247, 0.45);
}

body.palette-emerald {
  --accent-cyan: #10b981;
  --accent-cyan-glow: rgba(16, 185, 129, 0.25);
  --border-active: rgba(16, 185, 129, 0.45);
}

.mobile-menu-btn {
  display: none;
}

/* Mobile Nav Drawer */
@media (max-width: 868px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-base);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-120%);
    transition: transform var(--transition-normal);
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   5. Hero Section & Critical Lanyard Layout
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: calc(100vh - 75px);
  display: flex;
  align-items: center;
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  z-index: 10;
}

/* Status Badges */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent-emerald);
  opacity: 0.6;
  animation: pingAnimation 1.8s infinite;
}

@keyframes pingAnimation {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.archive-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.archive-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--text-dim);
}

/* Main Hero Typography & Typewriter Control */
.hero-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 160px;
}

.hero-title {
  font-size: 3.85rem;
  line-height: 1.08;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.typewriter-cursor-box {
  display: inline-block;
  margin-left: 0.2rem;
  vertical-align: baseline;
}

.typewriter-pen-icon {
  font-size: 1.35rem;
  color: var(--accent-cyan);
  animation: penPulse 1s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px var(--accent-cyan-glow));
}

@keyframes penPulse {
  0% { transform: rotate(-12deg) scale(0.9); opacity: 0.7; }
  100% { transform: rotate(8deg) scale(1.15); opacity: 1; }
}

.typewriter-cursor {
  font-weight: 200;
  color: var(--accent-cyan);
  animation: cursorBlink 0.75s infinite;
  display: inline-block;
  line-height: 1;
}

@keyframes cursorBlink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-style: italic;
  color: var(--accent-cyan);
  font-weight: 600;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.specialties-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.specialty-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.specialty-pill:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.hero-quote {
  border-left: 2px solid var(--accent-cyan);
  padding-left: 1.1rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

/* Interactive Software Toolkit Deck */
.software-toolkit-deck {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.4rem 0 0.8rem 0;
}

.toolkit-deck-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}

.toolkit-deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.software-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.software-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: transparent;
  transition: background 0.25s ease;
}

.software-card[data-tool="photoshop"]::before { background: #31a8ff; }
.software-card[data-tool="illustrator"]::before { background: #ff9a00; }
.software-card[data-tool="alight-motion"]::before { background: #00e5ff; }

.software-card:hover, .software-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-active);
  background: var(--bg-card);
}

.software-card[data-tool="photoshop"]:hover {
  box-shadow: 0 8px 24px -6px rgba(49, 168, 255, 0.28);
  border-color: rgba(49, 168, 255, 0.5);
}

.software-card[data-tool="illustrator"]:hover {
  box-shadow: 0 8px 24px -6px rgba(255, 154, 0, 0.28);
  border-color: rgba(255, 154, 0, 0.5);
}

.software-card[data-tool="alight-motion"]:hover {
  box-shadow: 0 8px 24px -6px rgba(0, 229, 255, 0.28);
  border-color: rgba(0, 229, 255, 0.5);
}

.software-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.software-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  font-family: var(--font-sans);
  transition: transform 0.25s ease;
}

.software-card:hover .software-icon-box {
  transform: scale(1.1) rotate(-3deg);
}

.ps-box {
  background: #001e36;
  border: 1.5px solid #31a8ff;
  color: #31a8ff;
  box-shadow: 0 0 10px rgba(49, 168, 255, 0.2);
}

.ai-box {
  background: #330000;
  border: 1.5px solid #ff9a00;
  color: #ff9a00;
  box-shadow: 0 0 10px rgba(255, 154, 0, 0.2);
}

.am-box {
  background: #00222a;
  border: 1.5px solid #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.am-official-logo {
  width: 22px;
  height: 22px;
  color: #00e5ff;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.5));
  transition: transform 0.35s ease;
}

.software-card:hover .am-official-logo {
  transform: rotate(45deg) scale(1.1);
}

.software-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.software-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.software-spec {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.software-action-hint {
  color: var(--text-dim);
  font-size: 0.75rem;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.software-card:hover .software-action-hint {
  opacity: 1;
  color: var(--accent-cyan);
  transform: translateX(2px);
}

/* ==========================================================================
   Dedicated Software Mastery & Fluctuating Calibration Section
   ========================================================================== */
.software-proficiency-deck {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.proficiency-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.proficiency-deck-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.proficiency-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.proficiency-bars-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.proficiency-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: all 0.25s ease;
}

.proficiency-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.1);
}

.proficiency-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.proficiency-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prof-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.prof-tag.ps-tag {
  background: #001e36;
  color: #31a8ff;
  border: 1px solid rgba(49, 168, 255, 0.3);
}

.prof-tag.am-tag {
  background: #00222a;
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.prof-tag.ai-tag {
  background: #330000;
  color: #ff9a00;
  border: 1px solid rgba(255, 154, 0, 0.3);
}

.prof-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.prof-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proficiency-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.software-meter-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0%, #ffffff 100%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
  position: relative;
  width: 0%;
}

.software-meter-bar.bar-photoshop {
  animation: calibratePs 2.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.software-meter-bar.bar-alight-motion {
  animation: calibrateAm 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.software-meter-bar.bar-illustrator {
  animation: calibrateAi 2.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes calibratePs {
  0%   { width: 0%; }
  20%  { width: 95%; }
  42%  { width: 48%; }
  62%  { width: 92%; }
  78%  { width: 80%; }
  88%  { width: 87%; }
  100% { width: 85%; }
}

@keyframes calibrateAm {
  0%   { width: 0%; }
  20%  { width: 84%; }
  42%  { width: 38%; }
  62%  { width: 75%; }
  78%  { width: 60%; }
  88%  { width: 68%; }
  100% { width: 65%; }
}

@keyframes calibrateAi {
  0%   { width: 0%; }
  20%  { width: 72%; }
  42%  { width: 28%; }
  62%  { width: 64%; }
  78%  { width: 50%; }
  88%  { width: 58%; }
  100% { width: 55%; }
}

/* Call to Action Buttons */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-normal);
  outline: none;
  border: none;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-base);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--border-active);
  color: var(--text-main);
  transform: translateY(-2px);
}

/* ==========================================================================
   CRITICAL CSS FIX: Interactive Lanyard Positioning Architecture
   ========================================================================== */
.hero-lanyard-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 600px;
  z-index: 20;
}

.lanyard-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 130px;
  user-select: none;
  -webkit-user-select: none;
}

/* The SVG Strap Canvas */
.lanyard-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 15;
}

/* Interactive Badge Entity - LOCKED DEAD CENTER VERTICAL ALIGNMENT */
.lanyard-badge-entity {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 306px;
  margin: 0 auto;
  z-index: 30;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  transform-origin: 50% 0px; /* PIVOT LOCKED PRECISELY TO TOP CENTER HOLE */
  transition: filter 0.2s ease;
}

.lanyard-badge-entity.is-dragging {
  cursor: grabbing;
}

/* Dynamic Physical Shadow beneath card (Soft, subtle, theme-adaptive) */
.lanyard-shadow-element {
  position: absolute;
  inset: -10px;
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
  transform-origin: 50% 0px;
  transition: transform 0.1s ease, background 0.3s ease, filter 0.3s ease;
}

body.light-theme .lanyard-shadow-element {
  background: rgba(0, 0, 0, 0.06);
  filter: blur(14px);
}

/* Clasp Assembly - DEAD CENTER ON TOP OF VINYL TAB */
.clasp-assembly {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto -10px auto;
  z-index: 40;
  pointer-events: none;
}

.clasp-svg {
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
}

body.light-theme .clasp-svg {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

/* Vinyl Tab with Triple Holes - DEAD CENTER ON TOP OF CARD */
.vinyl-tab {
  position: relative;
  width: 160px;
  height: 28px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 25;
  margin: 0 auto -1px auto;
  backdrop-filter: blur(8px);
}

body.light-theme .vinyl-tab {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  border-color: rgba(0, 0, 0, 0.12);
}

.punch-hole-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

body.light-theme .punch-hole-circle {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.punch-hole-slot {
  position: relative;
  width: 44px;
  height: 12px;
  border-radius: 999px;
  background: var(--bg-base);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-theme .punch-hole-slot {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.hook-through-slot {
  width: 16px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4b5563, #1f2937);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Frosted Card Sleeve & 3D Double Sided Flip Container */
.matte-sleeve {
  position: relative;
  width: 306px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  perspective: 1200px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

body.light-theme .matte-sleeve {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.matte-sleeve-inner {
  position: relative;
  width: 290px;
  height: 420px;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.matte-sleeve-inner.flipped {
  transform: rotateY(180deg);
}

/* Card Faces: Front (Portrait) & Back (DKV Student ID) */
.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-face-front {
  transform: rotateY(0deg);
  background: #090a0f;
}

.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  display: block;
}

/* Card Face Back: Verified SMK TI Annisa 2 DKV Student ID */
.card-face-back {
  transform: rotateY(180deg);
  background: linear-gradient(155deg, #0d111a 0%, #111624 50%, #0a0d14 100%);
  border: 1.5px solid rgba(0, 240, 255, 0.3);
  padding: 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-main);
  box-shadow: inset 0 0 25px rgba(0, 240, 255, 0.06);
}

.id-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.id-org-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}

.id-chip-graphic {
  width: 32px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 50%, #ffd700 100%);
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.3);
}

.chip-contact {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.3);
}

.id-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0.3rem 0;
}

.id-name {
  font-family: var(--font-sans);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}

.id-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}

.id-specs-table {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.id-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.id-spec-row span {
  color: var(--text-dim);
}

.id-spec-row strong {
  color: var(--text-main);
}

.id-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  gap: 0.75rem;
}

.id-barcode-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.barcode-lines {
  height: 22px;
  width: 140px;
  background: repeating-linear-gradient(
    90deg,
    #ffffff 0px,
    #ffffff 2px,
    transparent 2px,
    transparent 4px,
    #ffffff 4px,
    #ffffff 7px,
    transparent 7px,
    transparent 9px,
    #ffffff 9px,
    #ffffff 10px,
    transparent 10px,
    transparent 13px
  );
  opacity: 0.85;
}

.barcode-text {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.id-qr-box {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #ffffff;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.id-qr-box svg {
  width: 100%;
  height: 100%;
}

/* Lanyard Flip Action Button */
.lanyard-flip-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.lanyard-flip-btn:hover {
  background: var(--accent-cyan);
  color: #090a0f;
  border-color: var(--accent-cyan);
  transform: scale(1.05);
}

.lanyard-flip-btn i {
  font-size: 0.75rem;
  transition: transform 0.4s ease;
}

.lanyard-flip-btn:hover i {
  transform: rotate(180deg);
}

/* Subtle Matte White Specular Glare (NO rainbow/hologram) */
.specular-glare {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
  z-index: 35;
  background: radial-gradient(circle 280px at 50% 50%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}



/* Mobile & Tablet Bug Fix Rules for Lanyard */
@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  /* CRITICAL: Do NOT let lanyard float or span into text! */
  .hero-lanyard-wrapper {
    margin-top: 1rem;
    min-height: auto;
    justify-content: center;
  }

  .lanyard-container {
    height: 540px;
    padding-top: 80px;
    transform: scale(0.88);
    transform-origin: top center;
  }
}

@media (max-width: 520px) {
  .hero-title {
    font-size: 2.35rem;
  }

  .lanyard-container {
    height: 480px;
    padding-top: 70px;
    transform: scale(0.78);
    transform-origin: top center;
  }
}

/* --------------------------------------------------------------------------
   6. Infinite Marquee Ticker
   -------------------------------------------------------------------------- */
.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
  display: flex;
  user-select: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: scrollMarquee 32s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.marquee-item span.bullet {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

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

/* --------------------------------------------------------------------------
   7. Section Headers
   -------------------------------------------------------------------------- */
.section-header {
  margin-bottom: 3.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.section-tag::before {
  content: '//';
  font-weight: 700;
}

.section-title {
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
}

/* --------------------------------------------------------------------------
   8. About Section & Skill Pillars
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: start;
}

.about-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.about-portrait-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.about-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.about-card:hover .about-portrait-wrap img {
  transform: scale(1.03);
}

.quick-details {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-row .label {
  color: var(--text-dim);
}

.detail-row .value {
  color: var(--text-main);
  font-weight: 500;
}

/* About Narrative */
.about-narrative {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.bio-paragraph {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.vision-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(6, 182, 212, 0.02) 100%);
  border: 1px solid var(--border-active);
  position: relative;
}

.vision-card h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.6rem;
  font-style: normal;
}

.vision-card p {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* 4 Skill Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.pillar-item {
  padding: 1.4rem;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.pillar-item:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.pillar-header i {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

.pillar-header h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  font-style: normal;
  margin: 0;
}

.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pillar-list li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pillar-list li::before {
  content: '•';
  color: var(--accent-cyan);
}

@media (max-width: 868px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   9. Experience & Education Timeline
   -------------------------------------------------------------------------- */
.experience-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.experience-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.block-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 17px;
  width: 1px;
  background: var(--border-subtle);
}

.timeline-card {
  position: relative;
  display: flex;
  gap: 1.4rem;
  min-width: 0;
}

.timeline-bullet {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.timeline-bullet.active {
  background: var(--accent-cyan-glow);
  border-color: var(--accent-cyan);
}

.timeline-content {
  flex: 1;
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.4rem;
  overflow-wrap: anywhere;
  transition: all var(--transition-normal);
}

.timeline-content:hover {
  border-color: var(--border-active);
  transform: translateX(4px);
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.timeline-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  font-style: normal;
}

.timeline-role {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

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

@media (max-width: 868px) {
  .experience-container {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   10. Featured Works & Lightbox
   -------------------------------------------------------------------------- */
.works-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--border-active);
}

.filter-btn.active {
  background: var(--accent-cyan-glow);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

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

.work-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-card);
}

.work-card:hover {
  border-color: var(--border-active);
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.work-card.wide-card {
  grid-column: span 3;
}

.work-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #000000;
  cursor: zoom-in;
}

.work-card.wide-card .work-media-wrap {
  aspect-ratio: 16/9;
  max-height: 480px;
}

.work-media-wrap img, .work-media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.work-card:hover .work-media-wrap img {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.work-card:hover .media-overlay {
  opacity: 1;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #ffffff;
}

.work-meta {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.work-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.work-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: normal;
  margin: 0;
}

.work-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.2rem;
}

@media (max-width: 991px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .work-card.wide-card {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
  .work-card.wide-card {
    grid-column: span 1;
  }
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 2rem;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

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

.lightbox-actions-bar {
  position: absolute;
  top: -45px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-tool-btn, .lightbox-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.4rem;
  transition: transform var(--transition-normal), color var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-tool-btn:hover {
  transform: scale(1.15);
  color: var(--accent-cyan);
}

.lightbox-close-btn:hover {
  transform: scale(1.15) rotate(90deg);
  color: var(--accent-cyan);
}

.lightbox-media {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-in;
}

.lightbox-media.is-zoomed {
  transform: scale(1.85);
  cursor: zoom-out;
}

.lightbox-caption {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   11. Contact Section
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.contact-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.contact-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-cyan-glow);
  border: 1px solid var(--border-active);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-card-content h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  font-style: normal;
  margin-bottom: 0.2rem;
  overflow-wrap: anywhere;
}

.contact-card-content p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Contact Form */
.contact-form-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.2rem;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition-normal);
  outline: none;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

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

/* --------------------------------------------------------------------------
   12. Footer & Floating Back to Top
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0 calc(2.8rem + env(safe-area-inset-bottom, 24px));
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

#back-to-top {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 16px));
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all var(--transition-normal);
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-3px);
}

/* Fluid Upward Morphing Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(42px) scale(0.975);
  filter: blur(4px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ==========================================================================
   13. Tool Inspector Modal (Designer HUD Telemetry)
   ========================================================================== */
.tool-inspector-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 12000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-inspector-modal.active {
  opacity: 1;
  visibility: visible;
}

.tool-modal-dialog,
.tool-inspector-dialog {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tool-inspector-modal.active .tool-modal-dialog,
.tool-inspector-modal.active .tool-inspector-dialog {
  transform: scale(1) translateY(0);
}

.tool-modal-header,
.tool-inspector-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  padding-right: 2.5rem;
}

.tool-modal-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tool-modal-icon,
.tool-header-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  font-family: var(--font-sans);
  flex-shrink: 0;
}

.tool-inspector-title,
.tool-modal-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.tool-inspector-sub,
.tool-modal-title-group p {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.tool-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.tool-modal-close:hover {
  background: var(--border-subtle);
  color: var(--text-main);
  transform: rotate(90deg);
}

.tool-inspector-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.tool-footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.tool-modal-body,
.tool-inspector-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.telemetry-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.telemetry-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.interactive-preview-canvas {
  width: 100%;
  height: 130px;
  border-radius: 12px;
  background: #090c12;
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-element {
  width: 100%;
  height: 100%;
}

.telemetry-tag-section h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.telemetry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.telemetry-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* ==========================================================================
   14. Fluid Upward Morphing Staggered Elements & Smooth Scroll
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 85px;
}

.work-card.reveal,
.works-grid .work-card,
.timeline-item,
.contact-card,
.stat-box {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  filter: blur(4px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  will-change: opacity, transform, filter;
}

.work-card.reveal.active,
.works-grid .work-card.active,
.reveal.active .work-card,
.timeline-item.active,
.reveal.active .timeline-item,
.contact-card.active,
.reveal.active .contact-card,
.stat-box.active,
.reveal.active .stat-box {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  filter: blur(0) !important;
}

.works-grid .work-card:nth-child(1) { transition-delay: 0.04s; }
.works-grid .work-card:nth-child(2) { transition-delay: 0.12s; }
.works-grid .work-card:nth-child(3) { transition-delay: 0.20s; }
.works-grid .work-card:nth-child(4) { transition-delay: 0.28s; }
.works-grid .work-card:nth-child(5) { transition-delay: 0.36s; }
.works-grid .work-card:nth-child(6) { transition-delay: 0.44s; }

/* Interactive Brand Color Swatches on Work Cards */
.work-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.work-palette-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.color-swatch-chip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  outline: none;
}

.color-swatch-chip:hover {
  transform: scale(1.4);
  box-shadow: 0 0 10px var(--swatch);
  border-color: #ffffff;
}

/* Palette Copy Toast Notification */
.swatch-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  background: rgba(6, 7, 10, 0.94);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--accent-cyan-glow);
  color: var(--text-main);
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 15000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.swatch-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.swatch-toast-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   15. Comprehensive Mobile & Tablet Layout Perfection (UI/UX Balance)
   ========================================================================== */
@media (max-width: 991px) {
  /* Prevent horizontal overflow completely */
  html, body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100dvh;
  }

  .container {
    padding: 0 1.5rem;
  }

  .hero-section {
    min-height: auto;
    padding: 2.5rem 0 3.5rem;
  }

  /* Hero Section Balancing */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 620px;
  }

  .badge-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  .archive-label {
    text-align: center;
  }

  .hero-title {
    font-size: 2.85rem;
    line-height: 1.1;
    text-align: center;
  }

  .hero-subtitle {
    text-align: center;
  }

  .specialties-list {
    justify-content: center;
  }

  .hero-quote {
    text-align: center;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 0;
    max-width: 500px;
    margin: 0.5rem auto;
  }

  .software-toolkit-deck {
    width: 100%;
    max-width: 500px;
    margin: 0.5rem auto 1rem auto;
  }

  .toolkit-deck-label {
    justify-content: center;
  }

  .hero-cta-group {
    justify-content: center;
    width: 100%;
  }

  .hero-lanyard-wrapper {
    margin-top: 0.5rem;
    min-height: auto;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .lanyard-container {
    height: 520px;
    padding-top: 60px;
    transform: scale(0.85);
    transform-origin: top center;
    margin: 0 auto;
  }

  /* About & Experience Sections */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .timeline {
    padding-left: 1rem;
  }

  /* Works Section */
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Contact Section */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Footer safe area */
  .footer {
    padding: 2.5rem 0 calc(3rem + env(safe-area-inset-bottom, 24px));
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.15rem;
  }

  .hero-title-wrapper {
    min-height: 140px;
  }

  .hero-title {
    font-size: 2.15rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .typewriter-pen-icon {
    font-size: 1.1rem;
  }

  /* Stacking Software Cards for perfect readability on small phones */
  .toolkit-deck-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .software-card {
    padding: 0.75rem 0.95rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .lanyard-container {
    height: 480px;
    padding-top: 45px;
    transform: scale(0.76);
    transform-origin: top center;
  }

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

  .portfolio-filters {
    gap: 0.4rem;
    justify-content: center;
  }

  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.74rem;
  }

  /* Footer & Back to Top - Completely prevents UI bottom cutoff on phones */
  .footer {
    padding: 2.2rem 0 calc(3.5rem + env(safe-area-inset-bottom, 28px));
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  #back-to-top {
    bottom: calc(18px + env(safe-area-inset-bottom, 16px));
    right: 18px;
    width: 40px;
    height: 40px;
  }

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

/* ==========================================================================
   16. Complete Works Archive CTA Banner in Index.html
   ========================================================================== */
.works-archive-cta {
  margin-top: 3.5rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(13, 15, 21, 0.95) 100%);
  border: 1px solid var(--border-active);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.works-archive-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.archive-cta-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 680px;
  z-index: 1;
}

.archive-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-cta-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  margin: 0;
  color: var(--text-main);
  line-height: 1.2;
}

.archive-cta-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.archive-cta-right {
  z-index: 1;
  flex-shrink: 0;
}

.archive-cta-btn {
  padding: 0.9rem 1.8rem;
  font-size: 0.88rem;
  border-radius: 12px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .works-archive-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.6rem 1.4rem;
    gap: 1.5rem;
  }
  .archive-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   17. Media Protection Shield & Native Aspect Ratio Preservation
   ========================================================================== */
.media-protection-shield {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  pointer-events: none;
  -webkit-touch-callout: none;
  user-select: none;
}

img, video {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media print {
  body {
    display: none !important;
  }
}

/* ==========================================================================
   18. Chameleon Designer Palette Tuner Popover
   ========================================================================== */
.palette-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.palette-tuner-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
}

.palette-tuner-popover.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.tuner-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tuner-presets-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tuner-preset-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  padding: 0;
}

.tuner-preset-chip:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px var(--c);
}

.tuner-preset-chip.active {
  border-color: #ffffff;
  box-shadow: 0 0 14px var(--c);
  transform: scale(1.12);
}

.tuner-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-subtle);
}

.tuner-custom-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  margin: 0;
}

.tuner-color-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 34px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.tuner-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.tuner-color-input::-webkit-color-swatch {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.tuner-reset-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tuner-reset-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-active);
}

/* ==========================================================================\n+   19. Fluid Layout System\n+   ========================================================================== */
:root {
  --page-gutter: clamp(1rem, 4vw, 3rem);
  --section-space: clamp(3.5rem, 8vw, 6.5rem);
}

html {
  overflow-x: clip;
}

body {
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

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

.container {
  width: min(100% - (var(--page-gutter) * 2), 77.5rem);
  max-width: none;
  min-width: 0;
}

.section {
  padding-block: var(--section-space);
}

.nav-container {
  gap: clamp(0.75rem, 3vw, 2rem);
}

.nav-brand,
.nav-actions,
.hero-content,
.hero-grid > *,
.about-grid > *,
.experience-container > *,
.contact-grid > * {
  min-width: 0;
}

.nav-brand {
  flex: 1 1 auto;
}

.brand-info {
  min-width: 0;
}

.brand-info h2,
.brand-info span,
.nav-links a,
.status-chip,
.specialty-pill,
.archive-label,
.block-title,
.section-tag,
.proficiency-deck-label,
.proficiency-telemetry-badge {
  overflow-wrap: anywhere;
}

.brand-info h2,
.brand-info span {
  max-width: 100%;
}

.hero-grid,
.about-grid,
.experience-container,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-grid {
  gap: clamp(2rem, 5vw, 3.5rem);
}

.hero-title {
  font-size: clamp(2.15rem, 5vw, 3.85rem);
  overflow-wrap: anywhere;
}

.hero-subtitle,
.section-title,
.archive-cta-title {
  overflow-wrap: anywhere;
}

.toolkit-deck-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.software-card,
.software-card-top,
.proficiency-meta,
.proficiency-name-wrap,
.software-info {
  min-width: 0;
}

.software-card-top,
.proficiency-meta {
  flex-wrap: wrap;
}

.software-name,
.software-spec,
.prof-sub {
  white-space: normal;
  overflow-wrap: anywhere;
}

.hero-cta-group .btn,
.archive-cta-btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.hero-lanyard-wrapper {
  min-width: 0;
  min-height: clamp(30rem, 56vw, 37.5rem);
}

.lanyard-container {
  width: min(100%, 25rem);
  height: clamp(30rem, 58vw, 40rem);
  padding-top: clamp(4rem, 10vw, 8.125rem);
}

.lanyard-badge-entity,
.matte-sleeve {
  width: min(100%, 19.125rem);
}

.matte-sleeve-inner {
  width: 100%;
  height: auto;
  aspect-ratio: 290 / 420;
}

.matte-sleeve-inner,
.card-face {
  min-width: 0;
}

.works-archive-cta {
  padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1.15rem, 4vw, 2.5rem);
}

.archive-cta-left {
  min-width: 0;
}

@media (max-width: 62rem) {
  .hero-section {
    min-height: auto;
    padding-block: clamp(2.5rem, 7vw, 4rem) clamp(3.5rem, 8vw, 5rem);
  }

  .hero-grid,
  .about-grid,
  .experience-container,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-content {
    max-width: 40rem;
    margin-inline: auto;
  }

  .hero-content,
  .hero-title,
  .hero-subtitle,
  .archive-label,
  .hero-quote {
    text-align: center;
  }

  .badge-row,
  .specialties-list,
  .hero-cta-group {
    justify-content: center;
  }

  .hero-quote {
    border-left: 0;
    border-block: 1px solid var(--border-subtle);
    padding: 0.85rem 0;
  }

  .hero-lanyard-wrapper {
    min-height: auto;
  }

  .lanyard-container {
    transform: scale(clamp(0.78, 22vw, 0.92));
    transform-origin: top center;
    margin-bottom: calc((1 - clamp(0.78, 22vw, 0.92)) * -22rem);
  }
}

@media (max-width: 40rem) {
  .container {
    width: min(100% - 2rem, 77.5rem);
  }

  .nav-container {
    padding-block: 0.8rem;
  }

  .brand-info span {
    display: none;
  }

  .nav-actions {
    gap: 0.4rem;
  }

  .custom-cursor,
  .custom-cursor-follower {
    display: none !important;
  }

  .palette-tuner-popover {
    left: 50%;
    right: auto;
    width: min(16.25rem, calc(100vw - 2rem));
    transform: translate(-50%, -0.5rem) scale(0.96);
  }

  .palette-tuner-popover.open {
    transform: translate(-50%, 0) scale(1);
  }

  .toolkit-deck-grid,
  .pillars-grid,
  .telemetry-grid,
  .works-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-title-wrapper {
    min-height: 0;
  }

  .hero-subtitle {
    font-size: clamp(1.2rem, 5vw, 1.65rem);
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .lanyard-container {
    width: 100%;
    height: 30rem;
    padding-top: 3rem;
    transform: scale(clamp(0.68, 22vw, 0.78));
    margin-bottom: -8rem;
  }

  .proficiency-meta {
    align-items: flex-start;
  }

  .prof-sub {
    flex-basis: 100%;
    text-align: left;
  }

  .works-archive-cta {
    align-items: stretch;
  }

  .archive-cta-btn {
    width: 100%;
  }
}

@media (max-width: 22.5rem) {
  .container {
    width: min(100% - 1.5rem, 77.5rem);
  }

  .status-chip {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .lanyard-container {
    transform: scale(0.68);
    margin-bottom: -10rem;
  }
}

