/* ═══════════════════════════════════════════════════════
   DESIGN SYSTEM — Aseel Marwan Kheder Portfolio
   Vanilla CSS3 · Variables · Grid · Flexbox
   ═══════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --bg: #0a0a0f;
  --bg-surface: #111118;
  --bg-card: #16161e;
  --border: #1e1e2a;
  --text: #ededed;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --cyber: #00d4ff;
  --cyber-dim: #00a3cc;
  --gold: #d4a843;
  --gold-dim: #b8922e;
  --purple: #7c3aed;
  --green: #10b981;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 9999px;
  --transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── 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.6;
  -webkit-font-smoothing: antialiased;
}
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), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: rgba(22, 22, 30, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.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: 56px;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyber);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  color: #fff;
}
.section-desc {
  color: var(--text-dim);
  max-width: 500px;
  margin: 12px auto 0;
  font-size: 1rem;
}

/* ─── 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: var(--cyber);
  color: #000;
}
.btn-primary:hover {
  background: var(--cyber-dim);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.25);
  transform: translateY(-2px);
}
.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(22, 22, 30, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  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"] .about-bio,
[dir="rtl"] .section-desc,
[dir="rtl"] .skill-category__desc,
[dir="rtl"] .project-card__tagline {
  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"] .about-card p,
[dir="rtl"] .legal-modal__content p,
[dir="rtl"] .legal-modal__content li {
  text-align: right;
}
[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;
}

/* 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
   ═══════════════════════════════════════════════════════ */
.about {
  padding: 120px 0;
}

.about-bio {
  max-width: 720px;
  margin: 0 auto 16px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dim);
}
.about-bio--sub {
  font-size: 0.95rem;
  margin-bottom: 56px;
}
.about-bio strong {
  color: #fff;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.about-card {
  padding: 28px;
  transition: var(--transition);
}
.about-card:hover {
  box-shadow:
    0 0 30px rgba(0, 212, 255, 0.12),
    0 0 60px rgba(0, 212, 255, 0.04);
  border-color: rgba(0, 212, 255, 0.15);
}
.about-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--cyber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 16px;
  transition: background 0.3s;
}
.about-card:hover .about-card__icon {
  background: rgba(0, 212, 255, 0.2);
}
.about-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.about-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════════════════ */
.skills {
  padding: 120px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-category {
  padding: 32px;
  transition: var(--transition);
}
.skill-category:hover {
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.12);
}
.skill-category__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.skill-category__header i {
  color: var(--cyber);
  font-size: 1rem;
}
.skill-category__header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.skill-category__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.skill-tag {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff !important;
  transition: var(--transition);
  opacity: 1 !important;
  visibility: visible !important;
}
.skill-tag:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
}
.skill-tag--ai {
  border-color: rgba(124, 58, 237, 0.35) !important;
}
.skill-tag--ai:hover {
  background: rgba(124, 58, 237, 0.22) !important;
  border-color: rgba(124, 58, 237, 0.5) !important;
  color: #c084fc !important;
}
.skill-tag--sec {
  border-color: rgba(212, 168, 67, 0.35) !important;
}
.skill-tag--sec:hover {
  background: rgba(212, 168, 67, 0.22) !important;
  border-color: rgba(212, 168, 67, 0.5) !important;
  color: #fbbf24 !important;
}

/* ═══════════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════════ */
.projects {
  padding: 120px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  transform-style: preserve-3d;
  cursor: pointer;
}
.project-card__color-bar {
  height: 3px;
  width: 100%;
  transition: height 0.4s;
}
.project-card:hover .project-card__color-bar {
  height: 4px;
}

.project-card__image {
  height: 200px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.project-card:hover .project-card__image img {
  transform: scale(1.05);
}

.project-card__placeholder {
  font-size: 3.5rem;
  font-weight: 900;
  opacity: 0.12;
}
.project-card__body {
  padding: 24px;
}
.project-card__body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.project-card__tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.5;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.project-card__tags span {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
}

/* Action Buttons */
.project-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-card__actions .btn-small {
  font-size: 0.75rem;
  padding: 8px 16px;
}

/* Hover Overlay */
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s;
}
.project-card:hover .project-card__overlay {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════
   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);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.15);
  transform: scale(1.1);
}
.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) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .about-cards {
    grid-template-columns: 1fr;
  }
}

@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;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .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;
  }
  .portrait-glow {
    filter: blur(30px);
  }
  .portrait-ring:hover {
    box-shadow: none;
  }
  .project-card__overlay {
    backdrop-filter: none;
  }
  #navbar.scrolled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .about-card:hover,
  .skill-category:hover {
    box-shadow: none;
  }
}
