/* ═══════════════════════════════════════════════════════════
   styles.css — Mustafa Aljwaim Portfolio
   ═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────
   1. DESIGN TOKENS (CSS Variables)
─────────────────────────────────────── */
:root {
  --bg:       #222831;
  --bg2:      #2d3440;
  --surface:  rgba(57, 62, 70, 0.5);
  --accent:   #00adb5;
  --accent2:  #007b82;
  --text:     #eeeeee;
  --text-dim: rgba(238, 238, 238, 0.65);
  --radius:   16px;
  --trans:    0.3s ease;
}

[data-theme="light"] {
  --bg:       #f0f4f8;
  --bg2:      #dde4ed;
  --surface:  rgba(200, 210, 225, 0.6);
  --text:     #1a1f2e;
  --text-dim: rgba(30, 40, 60, 0.65);
}

/* ───────────────────────────────────────
   2. RTL SUPPORT (Arabic)
─────────────────────────────────────── */
[dir="rtl"] body                        { font-family: "Noto Kufi Arabic", "Poppins", sans-serif; }
[dir="rtl"] .arrow                      { transform: translateX(5.5rem) translateY(1.5rem) scaleX(-1); }
[dir="rtl"] .aboutMetext                { flex-direction: row-reverse; }
[dir="rtl"] .timeline                   { padding-left: 0; padding-right: 2rem; }
[dir="rtl"] .timeline::before          { left: auto; right: 0; }
[dir="rtl"] .timeline-dot              { left: auto; right: -2.42rem; }
[dir="rtl"] .navigation a::after       { left: auto; right: 0; }
[dir="rtl"] .back-to-top               { right: auto; left: 2rem; }
[dir="rtl"] .skill-top,
[dir="rtl"] .game-stats,
[dir="rtl"] .contact-form-wrap         { direction: rtl; }

/* ───────────────────────────────────────
   3. RESET & BASE
─────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html { font-size: 16px; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  transition: background var(--trans), color var(--trans);
  overflow-x: hidden;
}

/* Utility classes */
.mono   { font-family: "JetBrains Mono", monospace; }
.accent { color: var(--accent); }

/* ───────────────────────────────────────
   4. SCROLL PROGRESS BAR
─────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* ───────────────────────────────────────
   5. PARTICLES CANVAS
─────────────────────────────────────── */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* ───────────────────────────────────────
   6. CUSTOM CURSOR (desktop only)
─────────────────────────────────────── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

.cursor-dot  { width: 6px;  height: 6px;  background: var(--accent); }
.cursor-ring {
  width: 28px; height: 28px;
  border: 2px solid var(--accent);
  transition: transform 0.12s, opacity 0.3s;
}

/* ───────────────────────────────────────
    6b. HEADER MUSIC VOLUME (hover reveal)
─────────────────────────────────────── */
.music-header-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}
.music-header-vol {
  width: 0;
  overflow: hidden;
  transition: width 0.2s ease;
}
.music-header-wrap:hover .music-header-vol { width: 80px; }
.music-header-vol input[type="range"] {
  width: 80px;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
  margin: 0;
}
[dir="rtl"] .music-header-vol input { direction: rtl; }

/* ───────────────────────────────────────
    7. SCROLL REVEAL ANIMATION
─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───────────────────────────────────────
   8. HEADER
─────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 100;
}

.logo { height: 40px; }

.navigation ul {
  display: flex;
  list-style: none;
  gap: 1.8rem;
}

.navigation a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--trans);
  position: relative;
}

.navigation a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--trans);
}

.navigation a:hover             { color: var(--accent); }
.navigation a:hover::after      { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 0.3rem;
  background: var(--surface);
  border-radius: 20px;
  padding: 3px;
  backdrop-filter: blur(4px);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: 16px;
  font-family: "JetBrains Mono", monospace;
  transition: background var(--trans), color var(--trans);
}

.lang-btn.active            { background: var(--accent); color: #fff; }
.lang-btn:hover:not(.active){ color: var(--text); }
.lang-switch-mobile         { margin-top: 2rem; }

/* Theme toggle */
.theme-toggle {
  background: var(--surface);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform var(--trans);
}
.theme-toggle:hover { transform: rotate(20deg); }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Mobile full-screen menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mobile-menu.open { display: flex; }
.mobile-menu ul   { list-style: none; text-align: center; }
.mobile-menu li   { margin: 1.2rem 0; }

.mobile-menu a {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color var(--trans);
}
.mobile-menu a:hover { color: var(--accent); }

/* Dividers */
.header-hr,
.footer-hr { opacity: 0.1; border-color: var(--text); }

/* ───────────────────────────────────────
   9. HERO
─────────────────────────────────────── */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 85vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}

.arrow {
  position: absolute;
  transform: translateX(-5.5rem) translateY(1.5rem);
  opacity: 0.5;
}

.herosub {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 640px;
}

.hero-eyebrow {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.name  { font-size: clamp(2.2rem, 5vw, 3.5rem); color: var(--text); line-height: 1.1; }
.title { font-size: clamp(1.6rem, 4vw, 2.8rem); color: var(--accent); min-height: 3rem; }

.typed-wrapper   { display: flex; align-items: center; gap: 2px; }
.cursor-blink    { animation: blink 1s step-end infinite; color: var(--accent); font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  color: var(--text-dim);
  max-width: 480px;
  line-height: 1.7;
  margin-top: 0.4rem;
}

/* Availability badge */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  backdrop-filter: blur(4px);
  border-radius: 99px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
  width: fit-content;
}

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* CTA buttons */
.herobtns {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.hireMe {
  background: var(--accent);
  color: #fff;
  border-radius: 24px;
  text-decoration: none;
  padding: 0.6rem 1.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--accent);
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-family: inherit;
}
.hireMe:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 173, 181, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-radius: 24px;
  text-decoration: none;
  padding: 0.6rem 1.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--surface);
  transition: border-color var(--trans), color var(--trans), transform var(--trans);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 24px;
  padding: 0.5rem 1.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  margin-top: 1rem;
  transition: background var(--trans), color var(--trans);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* Counters row */
.counters {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(238, 238, 238, 0.1);
  padding-top: 1.5rem;
}

.counter-item  { display: flex; flex-direction: column; }
.counter-num   { font-size: 2rem; font-weight: 700; color: var(--accent); font-family: "JetBrains Mono", monospace; }
.counter-label { font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

/* ───────────────────────────────────────
   10. ABOUT ME
─────────────────────────────────────── */
.aboutMe {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6rem auto;
  max-width: 1200px;
  gap: 4rem;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.aboutheIng    { max-width: 380px; width: 100%; }
.textcontainer { display: flex; flex-direction: column; gap: 0.4rem; }
.aboutMetext   { display: flex; align-items: center; gap: 8px; }

.aboutName { color: var(--text);   font-size: clamp(1.6rem, 3vw, 2.2rem); }
.aboutTitle{ color: var(--accent); font-size: clamp(1.6rem, 3vw, 2.2rem); }

.light { width: 32px; }

.aboutMePar {
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 480px;
  margin-top: 0.8rem;
  text-align: justify;
}

/* ───────────────────────────────────────
   11. SKILLS
─────────────────────────────────────── */
.skills-section {
  background: var(--bg2);
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.skills-inner   { max-width: 1200px; margin: 0 auto; }
.section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 3rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.skill-card {
  background: var(--surface);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.skill-pct { color: var(--accent); font-family: "JetBrains Mono", monospace; }

.skill-bar  { background: rgba(255,255,255,0.1); border-radius: 99px; height: 6px; overflow: hidden; }
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  width: 0;
  transition: width 1s ease;
}

/* ───────────────────────────────────────
   12. WORKS / PROJECTS
─────────────────────────────────────── */
.works {
  background-image: url("assets/svg/background.svg");
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.worksContainer { max-width: 1200px; margin: 0 auto; }

.works ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.works li {
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(4px);
  padding: 1rem 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.works li img {
  width: 200px; height: 200px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s;
}

.works li:hover img { transform: scale(1.08); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 173, 181, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: var(--radius);
}
.project-overlay span          { color: #fff; font-weight: 700; font-size: 1rem; }
.works li:hover .project-overlay{ opacity: 1; }

/* Touch devices have no :hover — show the label without needing a hover state */
@media (hover: none) {
  .project-overlay { opacity: 1; background: rgba(0, 173, 181, 0.55); }
}

.project-label {
  text-align: center;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.project-github {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.3rem;
  transition: opacity var(--trans);
}
.project-github:hover { opacity: 0.75; text-decoration: underline; }

/* ───────────────────────────────────────
   13. TIMELINE
─────────────────────────────────────── */
.timeline-section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
  background: var(--bg2);
}

.timeline-inner { max-width: 800px; margin: 0 auto; }

.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item { position: relative; margin-bottom: 2.5rem; }

.timeline-dot {
  position: absolute;
  left: -2.42rem;
  top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg2);
  box-shadow: 0 0 10px var(--accent);
}

.timeline-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

.timeline-year {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.timeline-content p  { color: var(--text-dim); font-size: 0.88rem; line-height: 1.7; }

/* ───────────────────────────────────────
   14. TYPING SPEED GAME
─────────────────────────────────────── */
.game-section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.game-inner  { max-width: 800px; margin: 0 auto; }
.game-desc   { color: var(--text-dim); margin-bottom: 2rem; }

.game-box {
  background: var(--surface);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.game-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.stat        { display: flex; flex-direction: column; align-items: center; }
.stat span   { font-size: 2rem; font-weight: 700; color: var(--accent); font-family: "JetBrains Mono", monospace; }
.stat label  { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

.game-text {
  background: var(--bg);
  border-radius: 8px;
  padding: 1.2rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 1rem;
  min-height: 80px;
  color: var(--text-dim);
  user-select: none;
  letter-spacing: 0.5px;
}

.game-text .correct { color: var(--accent); }
.game-text .wrong   { color: #e05c5c; background: rgba(224, 92, 92, 0.15); border-radius: 2px; }
.game-text .current { border-bottom: 2px solid var(--accent); }

.game-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  resize: none;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color var(--trans);
}
.game-input:focus { border-color: var(--accent); }

.game-controls { display: flex; gap: 1rem; justify-content: center; }

.game-result {
  margin-top: 1.5rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
}
.game-result h3     { color: var(--accent); margin-bottom: 0.5rem; }
.game-result p      { color: var(--text-dim); margin: 0.3rem 0; }
.game-result strong { color: var(--text); }
#scoreMsg           { margin-top: 0.5rem; font-weight: 600; color: var(--accent); }

/* ───────────────────────────────────────
   15. CONTACT
─────────────────────────────────────── */
.contactContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.contactTitle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-form-wrap {
  display: flex;
  gap: 3rem;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.form-group        { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label  { font-size: 0.85rem; color: var(--text-dim); font-weight: 500; }

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--trans);
  backdrop-filter: blur(4px);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-submit  { width: 100%; margin-top: 0.5rem; border: none; }
.form-note    { font-size: 0.85rem; color: var(--accent); text-align: center; min-height: 1.2rem; }
.privacy-note { font-size: 0.75rem; color: var(--text-dim); text-align: center; margin-top: 0.4rem; line-height: 1.6; opacity: 0.8; }

/* Contact info column */
.contact-info { display: flex; flex-direction: column; gap: 2rem; justify-content: center; }
.contact      { display: flex; flex-direction: column; gap: 1rem; }

.emailAndPhone { display: flex; align-items: center; gap: 0.6rem; }
.emailAndPhone img { width: 22px; }
.emailAndPhone h3  { font-size: 0.95rem; font-weight: 500; color: var(--text); }
.emailAndPhone a   { text-decoration: none; color: var(--text); transition: color var(--trans); }
.emailAndPhone a:hover { color: var(--accent); }

/* Copy email button */
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.6;
  transition: opacity var(--trans), transform var(--trans);
  padding: 0.2rem;
}
.copy-btn:hover { opacity: 1; transform: scale(1.15); }

/* Social icons */
.socialMedia { display: flex; gap: 1rem; flex-wrap: wrap; }

.socialMedia a {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  background: var(--surface);
  backdrop-filter: blur(4px);
  padding: 0.8rem;
  transition: background var(--trans), transform var(--trans);
}
.socialMedia a:hover { background: var(--accent); transform: translateY(-3px); }
.socialMedia img     { width: 22px; height: 22px; }

/* ───────────────────────────────────────
   16. BACK TO TOP BUTTON
─────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 500;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 173, 181, 0.4);
  transition: transform var(--trans);
}
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top.show  { display: flex; }

/* ───────────────────────────────────────
    17. MUSIC PLAYER
─────────────────────────────────────── */
.music-player {
  position: fixed;
  bottom: 80px; right: 20px;
  z-index: 999;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 320px;
}
.music-player.hidden { transform: translateY(20px); opacity: 0; pointer-events: none; }
.music-player.floating-mode {
  position: fixed;
  bottom: 80px; right: 20px;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  max-width: 320px;
  gap: 10px;
}
.music-player.floating-mode .mp-name { display: block; }
.music-player.floating-mode .mp-volume { display: inline; }
.music-player.floating-mode .mp-close { display: block; }
.music-player.floating-mode .mp-btn {
  width: 36px; height: 36px;
  background: none;
  backdrop-filter: none;
  font-size: 20px;
}
.music-player .mp-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.music-player .mp-btn:hover { background: rgba(255,255,255,0.1); }
.music-player .mp-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.music-player .mp-volume {
  width: 60px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.music-player .mp-close {
  font-size: 14px;
  opacity: 0.5;
  width: 28px; height: 28px;
}
.music-player .mp-close:hover { opacity: 1; }
[dir="rtl"] .music-player { right: auto; left: 20px; }

/* Music player — inline in header (desktop mode, before scroll) */
.music-player.header-mode {
  position: static;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  max-width: unset;
  gap: 0;
  bottom: auto; right: auto;
}
.music-player.header-mode .mp-name { display: none; }
.music-player.header-mode .mp-volume { display: none; }
.music-player.header-mode .mp-close { display: none; }
.music-player.header-mode .mp-btn {
  width: 38px; height: 38px;
  background: var(--surface);
  backdrop-filter: blur(4px);
  font-size: 1rem;
}
[dir="rtl"] .music-player.header-mode { left: auto; right: auto; }
@keyframes mp-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(0,173,181,0.5); } 50% { box-shadow: 0 0 0 8px rgba(0,173,181,0); } }

/* ───────────────────────────────────────
    18. FOOTER
─────────────────────────────────────── */
footer {
  color: var(--text-dim);
  padding: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-sub { font-size: 0.78rem; margin-top: 0.4rem; opacity: 0.5; }

/* ───────────────────────────────────────
   18. RESPONSIVE — Tablet & Mobile
─────────────────────────────────────── */
@media (max-width: 768px) {
  header        { padding: 1rem; }
  .navigation   { display: none; }
  .nav-toggle   { display: block; }
  .arrow        { display: none; }

  .hero {
    padding: 3rem 1.5rem;
    min-height: unset;
  }

  .aboutMe {
    flex-direction: column-reverse;
    padding: 0 1.5rem;
    gap: 2rem;
    margin: 4rem auto;
  }
  .aboutheIng { max-width: 260px; }

  .skills-section,
  .timeline-section,
  .game-section { padding: 4rem 1.5rem; }

  .works     { padding: 4rem 1.5rem; }
  .works ul  { flex-direction: column; align-items: center; }

  .contactContainer   { margin: 4rem auto; padding: 0 1.5rem; }
  .contact-form-wrap  { flex-direction: column; gap: 2rem; }

  .counters   { gap: 1.2rem; }
  .game-stats { gap: 1rem; }
}

/* ───────────────────────────────────────
   19. ACCESSIBILITY — Reduced Motion
─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ───────────────────────────────────────
   20. COOKIE CONSENT BANNER
─────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translate(-50%, 150%);
  width: min(92%, 620px);
  z-index: 2000;
  background: var(--bg2);
  border: 1px solid var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}

.cookie-banner.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.cookie-text {
  flex: 1 1 260px;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cookie-actions .btn-outline,
.cookie-actions .hireMe {
  padding: 0.45rem 1.1rem;
  font-size: 0.82rem;
  margin-top: 0;
}

[dir="rtl"] .cookie-banner { direction: rtl; }

@media (max-width: 560px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .cookie-actions { justify-content: center; }
}

/* Extra safety margin for very narrow phones (older/small Android, iPhone SE) */
@media (max-width: 380px) {
  .hero        { padding: 2.5rem 1rem; }
  .herobtns    { gap: 0.7rem; }
  .game-box    { padding: 1.2rem; }
  .game-stats  { gap: 0.8rem; }
  .works li    { padding: 0.8rem 1.2rem; }
  .works li img{ width: 160px; height: 160px; }
}


