/* ==========================================================================
   Base & Reset (Balanced Font Scaling)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
  list-style-type: none;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0f172a;
  color: #94a3b8;
  font-size: 15.5px; /* Clean, balanced readability */
  line-height: 1.65;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: #0f172a;
}

/* Custom Text Selection */
::selection {
  background-color: #5eead4;
  color: #0f172a;
}

/* Typography utilities */
a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: 'JetBrains Mono', monospace;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Spotlight Cursor Effect
   ========================================================================== */
#spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 30;
  background: radial-gradient(600px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh), rgba(29, 78, 216, 0.15), transparent 80%);
}

/* ==========================================================================
   Layout & Responsive Utilities
   ========================================================================== */
.max-w-screen-xl {
  max-width: 1240px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.min-h-screen {
  min-height: 100vh;
}

.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

@media (min-width: 768px) {
  .md\:px-12 { padding-left: 3rem; padding-right: 3rem; }
  .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .md\:mb-20 { margin-bottom: 5rem; }
}

@media (min-width: 1024px) {
  .lg\:px-20 { padding-left: 5rem; padding-right: 5rem; }
  .lg\:py-0 { padding-top: 0; padding-bottom: 0; }
  .lg\:flex { display: flex; }
  .lg\:justify-between { justify-content: space-between; }
  .lg\:gap-6 { gap: 1.5rem; }
  .lg\:sticky { position: sticky; }
  .lg\:top-0 { top: 0; }
  .lg\:max-h-screen { max-height: 100vh; }
  .lg\:w-\[45\%\] { width: 45%; }
  .lg\:w-\[55\%\] { width: 55%; }
  .lg\:flex-col { flex-direction: column; }
  .lg\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .lg\:mb-28 { margin-bottom: 7rem; }
  .lg\:scroll-mt-20 { scroll-margin-top: 5rem; }
}

/* ==========================================================================
   Typography Classes
   ========================================================================== */
.text-3xl { font-size: 1.95rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.45rem; line-height: 2.5rem; }
.text-base { font-size: 1.05rem; line-height: 1.5rem; }
.text-lg { font-size: 1.15rem; line-height: 1.75rem; }
.text-sm { font-size: 0.925rem; line-height: 1.5rem; }
.text-xs { font-size: 0.775rem; line-height: 1.05rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }

.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-teal-300 { color: #5eead4; }

.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-2\.5 { margin-top: 0.625rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-3\.5 { margin-top: 0.875rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-2\.5 { margin-bottom: 0.625rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-14 { margin-bottom: 3.5rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.mr-3\.5 { margin-right: 0.875rem; }

.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 25rem; }
.max-w-md { max-width: 28rem; }
.w-max { width: max-content; }

.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-10 > :not([hidden]) ~ :not([hidden]) { margin-top: 2.5rem; }
.space-y-12 > :not([hidden]) ~ :not([hidden]) { margin-top: 3rem; }

/* ==========================================================================
   Navigation Indicator (Brittany Chiang style)
   ========================================================================== */
.nav ul {
  list-style: none;
}

.nav a {
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.nav-indicator {
  display: inline-block;
  height: 1px;
  background-color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-text {
  transition: color 0.2s ease;
}

.nav a:hover .nav-indicator,
.nav a.active .nav-indicator {
  width: 3.5rem !important;
  background-color: #e2e8f0;
}

.nav a:hover .nav-text,
.nav a.active .nav-text {
  color: #e2e8f0;
}

/* ==========================================================================
   Social Icons
   ========================================================================== */
ul[aria-label="Social media"] {
  list-style: none;
}

.text-xl { font-size: 1.3rem; }

a.hover\:text-slate-200:hover {
  color: #e2e8f0;
}

a.hover\:text-teal-300:hover {
  color: #5eead4;
}

/* ==========================================================================
   Group Hover & Card Backdrops
   ========================================================================== */
ol.group\/list, ul.group\/list {
  list-style: none;
}

.group\/list:hover .group\/list > li .group {
  opacity: 0.45;
}

.group\/list:hover .group\/list > li:hover .group {
  opacity: 1 !important;
}

.group {
  position: relative;
  display: grid;
  transition: all 0.2s ease;
}

@media (min-width: 640px) {
  .sm\:grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .sm\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .sm\:col-span-6 {
    grid-column: span 6 / span 6;
  }
  .sm\:gap-6 {
    gap: 1.5rem;
  }
}

.card-backdrop {
  position: absolute;
  top: -1rem;
  bottom: -1rem;
  left: -1rem;
  right: -1rem;
  z-index: 0;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.group:hover .card-backdrop {
  background-color: rgba(30, 41, 59, 0.5);
  box-shadow: inset 0 1px 0 0 rgba(148, 163, 184, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.z-10 {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   Thumbnail Container & Placeholder (Image Ready)
   ========================================================================== */
.thumb-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111827;
  transition: all 0.2s ease;
}

.thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(145deg, #131b2e 0%, #0d1424 100%);
}

.thumb-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.group:hover .thumb-container {
  border-color: rgba(94, 234, 212, 0.5);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.15);
}

/* ==========================================================================
   Tech Pills / Badges
   ========================================================================== */
ul[aria-label="Technologies used"] {
  list-style: none;
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.5rem; /* Distinct horizontal and vertical breathing room */
  padding: 0;
  margin: 0;
}

ul[aria-label="Technologies used"] > li {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background-color: rgba(45, 212, 191, 0.1);
  padding: 0.28rem 0.8rem;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1rem;
  color: #5eead4;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1\.5 { gap: 0.55rem; }
.gap-2 { gap: 0.65rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.items-center { align-items: center; }

/* Arrow micro-interaction */
.group\/link:hover i {
  color: #5eead4;
}

.group\/link i {
  transition: transform 0.2s ease, color 0.2s ease;
}

/* ==========================================================================
   Mobile Sticky Section Headers
   ========================================================================== */
@media (max-width: 1023px) {
  .sticky {
    position: sticky;
  }
  .top-0 {
    top: 0;
  }
  .bg-slate-900\/85 {
    background-color: rgba(15, 23, 42, 0.9);
  }
  .backdrop-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .hidden {
    display: none;
  }
  .thumb-container {
    max-width: 180px;
    margin-bottom: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .lg\:sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}
