/* ==========================================================================
   Hakim Allaoui — Distinct Portfolio Architecture (2026 v2 Mobile-First Polish)
   Theme: Obsidian Carbon & Kinetic Bento Editorial + Responsive Glass Navbar
   ========================================================================== */

:root {
  --bg-primary: #050505;
  --bg-elevated: #0b0b0e;
  --bg-card: rgba(18, 18, 22, 0.78);
  --bg-card-hover: rgba(26, 26, 33, 0.94);
  --bg-glass: rgba(12, 12, 16, 0.85);
  --text-primary: #f4f4f6;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-primary: #10b981;       /* Emerald Signal */
  --accent-secondary: #38bdf8;     /* Flutter Sky */
  --accent-tertiary: #a855f7;      /* Obsidian Purple */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --shadow-glow: 0 20px 50px rgba(0, 0, 0, 0.65);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-display: 'Outfit', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-elevated: #f1f1f4;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --accent-primary: #059669;
  --accent-secondary: #0284c7;
  --accent-tertiary: #7e22ce;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

/* Subtle Ambient Grid Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.06), transparent 35%),
    radial-gradient(circle at 85% 25%, rgba(56, 189, 248, 0.06), transparent 35%),
    radial-gradient(circle at 50% 85%, rgba(168, 85, 247, 0.05), transparent 40%),
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 64px 64px, 64px 64px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, #000 35%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.22s ease;
}

.container-custom {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   1. Top Floating Glass Navigation & Command Bar (Desktop & Mobile Perfected)
   ========================================================================== */
.top-navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 1200px;
  height: 58px;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-glow);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #050505;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: -0.03em;
}

.brand-name {
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.2); }
}

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

.nav-links a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.cmd-trigger,
.theme-toggle,
.mobile-menu-btn {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  height: 36px;
  padding: 0 11px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.theme-toggle,
.mobile-menu-btn {
  width: 36px;
  padding: 0;
  font-size: 1.05rem;
}

.cmd-trigger:hover,
.theme-toggle:hover,
.mobile-menu-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.cmd-kbd {
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.68rem;
}

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

/* ==========================================================================
   2. Hero & Bento Impact Architecture
   ========================================================================== */
.hero-section {
  padding-top: 112px;
  padding-bottom: 72px;
}

.bento-hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.bento-main-intro {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
}

.eyebrow-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.eyebrow-tag i {
  font-size: 1rem;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.1rem, 4.6vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 15%, var(--accent-secondary) 60%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.06rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 28px;
}

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

.btn-primary-custom {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.btn-secondary-custom {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary-custom:hover {
  background: var(--border-subtle);
  transform: translateY(-2px);
}

/* Profile Card */
.bento-profile-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.06) 100%);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--border-strong);
}

.profile-meta h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-meta p {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.profile-quick-facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 24px;
}

.profile-quick-facts li {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-quick-facts li span:first-child {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.profile-quick-facts li span:last-child {
  font-weight: 500;
  color: var(--text-primary);
}

.social-dock {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-pill {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.social-pill:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

/* 4 Stat Cards across bottom of Hero Bento */
.bento-stat-card {
  grid-column: span 3;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-primary);
  margin-top: 10px;
}

/* ==========================================================================
   3. Section Headers
   ========================================================================== */
.section-block {
  padding: 88px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 44px;
}

.section-title-group h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.85rem);
  font-weight: 800;
}

.section-title-group p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin-top: 10px;
}

/* ==========================================================================
   4. Portfolio Showcase & Filter System
   ========================================================================== */
.portfolio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
}

.project-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #09090d;
  border-bottom: 1px solid var(--border-subtle);
}

.project-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: saturate(0.88);
}

.project-card:hover .project-thumb-wrap img {
  transform: scale(1.05);
  filter: saturate(1.08);
}

.project-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.project-featured-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(16, 185, 129, 0.9);
  color: #050505;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.project-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.project-title-row h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.project-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 500;
}

.project-action-hint {
  color: var(--accent-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   5. Engineering Stack & Services Matrix
   ========================================================================== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.stack-domain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
}

.stack-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-secondary);
  margin-bottom: 18px;
}

.stack-domain-card h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
}

.stack-domain-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.skill-meter-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.skill-meter-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.skill-meter-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.skill-bar-track {
  height: 5px;
  background: var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 999px;
}

/* ==========================================================================
   6. Career Timeline & Philosophy Quotes
   ========================================================================== */
.timeline-dual-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
}

.timeline-list {
  position: relative;
  border-inline-start: 1px solid var(--border-strong);
  padding-inline-start: 28px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.timeline-node {
  position: relative;
}

.timeline-node::before {
  content: "";
  position: absolute;
  inset-inline-start: -34px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-node h3 {
  font-size: 1.22rem;
  margin: 4px 0;
}

.timeline-org {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.timeline-node ul {
  padding-inline-start: 18px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-node a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-inline-start: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.quote-card p {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 8px;
}

.quote-card footer {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   8. Contact & Direct Connect Hub
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}

.contact-method-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.contact-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.contact-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-primary);
}

.contact-card-left h4 {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

.contact-card-left p {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.contact-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-group-custom {
  margin-bottom: 16px;
}

.input-group-custom label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.input-group-custom input,
.input-group-custom textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  transition: border-color 0.2s ease;
}

.input-group-custom input:focus,
.input-group-custom textarea:focus {
  outline: none;
  border-color: var(--accent-secondary);
}

/* ==========================================================================
   9. Modals: Project Case Study Drawer & Command Palette (⌘K)
   ========================================================================== */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop-custom.open {
  display: flex;
}

.project-modal-dialog {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-glow);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-preview-img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  background: #050505;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin: 18px 0;
}

/* Command Palette */
.cmd-dialog {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  max-width: 580px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.cmd-input-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmd-input-header input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.cmd-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 10px;
  list-style: none;
}

.cmd-item {
  padding: 11px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.9rem;
}

.cmd-item:hover {
  background: var(--border-subtle);
}

/* Toast Notification */
.toast-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  max-width: 360px;
  margin-inline-start: auto;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-glow);
  transform: translateY(140%);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 3000;
}

.toast-banner.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 44px 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

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

/* ==========================================================================
   10. Tablet & Mobile Responsive Perfection
   ========================================================================== */
@media (max-width: 1040px) {
  .status-text {
    display: none;
  }
  .status-pill {
    padding: 6px;
    border-radius: 50%;
  }
  .bento-main-intro,
  .bento-profile-card {
    grid-column: span 12;
  }
  .bento-stat-card {
    grid-column: span 6;
  }
  .timeline-dual-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-glow);
    gap: 4px;
  }
  .nav-links.mobile-open a {
    padding: 11px 16px;
    font-size: 0.95rem;
    border-radius: 10px;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 600px) {
  .container-custom {
    padding: 0 16px;
  }
  .top-navbar {
    top: 10px;
    width: calc(100% - 20px);
    height: 52px;
    padding: 0 10px;
    gap: 6px;
  }
  .brand-logo {
    gap: 8px;
    font-size: 0.92rem;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 0.8rem;
  }
  /* Hide the status pill on small mobile navbar so name & controls never wrap */
  .top-navbar .status-pill {
    display: none;
  }
  /* Make search button a sleek circular icon button on mobile */
  .cmd-trigger {
    width: 34px;
    height: 34px;
    padding: 0;
  }
  .cmd-kbd {
    display: none;
  }
  .theme-toggle,
  .mobile-menu-btn {
    width: 34px;
    height: 34px;
  }
  .lang-switcher {
    padding: 2px;
  }
  .lang-btn {
    font-size: 0.66rem;
    padding: 4px 6px;
  }
  .hero-section {
    padding-top: 82px;
    padding-bottom: 48px;
  }
  .bento-card {
    padding: 22px 18px;
    border-radius: 18px;
  }
  .bento-main-intro {
    min-height: auto;
  }
  .eyebrow-tag {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
  }
  .hero-title {
    font-size: 1.9rem;
    line-height: 1.18;
    margin-bottom: 14px;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary-custom,
  .btn-secondary-custom {
    width: 100%;
  }
  .bento-stat-card {
    grid-column: span 6;
    padding: 18px 16px;
  }
  .stat-value {
    font-size: 1.75rem;
  }
  .stat-label {
    font-size: 0.78rem;
  }
  .form-row-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
