/* ═══════════════════════════════════════════════════════
   DESIGN SYSTEM â€” Aseel Marwan Kheder Portfolio
   Vanilla CSS3 Â· Variables Â· Grid Â· Flexbox
   ═══════════════════════════════════════════════════════ */

/* â”€â”€â”€ CSS Variables â”€â”€â”€ */
:root {
  --bg: #08080c;
  --bg-surface: #0d0d14;
  --bg-card: #12121c;
  --border: #1c1c2e;
  --border-subtle: rgba(255, 255, 255, 0.035);
  --text: #eeeef2;
  --text-dim: #8892a6;
  --text-muted: #4e5668;
  --cyber: #8b5cf6;
  --cyber-dim: #7c4ddb;
  --cyber-glow: rgba(139, 92, 246, 0.18);
  --gold: #f0c456;
  --gold-dim: #d4a843;
  --emerald: #34d399;
  --purple: #8b5cf6;
  --green: #34d399;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-full: 9999px;
  --transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevated:
    0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-glow:
    0 0 50px rgba(139, 92, 246, 0.07), 0 0 100px rgba(139, 92, 246, 0.03);
}

/* â”€â”€â”€ Reset â”€â”€â”€ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Film-grain noise overlay for depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}
::selection {
  background: var(--cyber);
  color: #000;
}

/* â”€â”€â”€ Scrollbar â”€â”€â”€ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyber-dim);
}

/* â”€â”€â”€ Utilities â”€â”€â”€ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.accent {
  color: var(--cyber);
}
.text-cyber {
  color: var(--cyber);
  font-weight: 600;
}
.text-gold {
  color: var(--gold);
  font-weight: 600;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--cyber) 0%,
    #6dd5ed 50%,
    var(--gold) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: rgba(14, 14, 22, 0.65);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Live Pulse — location indicator */
@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  margin-right: 8px;
  animation: livePulse 2s ease-in-out infinite;
  vertical-align: middle;
}

.section-divider {
  height: 1px;
  max-width: 400px;
  margin: 0 auto 80px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 255, 0.3),
    rgba(212, 168, 67, 0.3),
    transparent
  );
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyber);
  margin-bottom: 14px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.1);
}
.section-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.section-desc {
  color: var(--text-dim);
  max-width: 520px;
  margin: 14px auto 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* â”€â”€â”€ Buttons â”€â”€â”€ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyber), var(--cyber-dim));
  color: #000;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover::before {
  opacity: 1;
}
.btn-primary:hover {
  box-shadow:
    0 0 30px rgba(0, 212, 255, 0.3),
    0 0 60px rgba(0, 212, 255, 0.1);
  transform: translateY(-3px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.btn-small {
  padding: 10px 20px;
  font-size: 0.8rem;
}
.btn-full {
  width: 100%;
  justify-content: center;
}

/* â”€â”€â”€ Honeypot â”€â”€â”€ */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(8, 8, 14, 0.82);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow:
    0 4px 40px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.02);
  padding: 10px 0;
}
.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  transition: opacity 0.3s;
}
.nav-logo:hover {
  opacity: 0.8;
}
.nav-logo-img {
  height: 36px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyber);
  transition: width 0.3s;
}
.nav-links a:hover {
  color: var(--cyber);
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyber);
  transition: var(--transition);
}
.nav-cta:hover {
  background: rgba(0, 212, 255, 0.18);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════════ */
.lang-switcher {
  position: relative;
  margin-left: 12px;
  z-index: 1001;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}
.lang-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(22, 22, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.25s,
    visibility 0.25s,
    transform 0.25s;
}
.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-family: var(--font);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  text-align: left;
}
.lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.lang-option.active {
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyber);
}

/* ═══════════════════════════════════════════════════════
   RTL SUPPORT
   ═══════════════════════════════════════════════════════ */
[dir="rtl"] {
  direction: rtl;
}
[dir="rtl"] .nav-container {
  flex-direction: row-reverse;
}
[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}
[dir="rtl"] .lang-switcher {
  margin-left: 0;
  margin-right: 12px;
}
[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}
[dir="rtl"] .lang-option {
  text-align: right;
}
[dir="rtl"] .hero-text--center,
[dir="rtl"] .section-header {
  text-align: center;
}
[dir="rtl"] .section-desc,
[dir="rtl"] .skill-category__desc,
[dir="rtl"] .project-card__tagline,
[dir="rtl"] .bento-card__desc,
[dir="rtl"] .bento-card__motto-sub {
  text-align: right;
}
[dir="rtl"] .contact-form label {
  text-align: right;
}
[dir="rtl"] .skill-tags,
[dir="rtl"] .project-card__tags {
  direction: rtl;
}
[dir="rtl"] .footer__inner {
  direction: rtl;
}
[dir="rtl"] .legal-modal__content p,
[dir="rtl"] .legal-modal__content li {
  text-align: right;
}
[dir="rtl"] .bento-card__img-label {
  left: auto;
  right: 24px;
}
[dir="rtl"] .hero-ctas {
  flex-direction: row-reverse;
}

/* ═══════════════════════════════════════════════════════
   HERO â€” Full-Screen Cinematic Banner
   ═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
  background: url("assets/images/new_hero.webp") center center / cover no-repeat;
  background-attachment: fixed;
  background-color: var(--bg);
}
/* JPEG fallback */
@supports not (
  background-image: -webkit-image-set(
      url("assets/images/new_hero.webp") type("image/webp")
    )
) {
  .hero {
    background-image: url("assets/images/new_hero.jpg");
  }
}
/* Dark cinematic overlay â€” strong for razor-sharp text */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 15, 0.82) 0%,
    rgba(10, 10, 15, 0.5) 45%,
    rgba(10, 10, 15, 0.72) 100%
  );
  z-index: 1;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
  pointer-events: none;
}

/* Banner layout: centered */
.hero-content--banner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1140px;
  width: 100%;
}
.hero-text--center {
  text-align: center;
  max-width: 700px;
}
.hero-text--center .hero-badge {
  margin-left: auto;
  margin-right: auto;
}
.hero-text--center .hero-ctas {
  justify-content: center;
}

/* Hero element spacing & visual hierarchy */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.02;
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}
.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-tagline {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 500;
  color: var(--cyber);
  opacity: 0.75;
  margin-bottom: 40px;
  letter-spacing: 0.04em;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.4;
    transform: scaleY(0.6);
  }
}

/* ═══════════════════════════════════════════════════════
   ABOUT â€” Bento Grid
   ═══════════════════════════════════════════════════════ */
.about {
  padding: 120px 0;
}

/* â”€â”€â”€ Grid Layout â”€â”€â”€ */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  grid-template-rows: auto auto auto;
  gap: 24px;
}

/* Card placement â€” 3-column narrative Bento */
.bento-card--portrait {
  grid-column: 1;
  grid-row: 1;
}
.bento-card--bio {
  grid-column: 1;
  grid-row: 2;
}
.bento-card--accent {
  grid-column: 2;
  grid-row: 1;
}
.bento-card--philosophy {
  grid-column: 2;
  grid-row: 2;
}
.bento-card--lifestyle {
  grid-column: 3;
  grid-row: 1 / 3;
}
.bento-card--security {
  grid-column: 1 / -1;
  grid-row: 3;
}

/* â”€â”€â”€ Base Card â”€â”€â”€ */
.bento-card {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  min-height: 0;
}
.bento-card:hover {
  border-color: rgba(0, 212, 255, 0.15);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(0, 212, 255, 0.06);
  transform: translateY(-6px);
}

/* â”€â”€â”€ Card Content Container â”€â”€â”€ */
.bento-card__content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* â”€â”€â”€ Image Cards â”€â”€â”€ */
.bento-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.bento-card:hover .bento-card__img {
  transform: scale(1.05);
}

/* Portrait card */
.bento-card--portrait {
  aspect-ratio: 3 / 4;
}
.bento-card--portrait picture {
  width: 100%;
  height: 100%;
}
.bento-card--portrait .bento-card__img {
  object-position: center 15%;
}

/* Accent card (me4) */
.bento-card--accent {
  aspect-ratio: 3 / 4;
}
.bento-card--accent picture {
  width: 100%;
  height: 100%;
}
.bento-card--accent .bento-card__img {
  object-position: center 15%;
}

.bento-card__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(10, 10, 15, 0.6) 100%
  );
  pointer-events: none;
}

/* Lifestyle card â€” tall right column */
.bento-card--lifestyle {
  min-height: 100%;
}
.bento-card--lifestyle picture {
  position: absolute;
  inset: 0;
}
.bento-card--lifestyle .bento-card__img {
  position: absolute;
  inset: 0;
  object-position: center 30%;
}
.bento-card__img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 15, 0.7) 0%,
    rgba(10, 10, 15, 0.3) 40%,
    rgba(0, 212, 255, 0.08) 100%
  );
  pointer-events: none;
}
.bento-card__img-label {
  position: absolute;
  bottom: 20px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.bento-card__img-label i {
  color: var(--cyber);
  font-size: 0.9rem;
}

/* â”€â”€â”€ Bio Card â”€â”€â”€ */
.bento-card--bio .bento-card__content {
  justify-content: center;
}

/* â”€â”€â”€ Icon Wrap â”€â”€â”€ */
.bento-card__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--cyber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-bottom: 14px;
  transition: background 0.3s;
}
.bento-card:hover .bento-card__icon-wrap {
  background: rgba(0, 212, 255, 0.2);
}
.bento-card__icon-wrap--gold {
  background: rgba(212, 168, 67, 0.1);
  color: var(--gold);
}
.bento-card:hover .bento-card__icon-wrap--gold {
  background: rgba(212, 168, 67, 0.2);
}

/* â”€â”€â”€ Card Titles & Descriptions â”€â”€â”€ */
.bento-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.bento-card__desc {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.75;
}
.bento-card__desc strong {
  color: #fff;
}

/* â”€â”€â”€ Security Banner (Full-Width) â”€â”€â”€ */
.bento-card--security {
  background: linear-gradient(
    135deg,
    rgba(212, 168, 67, 0.04) 0%,
    rgba(10, 10, 15, 0.6) 50%,
    rgba(212, 168, 67, 0.03) 100%
  );
  border-color: rgba(212, 168, 67, 0.12);
}
.bento-card--security:hover {
  border-color: rgba(212, 168, 67, 0.25);
  box-shadow:
    0 0 40px rgba(212, 168, 67, 0.08),
    0 0 80px rgba(212, 168, 67, 0.03);
}
.bento-banner {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px;
}
.bento-banner__left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.bento-banner__left .bento-card__icon-wrap {
  margin-bottom: 0;
}

/* â”€â”€â”€ Security Tags â”€â”€â”€ */
.bento-security-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bento-security-tags span {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.2);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  transition: var(--transition);
  white-space: nowrap;
}
.bento-security-tags span:hover {
  background: rgba(212, 168, 67, 0.18);
  border-color: rgba(212, 168, 67, 0.4);
}

/* ═══════════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════════ */
.projects {
  padding: 120px 0;
}
.projects-stack {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* â”€â”€â”€ Project Card â”€â”€â”€ */
.proj-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  transition: var(--transition);
}
.proj-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 48px rgba(0, 212, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 212, 255, 0.12);
}

/* Alternate layout: even cards flip image to right */
.proj-card:nth-child(even) {
  direction: rtl;
}
.proj-card:nth-child(even) > * {
  direction: ltr;
}

/* â”€â”€â”€ Browser Frame Mockup â”€â”€â”€ */
.proj-card__browser {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.proj-card__browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(30, 30, 40, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot--red {
  background: #ff5f57;
}
.dot--yellow {
  background: #ffbd2e;
}
.dot--green {
  background: #28c840;
}
.proj-card__browser-url {
  margin-left: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: "SF Mono", "Fira Code", monospace;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* â”€â”€â”€ Viewport â€” Giant Minimalist Typography â”€â”€â”€ */
.proj-card__viewport {
  height: 280px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-card:hover .proj-card__viewport {
  transform: scale(1.03);
}

/* Giant watermark letter */
.viewport__letter {
  position: absolute;
  font-size: 15rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
}

/* Foreground label */
.viewport__label {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyber);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Subtle glow on hover */
.proj-card__viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(0, 212, 255, 0.04) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s;
}
.proj-card:hover .proj-card__viewport::after {
  opacity: 1;
}

/* â”€â”€â”€ Card Body â”€â”€â”€ */
.proj-card__body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.proj-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyber);
  width: fit-content;
}
.proj-card__badge i {
  font-size: 0.7rem;
}
.proj-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.proj-card__desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* â”€â”€â”€ Tech Chips â”€â”€â”€ */
.proj-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-chip {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  transition: var(--transition);
}
.tech-chip--core {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--cyber);
}
.tech-chip--ui {
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.2);
  color: var(--gold);
}
.proj-card:hover .tech-chip--core {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}
.proj-card:hover .tech-chip--ui {
  background: rgba(212, 168, 67, 0.15);
  border-color: rgba(212, 168, 67, 0.4);
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.15);
}

/* â”€â”€â”€ Engineering Highlights â”€â”€â”€ */
.proj-card__highlights {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.highlight {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.highlight i {
  color: var(--cyber);
  font-size: 0.78rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* â”€â”€â”€ Action Buttons â”€â”€â”€ */
.proj-card__actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.btn-sm {
  padding: 10px 20px;
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════ */
.contact {
  padding: 120px 0 60px;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}
.contact-form {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-group input,
.form-group textarea {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyber);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-status {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding-top: 36px;
}
.contact-socials {
  display: flex;
  gap: 12px;
}
.social-link {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-dim);
  transition: var(--transition);
}
.social-link:hover {
  color: var(--cyber);
  border-color: rgba(0, 212, 255, 0.25);
  box-shadow:
    0 0 30px rgba(0, 212, 255, 0.12),
    0 0 60px rgba(0, 212, 255, 0.04);
  transform: translateY(-4px);
}
.contact-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 32px 24px;
  text-align: center;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer__legal {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer__legal a {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__legal a:hover {
  color: var(--cyber);
}
.footer__dot {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* ═══════════════════════════════════════════════════════
   LEGAL MODALS
   ═══════════════════════════════════════════════════════ */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s,
    visibility 0.35s;
}
.legal-modal.active {
  opacity: 1;
  visibility: visible;
}
.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.legal-modal__content {
  position: relative;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  border-radius: var(--radius);
  background: rgba(22, 22, 30, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.legal-modal__content::-webkit-scrollbar {
  width: 6px;
}
.legal-modal__content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.legal-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.legal-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.legal-modal__content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.legal-modal__ref {
  font-size: 0.78rem;
  color: var(--cyber);
  font-weight: 600;
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.legal-modal__content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ededed;
  margin: 24px 0 8px;
}
.legal-modal__content p {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-modal__content a {
  color: var(--cyber);
  text-decoration: none;
}
.legal-modal__content a:hover {
  text-decoration: underline;
}
.legal-modal__content ul {
  padding-left: 20px;
  margin: 8px 0 16px;
}
.legal-modal__content li {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 6px;
}
.legal-modal__content strong {
  color: #ededed;
}

@media (max-width: 480px) {
  .legal-modal__content {
    padding: 28px 20px;
    width: 95%;
    max-height: 85vh;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 24px;
  }
  .bento-card--portrait,
  .bento-card--bio,
  .bento-card--accent,
  .bento-card--philosophy,
  .bento-card--lifestyle,
  .bento-card--security {
    grid-column: 1;
    grid-row: auto;
  }
  .bento-card--portrait {
    order: 1;
    aspect-ratio: 3 / 4;
  }
  .bento-card--bio {
    order: 2;
  }
  .bento-card--accent {
    order: 3;
    aspect-ratio: 3 / 4;
  }
  .bento-card--philosophy {
    order: 4;
  }
  .bento-card--lifestyle {
    order: 5;
    aspect-ratio: 4 / 5;
  }
  .bento-card--security {
    order: 6;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }

  /* Mobile Menu */
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(22, 22, 30, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 16px 24px;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .nav-links.active li a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  /* Hero: mobile focal point + disable fixed (iOS) */
  .hero {
    background-position: 65% center;
    background-attachment: scroll;
    padding: 100px 20px 60px;
  }
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(10, 10, 15, 0.88) 0%,
      rgba(10, 10, 15, 0.6) 50%,
      rgba(10, 10, 15, 0.8) 100%
    );
  }

  .hero-content--banner {
    text-align: center;
  }
  .hero-ctas {
    justify-content: center;
  }

  .proj-card {
    grid-template-columns: 1fr;
  }
  .proj-card:nth-child(even) {
    direction: ltr;
  }
  .proj-card__viewport {
    height: 200px;
  }
  .proj-card__body {
    padding: 24px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .bento-card--portrait,
  .bento-card--bio,
  .bento-card--accent,
  .bento-card--philosophy,
  .bento-card--lifestyle,
  .bento-card--security {
    grid-column: 1;
    grid-row: auto;
  }
  .bento-card--portrait {
    order: 1;
    aspect-ratio: 4 / 5;
  }
  .bento-card--bio {
    order: 2;
  }
  .bento-card--accent {
    order: 3;
    aspect-ratio: 4 / 5;
  }
  .bento-card--philosophy {
    order: 4;
  }
  .bento-card--lifestyle {
    order: 5;
    aspect-ratio: 4 / 3;
  }
  .bento-card--security {
    order: 6;
  }
  .bento-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
  .bento-security-tags {
    width: 100%;
    justify-content: flex-start;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  .contact-info {
    padding-top: 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-ctas {
    flex-direction: column;
  }
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 420px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: rgba(22, 22, 30, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 212, 255, 0.08);
}
.toast--success {
  border-left: 3px solid var(--green);
}
.toast--error {
  border-left: 3px solid #ef4444;
}

.toast__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast--success .toast__icon {
  color: var(--green);
}
.toast--error .toast__icon {
  color: #ef4444;
}

.toast__content {
  flex: 1;
}
.toast__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.toast__message {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.toast__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px;
  transition: color 0.2s;
  flex-shrink: 0;
}
.toast__close:hover {
  color: #fff;
}

@media (max-width: 480px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* ═══════════════════════════════════════════════════════
   FORM VALIDATION & LOADING
   ═══════════════════════════════════════════════════════ */
.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  animation: fieldShake 0.4s ease;
}
@keyframes fieldShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.btn-loading {
  opacity: 0.85;
  pointer-events: none;
}
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════════════════════
   PERFORMANCE: Reduced Motion & Mobile Optimization
   ═══════════════════════════════════════════════════════ */
@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;
  }
  .scroll-line {
    animation: none;
  }
}

/* Mobile: lighter effects for better performance */
@media (max-width: 768px) {
  .glass {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .hero-glow {
    display: none;
  }

  #navbar.scrolled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .skill-category:hover {
    box-shadow: none;
  }
  .bento-card:hover {
    transform: none;
    box-shadow: none;
  }
}
