/* ==========================================================================
   lhackyup.dev — Modern Minimalist AI-Augmented Engineering Portfolio
   ========================================================================== */

:root, [data-theme="light"] {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Theme: Light (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(99, 102, 241, 0.5);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  
  --accent-indigo: #4f46e5;
  --accent-violet: #7c3aed;
  --accent-cyan: #0891b2;
  --accent-emerald: #059669;
  --accent-bmc: #ffd24d;
  --accent-bmc-text: #1a1608;

  --nav-bg: rgba(255, 255, 255, 0.92);
  --glow-primary: rgba(99, 102, 241, 0.06);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Theme: Dark */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  --nav-bg: rgba(9, 13, 22, 0.85);
  --glow-primary: rgba(99, 102, 241, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Lights */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1400px;
  height: 600px;
  background: radial-gradient(circle at 50% 15%, var(--glow-primary) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ambient-dot-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--accent-indigo);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.brand-tld {
  color: var(--accent-indigo);
  font-size: 0.95rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
}

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

/* Language Selector */
.lang-selector {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--accent-indigo);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

/* Header BMC Pill */
.nav-bmc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-bmc);
  color: var(--accent-bmc-text);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(255, 210, 77, 0.3);
  transition: var(--transition);
}

.nav-bmc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 210, 77, 0.45);
}

/* Mobile Menu Toggle & Drawer */
.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  border-color: var(--border-hover);
}

.hamburger-box {
  width: 16px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.mobile-menu-btn[aria-expanded="true"] {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 36px -10px rgba(15, 23, 42, 0.18);
}

.mobile-menu.is-open {
  display: block;
  animation: slideDownMenu 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-inner {
  padding-top: 0.85rem;
  padding-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.mobile-nav-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.mobile-nav-arrow {
  margin-left: auto;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.mobile-menu-footer {
  padding-top: 0.25rem;
}

.mobile-bmc-cta {
  width: 100%;
  justify-content: center;
}

section[id] {
  scroll-margin-top: 5rem;
}

/* Hero Section */
.hero-section {
  padding: 5.5rem 0 4rem;
  text-align: center;
}

.hero-mascot-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: var(--transition);
}

.hero-mascot-pill:hover {
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

.hero-mascot-pill img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.hero-title {
  font-size: clamp(2.35rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  max-width: 860px;
  margin: 0 auto 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #0f172a 10%, #3730a3 60%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #ffffff 10%, #c7d2fe 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

/* Button Component Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.btn-bmc {
  background: var(--accent-bmc);
  color: var(--accent-bmc-text);
  box-shadow: 0 4px 14px rgba(255, 210, 77, 0.35);
}

.btn-bmc:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 210, 77, 0.5);
}

/* Value Highlights Grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: left;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.stat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

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

/* Section Header */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Philosophy Section */
.philosophy-section {
  padding: 5rem 0;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.philosophy-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.philosophy-card-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-indigo);
  margin-bottom: 1.25rem;
}

.philosophy-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.philosophy-card p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Projects Showcase Section */
.projects-section {
  padding: 5rem 0;
}

.projects-stack {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  position: relative;
  transition: var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.project-card-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.project-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project-status-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.project-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.project-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  list-style: none;
}

.project-features-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-features-list li::before {
  content: "✔";
  color: var(--accent-emerald);
  font-size: 0.8rem;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.project-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* Proxy Pill Indicator */
.proxy-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Mascot Spotlight Card */
.mascot-spotlight {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  margin: 4rem 0;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.mascot-img-wrap {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--accent-indigo);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  position: relative;
}

.mascot-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mascot-img-wrap:hover img {
  transform: scale(1.05);
}

.mascot-overlay-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.7rem;
  text-align: center;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.mascot-info {
  flex: 1;
  min-width: 280px;
}

.mascot-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.mascot-quote {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Buy Me a Coffee Banner Card */
.bmc-section {
  padding: 2rem 0;
}

.bmc-card {
  background: linear-gradient(135deg, rgba(255, 210, 77, 0.1), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(255, 210, 77, 0.35);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
}

.bmc-text h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.bmc-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 620px;
}

/* Contact Form Section */
.contact-section {
  padding: 5rem 0 6rem;
}

.contact-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-faint);
}

.form-control, .form-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.form-select {
  cursor: pointer;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

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

.char-counter {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.form-status {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Modal Gallery for Cat Photos */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.modal-img-container {
  width: 100%;
  height: 380px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-nav-btns {
  display: flex;
  gap: 0.5rem;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text-main);
}

/* Keyframes */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes slideDownMenu {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 880px) {
  .nav-links {
    display: none;
  }

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

  .nav-bmc-btn .bmc-pill-label {
    display: none;
  }

  .nav-bmc-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    font-size: 0.95rem;
  }
}

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

  .nav-wrap {
    height: 3.85rem;
    gap: 0.5rem;
  }

  .brand {
    gap: 0.6rem;
    font-size: 1.1rem;
  }

  .brand-avatar {
    width: 34px;
    height: 34px;
  }

  .brand-tld {
    font-size: 0.85rem;
  }

  .nav-actions {
    gap: 0.45rem;
  }

  .lang-btn {
    padding: 0.22rem 0.48rem;
    font-size: 0.7rem;
  }

  .hero-section {
    padding: 2.75rem 0 2.5rem;
  }

  .hero-mascot-pill {
    max-width: 100%;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    gap: 0.5rem;
    margin-bottom: 1.35rem;
    text-align: left;
  }

  .hero-mascot-pill .pill-dot,
  .hero-mascot-pill img {
    flex-shrink: 0;
  }

  .hero-title {
    font-size: clamp(1.9rem, 7vw, 2.75rem);
    margin-bottom: 1.1rem;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 1.85rem;
  }

  .hero-cta-group {
    margin-bottom: 2.5rem;
    gap: 0.75rem;
  }

  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .stat-card {
    padding: 1rem 0.9rem;
  }

  .philosophy-section,
  .projects-section {
    padding: 3.25rem 0;
  }

  .contact-section {
    padding: 3.25rem 0 4rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .philosophy-card {
    padding: 1.6rem 1.35rem;
  }

  .projects-stack {
    gap: 1.5rem;
  }

  .project-card {
    padding: 1.5rem 1.25rem;
  }

  .project-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .project-title {
    font-size: 1.4rem;
  }

  .project-summary {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .project-features-list {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }

  .project-features-list li {
    align-items: flex-start;
  }

  .project-features-list li::before {
    margin-top: 0.15rem;
    flex-shrink: 0;
  }

  .project-tech-tags {
    margin-bottom: 1.5rem;
  }

  .mascot-spotlight {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem 1.35rem;
    margin: 2.5rem 0;
    gap: 1.35rem;
  }

  .mascot-info {
    min-width: 0;
    width: 100%;
  }

  .mascot-img-wrap {
    width: 165px;
    height: 165px;
    margin: 0 auto;
  }

  .bmc-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 1.85rem 1.35rem;
    gap: 1.25rem;
  }

  .contact-card {
    padding: 1.65rem 1.25rem;
  }

  /* Prevent iOS Safari zoom on input focus */
  .form-control,
  .form-select {
    font-size: 1rem;
  }

  .modal-backdrop {
    padding: 1rem;
  }

  .modal-img-container {
    height: clamp(200px, 36vh, 300px);
  }

  .modal-body {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem;
  }

  #reviewer-next-btn {
    width: 100%;
  }

  .footer-wrap {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 1rem;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.25rem;
  }
}

@media (max-width: 480px) {
  /* Hide top-bar coffee icon on narrow phones since it is inside the mobile menu & hero */
  .nav-bmc-btn {
    display: none;
  }

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

  .hero-cta-group .btn,
  .project-actions .btn,
  .mascot-info .btn,
  .bmc-card .btn,
  .form-footer .btn {
    width: 100%;
  }

  .form-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.65rem;
  }

  .char-counter {
    text-align: right;
  }
}

@media (max-width: 380px) {
  .hero-stats-grid {
    grid-template-columns: 1fr;
  }

  .brand-tld {
    display: none;
  }
}

