/* ═══════════════════════════════════════════════════════════
   DESIGN SYSTEM — CSS VARIABLES
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Portfolio palette */
  --navy:           #0a0f1e;
  --navy-2:         #0d1528;
  --navy-3:         #111d35;
  --navy-4:         #162040;
  --teal:           #00d4aa;
  --teal-dim:       #00b898;
  --teal-muted:     rgba(0, 212, 170, 0.12);
  --teal-glow:      rgba(0, 212, 170, 0.06);
  --teal-border:    rgba(0, 212, 170, 0.25);
  --text-primary:   #f0f4ff;
  --text-secondary: #8892b0;
  --text-muted:     #4a5568;
  --border:         rgba(255, 255, 255, 0.06);
  --border-hover:   rgba(255, 255, 255, 0.12);
  --card-bg:        rgba(13, 21, 40, 0.75);
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --transition:     0.3s var(--ease-out);

  /* Hero-specific palette */
  --hero-bg:        #0d0d0d;
  --hero-dot:       rgba(255,255,255,0.07);
  --hero-white:     #f0ede8;
  --ghost-bg:       #7c6af7;
  --warn-bg:        #ff4d6d;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

section {
  padding: 120px 0;
}

/* ═══════════════════════════════════════════════════════════
   HERO — INTERACTIVE PRISM
   ═══════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--hero-bg);
  background-image: radial-gradient(var(--hero-dot) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 0;
}

/* Prism wrapper */
#prism-scene {
  position: absolute;
  inset: 0;
  perspective: 1800px;
  perspective-origin: 50% 50%;
  z-index: 200;
  pointer-events: none;
}

#prism {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(0deg);
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1);
}

.prism-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#face-home {
  transform: rotateX(0deg) translateZ(0px);
  pointer-events: all;
}

#face-404 {
  transform: rotateX(120deg) translateZ(0px);
}

#face-joking {
  transform: rotateX(240deg) translateZ(0px);
}

/* Hero internal nav */
.hero-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  pointer-events: none;
  z-index: 10;
}

.hero-nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hero-white);
}

.hero-nav-time {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.5;
  color: var(--hero-white);
}

.hero-nav-links {
  display: flex;
  gap: 32px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hero-white);
}

/* Hero content */
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 28px;
  user-select: none;
  color: var(--hero-white);
}

.name-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 800px;
}

.name-row {
  position: relative;
  cursor: grab;
  user-select: none;
  will-change: transform;
  touch-action: none;
}

.name-row:active {
  cursor: grabbing;
}

.name-solid {
  font-size: clamp(56px, 9vw, 145px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.88;
  color: var(--hero-white);
  text-transform: uppercase;
  font-family: 'Arial Black', sans-serif;
  white-space: nowrap;
}

.name-outline {
  font-size: clamp(56px, 9vw, 145px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.88;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.55);
  text-transform: uppercase;
  font-family: 'Arial Black', sans-serif;
  white-space: nowrap;
}

.subtitle-wrap {
  margin-top: 36px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 300;
  opacity: 0.45;
  letter-spacing: 0.04em;
  user-select: none;
  text-align: center;
  transition: opacity 0.4s;
  color: var(--hero-white);
}

.subtitle span {
  opacity: 0.85;
  font-weight: 500;
}

/* Drag UI */
.drag-outline {
  position: absolute;
  inset: -8px;
  border: 1.5px dashed rgba(255,255,255,0.35);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.dragging .drag-outline {
  opacity: 1;
}

.drag-hint {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hero-white);
  color: #111;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.drag-hint::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--hero-white);
}

.name-row:hover .drag-hint {
  opacity: 1;
}

.dragging .drag-hint {
  opacity: 0 !important;
}

.you-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(12px, -50%);
  background: rgba(30,30,30,0.9);
  color: var(--hero-white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  border: 1px solid rgba(255,255,255,0.15);
}

.dragging .you-label {
  opacity: 1;
}

/* Face 1 — 404 Error */
#face-404 {
  background: #fff;
  display: flex;
  align-items: stretch;
  font-family: 'Fira Mono', monospace;
}

.err-sidebar {
  width: 6px;
  background: #c00;
  flex-shrink: 0;
}

.err-body {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  color: #333;
}

.err-status-line {
  font-size: 13px;
  color: #999;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
  font-family: 'Fira Mono', monospace;
}

.err-big-num {
  font-size: clamp(80px, 14vw, 180px);
  font-weight: 400;
  font-family: 'Fira Mono', monospace;
  color: #c00;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

.err-message-line {
  font-size: clamp(20px, 3.5vw, 42px);
  font-weight: 400;
  font-family: 'Fira Mono', monospace;
  color: #222;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

.err-divider {
  width: 48px;
  height: 2px;
  background: #c00;
  margin-bottom: 28px;
}

.err-stack {
  font-size: 12px;
  color: #aaa;
  font-family: 'Fira Mono', monospace;
  line-height: 1.8;
  margin-bottom: 36px;
}

.err-stack .red   { color: #c00; }
.err-stack .gray  { color: #bbb; }
.err-stack .path  { color: #888; text-decoration: underline; }
.err-stack .bold  { color: #555; font-weight: 500; }

.err-footer-bar {
  font-size: 11px;
  color: #ccc;
  font-family: 'Fira Mono', monospace;
  border-top: 1px solid #eee;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
}

/* Face 2 — Just Kidding */
#face-joking {
  background: var(--hero-bg);
  background-image: radial-gradient(var(--hero-dot) 1px, transparent 1px);
  background-size: 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.joking-title {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 900;
  font-family: 'Arial Black', sans-serif;
  color: var(--hero-white);
  letter-spacing: -0.02em;
  line-height: 1;
}

.joking-sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 300;
  opacity: 0.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 16px;
  color: var(--hero-white);
}

.joking-tag {
  margin-top: 36px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ghost-bg);
  border: 1px solid rgba(124,106,247,0.35);
  padding: 7px 18px;
  border-radius: 3px;
  opacity: 0.9;
}

/* Ghost cursor */
#ghost-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
}

#ghost-cursor.visible {
  opacity: 1;
}

.ghost-ptr svg {
  width: 16px;
  height: 20px;
  filter: drop-shadow(0 0 5px rgba(124,106,247,0.9));
}

.ghost-label {
  position: absolute;
  top: 20px;
  left: 12px;
  background: var(--ghost-bg);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 12px rgba(124,106,247,0.5);
}

#ghost-cursor.warn .ghost-label {
  background: var(--warn-bg);
}

#ghost-cursor.warn .ghost-ptr svg {
  filter: drop-shadow(0 0 5px rgba(255,77,109,0.9));
}

/* Speech bubble */
#speech-bubble {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
}

#speech-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.bubble-inner {
  background: var(--ghost-bg);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(124,106,247,0.4);
  position: relative;
  min-width: 20px;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.bubble-inner::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 14px;
  border: 6px solid transparent;
  border-bottom-color: var(--ghost-bg);
}

.typing-cursor {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,0.8);
  margin-left: 1px;
  vertical-align: middle;
  animation: blink 0.6s step-end infinite;
}

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

#speech-bubble.warn .bubble-inner {
  background: var(--warn-bg);
  box-shadow: 0 4px 20px rgba(255,77,109,0.4);
}

#speech-bubble.warn .bubble-inner::before {
  border-bottom-color: var(--warn-bg);
}

/* Mini preview */
.mini-preview {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: #161616;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 16px 10px 14px;
  border-radius: 4px;
  user-select: none;
  z-index: 300;
  transition: opacity 0.4s;
}

.mini-name {
  font-size: 13px;
  font-weight: 800;
  font-family: 'Arial Black', sans-serif;
  color: var(--hero-white);
  letter-spacing: -0.01em;
}

.mini-surname {
  font-size: 13px;
  font-weight: 800;
  font-family: 'Arial Black', sans-serif;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.45);
  letter-spacing: -0.01em;
}

.mini-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 5px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 5px;
}

/* Lock shake */
@keyframes lockShake {
  0%, 100% { transform: translate(0,0); }
  20% { transform: translate(-6px,0); }
  40% { transform: translate(6px,0); }
  60% { transform: translate(-4px,0); }
  80% { transform: translate(4px,0); }
}

.locked-shake {
  animation: lockShake 0.4s ease;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════════ */
#about {
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
}

.dotted-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.dotted-surface canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

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

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  display: block;
  margin-bottom: 24px;
}

.about-bio {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  font-size: clamp(18px, 2.5vw, 24px);
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  max-width: 720px;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.about-pill {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--hero-white);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.06);
  transition: var(--transition);
  cursor: pointer;
}

.about-pill:hover {
  background: rgba(255,255,255,0.12);
  color: var(--hero-white);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   SKILLS — CHAT + BENTO GRID
   ═══════════════════════════════════════════════════════════ */
#skills {
  background: var(--hero-bg);
  padding: 120px 0;
}

.skills-heading {
  text-align: center;
  margin-bottom: 48px;
}

.skills-heading .section-label {
  text-align: center;
}

.skills-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--hero-white);
  margin-top: 12px;
}

/* ── Chat Box ── */
.chat-wrap {
  max-width: 520px;
  margin: 0 auto 60px;
}

.chat-box {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  overflow: hidden;
}

.chat-input-area {
  position: relative;
}

.chat-input-area textarea {
  width: 100%;
  height: 56px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 16px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--hero-white);
  line-height: 1.5;
}

.chat-input-area textarea::placeholder {
  color: rgba(255,255,255,0.3);
}

.chat-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px 14px 12px;
}

.chat-actions {
  display: flex;
  gap: 12px;
}

.chat-action-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  padding: 4px;
  transition: all 0.3s;
  display: flex;
}

.chat-action-btn:hover {
  color: var(--hero-white);
  transform: translateY(-1px);
}

.chat-send-btn {
  background: linear-gradient(to top, rgba(255,255,255,0.08), rgba(255,255,255,0.15), rgba(255,255,255,0.08));
  border: none;
  border-radius: 10px;
  padding: 2px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-send-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.2);
  border-radius: 9px;
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.5);
  transition: all 0.3s;
}

.chat-send-btn:hover .chat-send-inner {
  color: var(--hero-white);
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
}

.chat-send-btn.sending .chat-send-inner {
  color: var(--hero-white);
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

/* Chat typing cursor */
.chat-typing-cursor {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.7);
  vertical-align: middle;
  animation: blink 0.6s step-end infinite;
}

/* ── Bento Grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card base */
.bento-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(0,0,0,0.5);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(255,255,255,0.03);
}

.bento-card-inner {
  padding: 20px;
  position: relative;
}

/* Dot pattern overlay on hover/expanded */
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0;
  transition: opacity 0.3s;
}

.bento-card:hover::before,
.bento-card.expanded::before {
  opacity: 1;
}

/* Gradient border glow on expanded */
.bento-card.expanded {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(255,255,255,0.03);
}

/* Card header */
.bento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bento-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  transition: all 0.3s;
}

.bento-card:hover .bento-icon {
  background: rgba(255,255,255,0.1);
}

.bento-status {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  transition: background 0.3s;
}

.bento-card:hover .bento-status {
  background: rgba(255,255,255,0.1);
}

/* Card body */
.bento-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.bento-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
  line-height: 1.4;
}

/* Chips — skill items with icons */
.bento-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              margin-top 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0;
}

.bento-card.expanded .bento-chips {
  max-height: 300px;
  opacity: 1;
  margin-top: 16px;
}

.bento-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 5px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}

.bento-chip:hover {
  background: rgba(255,255,255,0.1);
  color: var(--hero-white);
  border-color: rgba(255,255,255,0.15);
}

.chip-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.8;
}

/* Footer */
.bento-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.bento-tags {
  display: flex;
  gap: 6px;
}

.bento-tags span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}

.bento-tags span:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
}

.bento-cta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  opacity: 0;
  transition: opacity 0.3s;
}

.bento-card:hover .bento-cta {
  opacity: 1;
}

/* ── Grid layout: expanded = 2fr, collapsed = 1fr ── */
/* Row 0: card-ai (expanded 2fr) + card-pm (collapsed 1fr) */
/* Row 1: card-analytics (collapsed 1fr) + card-tools (expanded 2fr) */
/* Dynamic via JS data attributes */

.bento-grid[data-row0="0-expanded"] {
  grid-template-columns: 2fr 1fr;
}

.bento-grid[data-row0="1-expanded"] {
  grid-template-columns: 1fr 2fr;
}

/* For second row, we re-order the cards */
#card-analytics { order: 2; }
#card-tools { order: 3; }

/* Second row tracks separate grid — handled by wrapper approach or subgrid */
/* We'll use a 2-row approach: each row is its own implicit grid line */

/* Stagger card appearance */
.bento-card {
  opacity: 0;
  transform: translateY(16px);
}

.bento-grid.visible .bento-card {
  opacity: 1;
  transform: translateY(0);
}

.bento-grid.visible .bento-card:nth-child(1) { transition-delay: 0ms; }
.bento-grid.visible .bento-card:nth-child(2) { transition-delay: 80ms; }
.bento-grid.visible .bento-card:nth-child(3) { transition-delay: 160ms; }
.bento-grid.visible .bento-card:nth-child(4) { transition-delay: 240ms; }

/* ═══════════════════════════════════════════════════════════
   WORK EXPERIENCE & PROJECTS — LAMP + TABS + CARDS
   ═══════════════════════════════════════════════════════════ */
#work {
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
  padding: 0;
}

/* ── Lamp Effect — bar on top, light spreads down ── */
.lamp-container {
  position: relative;
  width: 100%;
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px;
  overflow: visible;
}

/* The tube light bar — sits at top, white light source */
.lamp-bar {
  position: relative;
  height: 2px;
  width: 8rem;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  z-index: 50;
  flex-shrink: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.lamp-bar.expanded {
  width: 30rem;
}

/* Main soft glow behind the bar */
.lamp-blur {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20%);
  width: 8rem;
  height: 9rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.5);
  filter: blur(48px);
  opacity: 0.8;
  z-index: 30;
  pointer-events: none;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.lamp-blur.expanded {
  width: 16rem;
}

/* Left conic gradient cone */
.lamp-cone-left {
  position: absolute;
  top: 80px;
  right: 50%;
  width: 15rem;
  height: 14rem;
  background: conic-gradient(from 70deg at center top, rgba(255,255,255,0.35), transparent, transparent);
  z-index: 2;
  overflow: hidden;
  opacity: 0.5;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
}

.lamp-cone-left.expanded {
  width: 30rem;
  opacity: 1;
}

.lamp-cone-left::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10rem;
  background: linear-gradient(to top, var(--hero-bg), transparent);
}

.lamp-cone-left::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 10rem;
  height: 100%;
  background: linear-gradient(to right, var(--hero-bg), transparent);
}

/* Right conic gradient cone */
.lamp-cone-right {
  position: absolute;
  top: 80px;
  left: 50%;
  width: 15rem;
  height: 14rem;
  background: conic-gradient(from 290deg at center top, transparent, transparent, rgba(255,255,255,0.35));
  z-index: 2;
  overflow: hidden;
  opacity: 0.5;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
}

.lamp-cone-right.expanded {
  width: 30rem;
  opacity: 1;
}

.lamp-cone-right::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 10rem;
  background: linear-gradient(to top, var(--hero-bg), transparent);
}

.lamp-cone-right::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10rem;
  height: 100%;
  background: linear-gradient(to left, var(--hero-bg), transparent);
}

/* Blur overlay at top */
.lamp-blur-overlay {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  height: 12rem;
  z-index: 50;
  pointer-events: none;
  background: transparent;
  backdrop-filter: blur(6px);
  opacity: 0.1;
  mask-image: linear-gradient(to bottom, white, transparent);
  -webkit-mask-image: linear-gradient(to bottom, white, transparent);
}

/* ── Work content overlay ── */
.work-content {
  position: relative;
  z-index: 2;
  padding: 0 0 120px;
  margin-top: -140px;
}

.work-header {
  text-align: center;
  margin-bottom: 48px;
}

.work-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 48px);
  background: linear-gradient(to bottom right, #cbd5e1, #64748b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 12px;
  line-height: 1.15;
}

.work-sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  max-width: 600px;
  margin: 20px auto 0;
  line-height: 1.6;
}

/* ── Tabs ── */
.work-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 60px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 4px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.work-tab {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  background: transparent;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  flex: 1;
}

.work-tab:hover {
  color: rgba(255,255,255,0.7);
}

.work-tab.active {
  background: rgba(255,255,255,0.1);
  color: var(--hero-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ── Panels ── */
.work-panel {
  display: none;
}

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

/* ── Work rows (details left, media right) ── */
.work-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 60px;
}

.work-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  display: block;
  margin-bottom: 12px;
}

.work-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--hero-white);
  margin-bottom: 8px;
  line-height: 1.2;
}

.work-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2px;
}

.work-date {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.3);
  margin-bottom: 12px;
}

.work-solves {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
  line-height: 1.5;
}

.work-solves span {
  color: rgba(255,255,255,0.65);
}

/* Collapsible description */
.work-description {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-description[data-collapsed="true"] {
  max-height: 0;
}

.work-description[data-collapsed="false"] {
  max-height: 400px;
}

.work-description p,
.work-description ul {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin-bottom: 12px;
}

.work-bullets {
  list-style: none;
  padding: 0;
}

.work-bullets li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 8px;
}

.work-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.3);
}

.read-more-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  transition: color 0.25s;
  display: block;
}

.read-more-btn:hover {
  color: var(--hero-white);
}

/* Tech stack chips */
.work-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.work-stack span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.work-status {
  margin-top: 14px;
}

.status-pill {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #22c55e;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-block;
}

.status-pill a {
  color: #22c55e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-pill a:hover {
  color: #4ade80;
}

/* Media placeholder */
.work-media {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.work-media .media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  border: 2px dashed rgba(255,255,255,0.06);
  border-radius: 14px;
}

.work-media .media-placeholder::after {
  content: attr(data-label);
}

/* App video (no frame) */
.work-media-app {
  background: none !important;
  border: none !important;
  aspect-ratio: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-media-app .video-player {
  width: 260px;
  border-radius: 28px;
}

.work-media-app .video-player video {
  border-radius: 28px;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
}

.work-media-app .video-play-btn {
  width: 52px;
  height: 52px;
}

.work-media-app .video-mute-btn {
  width: 30px;
  height: 30px;
  bottom: 10px;
  right: 10px;
}

/* Video player */
.video-player {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.video-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 14px;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.video-play-btn:hover {
  background: rgba(0,0,0,0.7);
  border-color: rgba(255,255,255,0.4);
  transform: translate(-50%, -50%) scale(1.08);
}

.video-play-btn svg {
  margin-left: 3px;
}

.video-player.playing .video-play-btn {
  opacity: 0;
  pointer-events: none;
}

.video-player:hover .video-play-btn {
  opacity: 1;
  pointer-events: auto;
}

.video-player.playing:hover .video-play-btn {
  opacity: 0.8;
  pointer-events: auto;
}

.video-mute-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(4px);
}

.video-player:hover .video-mute-btn,
.video-player.playing .video-mute-btn {
  opacity: 1;
}

.video-mute-btn:hover {
  background: rgba(0,0,0,0.7);
}

/* Divider */
.work-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 60px;
}
/* ═══════════════════════════════════════════════════════════
   BEYOND THE DESK
   ═══════════════════════════════════════════════════════════ */
#beyond {
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
  padding: 140px 0 0;
}

/* Grid pattern */
.beyond-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='rgb(255 255 255 / 0.04)'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.5) 70%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.5) 70%, black 100%);
}

/* Spotlight container */
.spotlight-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.spotlight-group {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
}

.spotlight-left {
  left: 0;
  animation: spotlight-sway-left 7s ease-in-out infinite alternate;
}

.spotlight-right {
  right: 0;
  animation: spotlight-sway-right 7s ease-in-out infinite alternate;
}

@keyframes spotlight-sway-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(100px); }
}

@keyframes spotlight-sway-right {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100px); }
}

/* Spotlight beams */
.spotlight-beam {
  position: absolute;
  top: 0;
}

.spotlight-left .beam-main {
  left: 0;
  width: 560px;
  height: 1380px;
  transform: translateY(-350px) rotate(-45deg);
  background: radial-gradient(68.54% 68.72% at 55.02% 31.46%, hsla(210,100%,85%,.08) 0, hsla(210,100%,55%,.02) 50%, hsla(210,100%,45%,0) 80%);
}

.spotlight-left .beam-side-a {
  left: 0;
  width: 240px;
  height: 1380px;
  transform: rotate(-45deg) translate(5%, -50%);
  transform-origin: top left;
  background: radial-gradient(50% 50% at 50% 50%, hsla(210,100%,85%,.06) 0, hsla(210,100%,55%,.02) 80%, transparent 100%);
}

.spotlight-left .beam-side-b {
  left: 0;
  width: 240px;
  height: 1380px;
  transform: rotate(-45deg) translate(-180%, -70%);
  transform-origin: top left;
  background: radial-gradient(50% 50% at 50% 50%, hsla(210,100%,85%,.04) 0, hsla(210,100%,45%,.02) 80%, transparent 100%);
}

.spotlight-right .beam-main {
  right: 0;
  width: 560px;
  height: 1380px;
  transform: translateY(-350px) rotate(45deg);
  background: radial-gradient(68.54% 68.72% at 55.02% 31.46%, hsla(210,100%,85%,.08) 0, hsla(210,100%,55%,.02) 50%, hsla(210,100%,45%,0) 80%);
}

.spotlight-right .beam-side-a {
  right: 0;
  width: 240px;
  height: 1380px;
  transform: rotate(45deg) translate(-5%, -50%);
  transform-origin: top right;
  background: radial-gradient(50% 50% at 50% 50%, hsla(210,100%,85%,.06) 0, hsla(210,100%,55%,.02) 80%, transparent 100%);
}

.spotlight-right .beam-side-b {
  right: 0;
  width: 240px;
  height: 1380px;
  transform: rotate(45deg) translate(180%, -70%);
  transform-origin: top right;
  background: radial-gradient(50% 50% at 50% 50%, hsla(210,100%,85%,.04) 0, hsla(210,100%,45%,.02) 80%, transparent 100%);
}

/* Content layout */
.beyond-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
  align-items: start;
}

.beyond-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  line-height: 1.15;
  margin-bottom: 20px;
}

.beyond-subtext {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

.beyond-left {
  position: sticky;
  top: 200px;
}

.beyond-timestamp {
  font-family: 'Fira Mono', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.25);
  display: block;
  margin-bottom: 32px;
}

.beyond-para {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: 28px;
}

.beyond-para:last-child {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
#footer {
  position: relative;
  background: transparent;
}

.footer-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 48px 80px;
  z-index: 2;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Profile card */
.footer-profile {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-avatar {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.footer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transform: scale(1.3);
  transform-origin: center 30%;
  filter: grayscale(1);
}

.footer-profile-text {
  display: flex;
  flex-direction: column;
}

.footer-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
  line-height: 1.2;
}

.footer-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  line-height: 1.2;
}

/* Links */
.footer-links {
  display: flex;
  gap: 12px;
}

.footer-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-link-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}

.footer-link-item svg {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.footer-link-item:hover svg {
  opacity: 1;
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  section {
    padding: 80px 0;
  }

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

  .name-solid,
  .name-outline {
    font-size: clamp(36px, 12vw, 72px);
  }

  .mini-preview {
    bottom: 16px;
    right: 16px;
  }

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

  #card-analytics { order: unset; }
  #card-tools { order: unset; }

  .bento-card.expanded .bento-chips,
  .bento-card.collapsed .bento-chips {
    max-height: 300px;
    opacity: 1;
    margin-top: 16px;
  }

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

  .lamp-container {
    height: 240px;
  }

  .work-tabs {
    max-width: 100%;
  }

  .beyond-content {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 24px;
  }

  .beyond-left {
    position: static;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .footer-inner {
    padding: 36px 24px 32px;
  }
}

@media (max-width: 480px) {
  .name-solid,
  .name-outline {
    font-size: clamp(28px, 14vw, 56px);
  }

  .tagline {
    font-size: 9px;
    letter-spacing: 0.2em;
  }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
