/* ==========================================================================
   GERAM Portfolio — Dark Cosmic Glassmorphism Design System
   ========================================================================== */

:root {
  --bg-void: #050816;
  --bg-deep: #070b1e;
  --bg-card: rgba(11, 16, 38, 0.74);
  --bg-card-strong: rgba(10, 14, 34, 0.88);
  --cyan: #18f2e8;
  --cyan-bright: #49fff7;
  --cyan-soft: rgba(24, 242, 232, 0.16);
  --violet: #8b5cf6;
  --purple: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #b6c2dc;
  --text-dim: #7c89a8;
  --border-glass: rgba(139, 92, 246, 0.34);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --container-max: 1340px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(circle at 74% 18%, rgba(28, 70, 138, 0.32), transparent 44%),
              radial-gradient(circle at 22% 52%, rgba(88, 28, 135, 0.2), transparent 42%),
              linear-gradient(180deg, #060a1b 0%, #050816 55%, #070b1f 100%);
  overflow-x: hidden;
  line-height: 1.55;
}

img,
svg {
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 28px;
}

.text-cyan {
  color: var(--cyan);
}

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

/* ==========================================================================
   Ambient Background & Faint Margin Code
   ========================================================================== */

.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.55;
}

.glow-top-right {
  width: 520px;
  height: 520px;
  top: -110px;
  right: 4%;
  background: radial-gradient(circle, rgba(24, 242, 232, 0.35), rgba(139, 92, 246, 0.25) 55%, transparent 72%);
}

.glow-mid-left {
  width: 380px;
  height: 380px;
  top: 260px;
  left: -140px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.32), transparent 70%);
}

.glow-mid-right {
  width: 440px;
  height: 340px;
  top: 300px;
  right: -80px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28), transparent 72%);
}

.glow-bottom-center {
  width: 680px;
  height: 320px;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(24, 242, 232, 0.14), rgba(139, 92, 246, 0.12) 55%, transparent 72%);
}

.bg-code-margin {
  position: absolute;
  top: 70px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.85;
  color: rgba(148, 163, 184, 0.14);
  user-select: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.15) 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.15) 70%, transparent);
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 10, 27, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1.38rem;
}

.brand-icon {
  filter: drop-shadow(0 0 10px rgba(24, 242, 232, 0.55));
}

.brand-name {
  color: #ffffff;
}

.main-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 22px;
  height: 100%;
}

.nav-list li {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-dot {
  color: rgba(182, 194, 220, 0.45);
  font-size: 1.05rem;
  user-select: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-size: 0.98rem;
  font-weight: 500;
  color: #dbe4f6;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(24, 242, 232, 0.9);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-cyan {
  background: linear-gradient(135deg, #25f6ec 0%, #10e4dc 100%);
  color: #050a1b;
  box-shadow: 0 0 24px rgba(24, 242, 232, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-cyan:hover {
  background: linear-gradient(135deg, #49fff7 0%, #18f2e8 100%);
  box-shadow: 0 0 32px rgba(24, 242, 232, 0.62);
}

.btn-header {
  padding: 10px 22px;
  font-size: 0.95rem;
  border-radius: 14px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 0.98rem;
  border-radius: 13px;
}

.btn-outline-glow {
  position: relative;
  color: #f8fafc;
  background: rgba(15, 19, 44, 0.72);
  border: 1px solid rgba(168, 85, 247, 0.65);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.2), inset 0 0 12px rgba(139, 92, 246, 0.1);
}

.btn-outline-glow:hover {
  border-color: var(--cyan);
  background: rgba(20, 27, 58, 0.85);
  box-shadow: 0 0 24px rgba(24, 242, 232, 0.28);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(14, 19, 44, 0.75);
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 14px 28px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(6, 10, 27, 0.96);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-link {
  padding: 8px 4px;
  font-weight: 600;
  color: #e2e8f0;
}

.mobile-nav-cta {
  margin-top: 6px;
  padding: 12px 18px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 26px 0 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  margin-bottom: 22px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: #e2e8f0;
  background: linear-gradient(135deg, rgba(16, 20, 48, 0.85), rgba(34, 18, 66, 0.72));
  border: 1px solid rgba(168, 85, 247, 0.65);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.24), inset 0 0 12px rgba(24, 242, 232, 0.08);
}

.eyebrow-badge.small {
  margin-bottom: 16px;
  font-size: 0.74rem;
}

.eyebrow-icon {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.9rem;
}

.hero-title {
  font-size: clamp(2.45rem, 3.85vw, 3.45rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: #ffffff;
  margin-bottom: 20px;
}

.hero-title .text-cyan {
  text-shadow: 0 0 28px rgba(24, 242, 232, 0.28);
}

.hero-subtitle {
  max-width: 470px;
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   Hero 3D Floating Composition (Signature Element)
   ========================================================================== */

.hero-stage {
  position: relative;
  min-height: 385px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  --rx: 0deg;
  --ry: 0deg;
}

.cosmic-orb {
  position: absolute;
  top: -18px;
  right: 44px;
  width: 245px;
  height: 245px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #6efbf4 0%, #17b8e6 38%, #4338ca 74%, #1e1b4b 100%);
  box-shadow: 0 0 70px rgba(24, 242, 232, 0.45), 0 0 110px rgba(139, 92, 246, 0.35);
  opacity: 0.9;
  z-index: 0;
}

.orbital-ring {
  position: absolute;
  inset: -14px -38px;
  width: calc(100% + 76px);
  height: calc(100% + 28px);
  pointer-events: none;
  z-index: 1;
}

.cyber-grid-floor {
  position: absolute;
  left: -4%;
  right: -2%;
  bottom: -14px;
  height: 110px;
  background-image:
    linear-gradient(to right, rgba(24, 242, 232, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(139, 92, 246, 0.26) 1px, transparent 1px);
  background-size: 36px 22px;
  transform: perspective(340px) rotateX(68deg);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, rgba(0, 0, 0, 0.85), transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, rgba(0, 0, 0, 0.85), transparent 80%);
  z-index: 0;
}

/* Main Floating IDE Window */
.ide-window {
  position: relative;
  z-index: 2;
  width: 84%;
  max-width: 530px;
  margin-top: -18px;
  margin-right: 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(11, 17, 42, 0.9), rgba(16, 17, 46, 0.84));
  border: 1.5px solid rgba(112, 168, 255, 0.42);
  box-shadow:
    0 24px 60px rgba(3, 6, 20, 0.78),
    0 0 36px rgba(24, 242, 232, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: rotateY(calc(-7deg + var(--ry))) rotateX(calc(4deg + var(--rx))) rotateZ(-1.5deg);
  transition: transform 0.22s ease-out, box-shadow 0.25s ease;
  overflow: hidden;
}

.ide-window::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  box-shadow: inset 0 -1px 18px rgba(24, 242, 232, 0.18), inset -1px 0 18px rgba(168, 85, 247, 0.22);
}

.ide-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 52, 0.55);
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 10px;
}

.window-dots.small {
  gap: 5px;
  padding-bottom: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dots.small .dot {
  width: 7px;
  height: 7px;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.dot-slate { background: rgba(182, 194, 220, 0.55); }

.ide-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.ide-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.ide-tab:hover {
  color: #e2e8f0;
}

.ide-tab.active {
  color: #f8fafc;
  background: rgba(14, 22, 54, 0.92);
  border-color: rgba(148, 163, 184, 0.18);
}

.tab-close {
  color: #94a3b8;
  font-size: 0.9rem;
}

.ide-body {
  display: grid;
  grid-template-columns: 128px 1fr;
  min-height: 222px;
}

.ide-sidebar {
  padding: 14px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 13, 33, 0.55);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: #a3b3d1;
  text-align: left;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.tree-item.indent-1 {
  padding-left: 14px;
}

.tree-item.file:hover {
  background: rgba(24, 242, 232, 0.1);
  color: #ffffff;
}

.tree-item.active {
  background: rgba(24, 242, 232, 0.16);
  color: #ffffff;
  border: 1px solid rgba(24, 242, 232, 0.28);
}

.chevron {
  font-size: 0.7rem;
  color: #64748b;
  width: 8px;
}

.ts-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: #0ea5e9;
  color: #04101f;
  font-weight: 800;
  font-size: 0.56rem;
}

.ide-code-area {
  padding: 14px 16px 26px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.72;
  overflow-x: auto;
}

.code-line {
  display: flex;
  gap: 14px;
  white-space: pre;
}

.ln {
  width: 14px;
  text-align: right;
  color: #4f5f82;
  user-select: none;
  flex-shrink: 0;
}

.tok-kw { color: #c084fc; }
.tok-var { color: #e2e8f0; }
.tok-fn { color: #38bdf8; }
.tok-str { color: #fbbf24; }
.tok-param { color: #7dd3fc; }
.tok-prop { color: #93c5fd; }
.tok-num { color: #f472b6; }
.tok-cm { color: #64748b; font-style: italic; }

/* Floating Code Tag Badge */
.floating-code-badge {
  position: absolute;
  top: 56px;
  right: 2px;
  z-index: 4;
  width: 108px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(24, 242, 232, 0.18), rgba(139, 92, 246, 0.3));
  border: 1.5px solid rgba(103, 232, 249, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(4, 8, 26, 0.65), 0 0 28px rgba(24, 242, 232, 0.34);
  transform: rotate(-8deg) translateY(0);
  animation: floatSlow 5.5s ease-in-out infinite;
}

.floating-code-badge svg {
  filter: drop-shadow(0 0 10px rgba(24, 242, 232, 0.75));
}

/* Floating Bottom-Left Performance Card */
.floating-metric-card {
  position: absolute;
  left: -4px;
  bottom: 24px;
  z-index: 4;
  width: 222px;
  padding: 15px 16px 10px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(13, 25, 58, 0.9), rgba(14, 17, 46, 0.86));
  border: 1.5px solid rgba(24, 242, 232, 0.55);
  box-shadow: 0 20px 44px rgba(2, 6, 20, 0.76), 0 0 28px rgba(24, 242, 232, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: rotate(6deg) skewX(-2deg);
  animation: floatMetric 6.2s ease-in-out infinite;
}

.metric-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #e2e8f0;
}

.metric-value {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(24, 242, 232, 0.6);
}

.metric-chart {
  width: 100%;
  height: 68px;
}

/* Floating Bottom-Right App Preview Card */
.floating-app-card {
  position: absolute;
  right: 0;
  bottom: 12px;
  z-index: 4;
  width: 266px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(18, 22, 54, 0.92), rgba(29, 17, 64, 0.88));
  border: 1.5px solid rgba(168, 85, 247, 0.65);
  box-shadow: 0 22px 46px rgba(3, 6, 22, 0.8), 0 0 30px rgba(168, 85, 247, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transform: rotate(-4deg);
  animation: floatApp 6.8s ease-in-out infinite;
}

.app-card-topbar {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 21, 48, 0.65);
}

.app-card-body {
  display: grid;
  grid-template-columns: 44px 1fr;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(9, 14, 36, 0.55);
}

.app-side-item {
  width: 28px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b9bc0;
}

.app-side-item.active {
  background: rgba(24, 242, 232, 0.22);
  color: var(--cyan);
  border: 1px solid rgba(24, 242, 232, 0.4);
}

.app-main {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-main-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-main-copy {
  flex: 1;
}

.app-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 7px;
}

.skeleton-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  margin-bottom: 5px;
}

.skeleton-bar.w-85 { width: 88%; }
.skeleton-bar.w-55 { width: 58%; background: rgba(148, 163, 184, 0.2); }

.app-play-box {
  width: 56px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.72), rgba(99, 102, 241, 0.65));
  border: 1px solid rgba(196, 181, 253, 0.45);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.45);
}

.app-bottom-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-tile {
  height: 36px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.mini-tile.accent {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(168, 85, 247, 0.35);
}

.mini-tile.accent span {
  width: 60%;
  height: 3px;
  border-radius: 99px;
  background: rgba(216, 180, 254, 0.7);
}

@keyframes floatSlow {
  0%, 100% { transform: rotate(-8deg) translateY(0px); }
  50% { transform: rotate(-6deg) translateY(-7px); }
}

@keyframes floatMetric {
  0%, 100% { transform: rotate(6deg) translateY(0px); }
  50% { transform: rotate(5deg) translateY(-6px); }
}

@keyframes floatApp {
  0%, 100% { transform: rotate(-4deg) translateY(0px); }
  50% { transform: rotate(-3deg) translateY(-7px); }
}

/* ==========================================================================
   Tech Stack Strip
   ========================================================================== */

.tech-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 34px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(11, 20, 44, 0.84), rgba(15, 19, 44, 0.78), rgba(20, 17, 48, 0.84));
  border: 1px solid rgba(110, 200, 255, 0.32);
  box-shadow:
    0 12px 34px rgba(3, 6, 20, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 24px rgba(24, 242, 232, 0.09);
  backdrop-filter: blur(14px);
}

.tech-strip-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.tech-strip-divider {
  width: 1px;
  height: 30px;
  background: rgba(148, 163, 184, 0.25);
  flex-shrink: 0;
}

.tech-list {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  list-style: none;
  gap: 14px;
  flex-wrap: wrap;
}

.tech-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #e6eefc;
  transition: transform 0.2s ease, color 0.2s ease;
}

.tech-item:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.tech-ts-box,
.tech-js-box,
.tech-php-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #25f6ec, #0ea5e9);
  color: #050a1b;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
}

.tech-js-box {
  background: linear-gradient(135deg, #fde047, #f59e0b);
}

.tech-php-box {
  width: 34px;
  border-radius: 999px;
  font-size: 0.68rem;
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  color: #ffffff;
}

.tech-dot {
  color: rgba(182, 194, 220, 0.45);
  user-select: none;
}

/* ==========================================================================
   Featured Projects Section
   ========================================================================== */

.projects-section {
  padding: 20px 0 64px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(1.65rem, 2.5vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.section-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--cyan);
  transition: gap 0.2s ease, color 0.2s ease;
}

.section-link-btn:hover {
  color: var(--cyan-bright);
  gap: 12px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr);
  gap: 15px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(155deg, rgba(13, 18, 43, 0.84), rgba(16, 15, 42, 0.78));
  border: 1px solid rgba(114, 158, 255, 0.34);
  box-shadow: 0 18px 40px rgba(3, 6, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(24, 242, 232, 0.65);
  box-shadow: 0 24px 48px rgba(3, 6, 20, 0.72), 0 0 28px rgba(24, 242, 232, 0.18);
}

.project-thumb {
  width: 134px;
  height: 138px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  align-self: center;
}

.project-thumb svg {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.project-card:hover .project-thumb svg {
  transform: scale(1.04);
}

.project-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
}

.project-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.24;
  color: #ffffff;
  margin-bottom: 6px;
}

.project-desc {
  font-size: 0.86rem;
  line-height: 1.48;
  color: var(--text-muted);
}

.project-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--cyan);
  transition: gap 0.2s ease, color 0.2s ease;
}

.project-link:hover {
  color: var(--cyan-bright);
  gap: 11px;
}

.project-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #dbe4f6;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.38);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.project-ext-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(24, 242, 232, 0.12);
}

/* Secondary Featured Spotlight Row (ClassFlow & DevPath) */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.project-card-spotlight {
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(13, 21, 52, 0.88), rgba(20, 16, 52, 0.84));
  border-color: rgba(24, 242, 232, 0.34);
}

.thumb-spotlight {
  width: 168px;
  height: 144px;
}

.spotlight-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.spotlight-stack {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* Expandable More Projects */
.more-projects-wrap {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  animation: fadeSlideIn 0.3s ease;
}

.more-projects-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.more-projects-caption {
  font-weight: 700;
  color: #dbe4f6;
}

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

.filter-pill {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(15, 22, 52, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
  color: #050a1b;
  background: var(--cyan);
  border-color: var(--cyan);
}

.extra-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.extra-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(11, 17, 42, 0.78);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.extra-card:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 242, 232, 0.55);
}

.extra-card[hidden] {
  display: none;
}

.extra-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.extra-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24, 242, 232, 0.14);
  color: var(--cyan);
  font-weight: 600;
}

.extra-year {
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.extra-card h3 {
  font-size: 1.08rem;
  color: #ffffff;
}

.extra-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

/* ==========================================================================
   Sobre mí Section
   ========================================================================== */

.about-section {
  padding: 30px 0 64px;
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  padding: 36px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(11, 17, 42, 0.84), rgba(18, 15, 44, 0.8));
  border: 1px solid rgba(139, 92, 246, 0.32);
  box-shadow: 0 22px 48px rgba(3, 6, 20, 0.55);
}

.about-text {
  margin: 16px 0 26px;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.about-text strong {
  color: #ffffff;
}

.about-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-pill {
  padding: 14px;
  border-radius: 14px;
  background: rgba(8, 13, 33, 0.72);
  border: 1px solid rgba(24, 242, 232, 0.22);
}

.stat-num {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--cyan);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.pillars-grid {
  display: grid;
  gap: 14px;
}

.pillar-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 16px;
  row-gap: 4px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(9, 14, 36, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pillar-card:hover {
  border-color: rgba(24, 242, 232, 0.42);
  transform: translateX(4px);
}

.pillar-icon {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 242, 232, 0.1);
  border: 1px solid rgba(24, 242, 232, 0.24);
}

.pillar-card h3 {
  font-size: 1.02rem;
  color: #ffffff;
}

.pillar-card p {
  font-size: 0.89rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-section {
  padding: 20px 0 80px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 36px;
  align-items: start;
  padding: 36px;
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(11, 18, 44, 0.88), rgba(22, 16, 48, 0.82));
  border: 1px solid rgba(24, 242, 232, 0.28);
  box-shadow: 0 24px 52px rgba(3, 6, 20, 0.62);
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.contact-desc {
  margin: 14px 0 26px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.68;
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(8, 13, 33, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-channel:hover {
  border-color: rgba(24, 242, 232, 0.55);
  transform: translateY(-2px);
}

.channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 242, 232, 0.12);
}

.channel-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.channel-value {
  font-size: 0.94rem;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.social-chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #dbe4f6;
  background: rgba(10, 16, 40, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-chip:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 52, 0.4);
}

.btn-ghost:hover {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.55);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #dbe4f6;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(7, 11, 28, 0.82);
  color: #ffffff;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #64748b;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(24, 242, 232, 0.16);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.form-feedback {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cyan);
}

.form-feedback.error {
  color: #fda4af;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 24px 0;
  background: rgba(5, 8, 22, 0.72);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

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

/* ==========================================================================
   Project Details Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 18, 0.78);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: 30px;
  border-radius: 22px;
  background: linear-gradient(155deg, #0d1538, #121036);
  border: 1px solid rgba(24, 242, 232, 0.45);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.75), 0 0 40px rgba(24, 242, 232, 0.18);
  animation: fadeSlideIn 0.22s ease;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.12);
}

.modal-close:hover {
  color: #ffffff;
  background: rgba(24, 242, 232, 0.2);
}

.modal-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(24, 242, 232, 0.14);
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.modal-summary {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-section {
  margin-bottom: 18px;
}

.modal-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.modal-highlights {
  list-style: none;
  display: grid;
  gap: 8px;
}

.modal-highlights li {
  position: relative;
  padding-left: 18px;
  font-size: 0.94rem;
  color: #e2e8f0;
}

.modal-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
}

.modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e2e8f0;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn {
  padding: 11px 20px;
  font-size: 0.92rem;
}

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

/* ==========================================================================
   Responsive Layout
   ========================================================================== */

@media (max-width: 1160px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-copy {
    max-width: 650px;
  }

  .hero-stage {
    max-width: 660px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 920px) {
  .about-panel,
  .contact-grid,
  .extra-projects-grid,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .thumb-spotlight {
    width: 152px;
    height: 138px;
  }

  .tech-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
  }

  .tech-strip-divider {
    width: 100%;
    height: 1px;
  }

  .tech-list {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
  }

  .tech-dot {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .main-nav,
  .btn-header {
    display: none;
  }

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

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

  .hero-stage {
    min-height: 360px;
  }

  .ide-window {
    width: 100%;
    margin-right: 0;
    transform: none;
  }

  .ide-body {
    grid-template-columns: 1fr;
  }

  .ide-sidebar {
    display: none;
  }

  .floating-code-badge {
    width: 74px;
    height: 64px;
    top: -12px;
    right: 6px;
  }

  .floating-code-badge svg {
    width: 38px;
    height: 30px;
  }

  .floating-metric-card {
    width: 175px;
    left: 0;
    bottom: -14px;
    transform: rotate(2deg);
  }

  .floating-app-card {
    width: 205px;
    right: 0;
    bottom: -18px;
    transform: rotate(-2deg);
  }

  .about-panel,
  .contact-grid {
    padding: 24px;
  }

  .about-metrics,
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-thumb {
    width: 100%;
    height: 180px;
  }

  .floating-app-card {
    display: none;
  }

  .floating-metric-card {
    position: relative;
    bottom: auto;
    margin-top: -18px;
    transform: none;
    width: 100%;
  }

  .hero-stage {
    flex-direction: column;
    min-height: auto;
  }
}

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