/* =========================================================
   NESMA HESHAM PORTFOLIO
   Main stylesheet — Warm Coffee & Espresso Palette ☕
   Smooth Transitions & Modern Bow Header Logo
   ========================================================= */

/* ---------- Design Tokens (Coffee & Latte Theme) ---------- */
:root {
  /* Light Theme: Cream, Milk Foam & Warm Latte */
  --bg: #fdfbf7;             /* لون الرغوة / الكريمي الناعم */
  --bg-alt: #f5efe6;         /* لون حليبي دافئ */
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #2c1d11;            /* بني غامق جاف (قهوة مركزة) */
  --muted: #7c624d;          /* بني متوسط دافئ */
  --line: rgba(140, 90, 60, 0.12);

  --primary: #8c5a3c;        /* بني قهوة كلاسيكي */
  --primary-2: #a66e4e;      /* بني كراميل دافئ */
  --accent: #d4a373;         /* لاتيه مائل للذهبي */

  --shadow: 0 20px 50px -10px rgba(60, 35, 15, 0.12);
  --shadow-sm: 0 8px 30px rgba(60, 35, 15, 0.06);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1160px;
  --header-height: 76px;
  --transition: 350ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark {
  /* Dark Theme: Rich Roasted Espresso */
  --bg: #160f0a;             /* إسبيريسو مركز محمص */
  --bg-alt: #201710;         /* بني كاكاو غامق */
  --surface: rgba(35, 25, 18, 0.82);
  --surface-solid: #261b13;
  --text: #f5ebe0;            /* لون رغوة القهوة الفاتح */
  --muted: #bfa895;          /* بني فاتح دافئ */
  --line: rgba(212, 163, 115, 0.15);

  --primary: #d4a373;        /* كراميل دافئ مضيء */
  --primary-2: #e0b083;      /* لاتيه مشرق */
  --accent: #dda15e;         /* بني ممزوج بلمسة دافئة */

  --shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65);
  --shadow-sm: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.68;
  transition:
    background var(--transition),
    color var(--transition);
}

body[dir="rtl"] {
  font-family: "Cairo", "Inter", Arial, sans-serif;
}

body[dir="rtl"] .hero-meta,
body[dir="rtl"] .project-topline,
body[dir="rtl"] .footer-inner {
  direction: rtl;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 110px 0;
  position: relative;
}

.section-alt {
  background: var(--bg-alt);
  transition: background var(--transition);
}

/* ---------- Header & Navbar ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.navbar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

/* ---------- Brand Logo: Bow First + Nesma + Dot 🎀 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* المسافة بين الفيونكة والاسم */
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: transform var(--transition);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-bow-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* حجم صورة الفيونكة نسبياً */
.brand-bow-img {
  width: 32px; /* حجم الفيونكة الأنيق والكبير نسبياً */
  height: auto;
  object-fit: contain;
  transition: transform var(--transition);
  filter: sepia(0.5) hue-rotate(330deg) saturate(1.2); /* يتلاءم مع ألوان القهوة */
}

.brand:hover .brand-bow-img {
  transform: rotate(-10deg) scale(1.1);
}

.brand-name {
  font-weight: 800;
  line-height: 1;
}

.brand-dot {
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
  margin-inline-start: -4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 600;
  transition: color var(--transition), transform var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

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

.icon-btn,
.lang-btn,
.menu-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.icon-btn:hover,
.lang-btn:hover,
.menu-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  padding: 0 12px;
  font-weight: 700;
  font-size: 0.82rem;
}

.menu-btn {
  display: none;
}

.nav-cv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 800;
  transition: var(--transition);
}

.nav-cv:hover {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(140, 90, 60, 0.25);
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 800;
  margin-bottom: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 800px;
  margin-bottom: 23px;
  font-size: clamp(2.65rem, 6vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 55px;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.section-heading p,
.projects-heading > p {
  color: var(--muted);
  max-width: 450px;
}

/* ---------- Typewriter Text ---------- */
.typewriter-text {
  color: var(--primary);
  border-inline-end: 2px solid var(--primary);
  padding-inline-end: 4px;
  animation: blink 0.8s ease-in-out infinite;
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary); }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: calc(var(--header-height) + 50px);
}

/* Coffee Steam / Aura Effect */
.hero::before {
  content: "";
  position: absolute;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(212, 163, 115, 0.25) 0%,
    rgba(140, 90, 60, 0.08) 60%,
    transparent 100%
  );
  filter: blur(50px);
  top: -180px;
  right: -160px;
  pointer-events: none;
  transition: var(--transition);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 70px;
}

.hero-text {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 38px;
}

.btn {
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 28px rgba(140, 90, 60, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 16px 35px rgba(140, 90, 60, 0.35);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 25px rgba(140, 90, 60, 0.2);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-meta strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.hero-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 5px;
}

.meta-divider {
  width: 1px;
  height: 35px;
  background: var(--line);
}

/* Hero Visual & Smooth Orbit Animations */
.hero-visual {
  min-height: 580px;
  position: relative;
  display: grid;
  place-items: center;
}

.photo-frame {
  position: relative;
  width: min(390px, 78vw);
  aspect-ratio: 4 / 5;
  border-radius: 38% 38% 28% 28%;
  overflow: hidden;
  transform: rotate(3deg);
  border: 10px solid var(--surface-solid);
  box-shadow: var(--shadow);
  z-index: 2;
  transition: transform var(--transition), box-shadow var(--transition);
}

.photo-frame:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 30px 60px -10px rgba(60, 35, 15, 0.2);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: rotate(-3deg) scale(1.04);
  transition: transform 500ms ease;
}

.photo-frame:hover .profile-photo {
  transform: rotate(0deg) scale(1.06);
}

.photo-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26, 15, 10, 0.25));
  z-index: 1;
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
}

.orbit-one {
  width: 540px;
  height: 540px;
  border: 1px dashed rgba(212, 163, 115, 0.3);
  animation: spin-slow 45s linear infinite;
}

.orbit-two {
  width: 440px;
  height: 440px;
  border: 1px solid rgba(140, 90, 60, 0.2);
  animation: spin-slow 30s linear infinite reverse;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.floating-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  animation: float 5s ease-in-out infinite;
  transition: transform var(--transition);
}

.floating-card:hover {
  transform: scale(1.05);
}

.floating-card strong,
.floating-card small {
  display: block;
}

.floating-card strong {
  font-size: 0.82rem;
}

.floating-card small {
  color: var(--muted);
  font-size: 0.68rem;
}

.floating-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(140, 90, 60, 0.12);
  color: var(--primary);
}

.card-top {
  top: 17%;
  right: 3%;
}

.card-bottom {
  bottom: 13%;
  left: 3%;
  animation-delay: -2.5s;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 70px;
  align-items: start;
}

.about-copy > p {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 700px;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 35px;
}

.about-highlights div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  backdrop-filter: blur(10px);
  transition: transform var(--transition), border-color var(--transition);
}

.about-highlights div:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.about-highlights span {
  color: var(--primary);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.about-highlights strong,
.about-highlights small {
  display: block;
}

.about-highlights strong {
  font-size: 0.95rem;
}

.about-highlights small {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 3px;
}

.about-card {
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #d4a373;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(212, 163, 115, 0.2);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.check-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
}

.check-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 900;
  margin-inline-end: 10px;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.skill-card {
  min-height: 320px;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 18px 35px -10px rgba(140, 90, 60, 0.2);
  border-color: var(--primary);
}

.skill-number {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
}

.skill-card h3 {
  margin: 55px 0 12px;
  font-size: 1.1rem;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.82rem;
}

.tag-list,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.tag-list span,
.project-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 0.68rem;
  transition: var(--transition);
}

/* ---------- Projects ---------- */
.projects-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.projects-heading > p {
  margin-bottom: 6px;
}

.projects-category {
  margin-bottom: 40px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 22px;
  color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Smooth Card Container */
.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 45px -12px rgba(140, 90, 60, 0.22);
}

/* Image Wrapper with Smooth Zoom */
.project-media {
  height: 300px;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}

.project-media img.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition:
    transform 600ms cubic-bezier(0.25, 1, 0.5, 1),
    filter 600ms ease;
  filter: brightness(0.96);
}

.project-card:hover .project-media img.project-img {
  transform: scale(1.06);
  filter: brightness(1);
}

/* Category Badge */
.media-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  color: var(--primary);
  background: var(--surface-solid);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

body[dir="rtl"] .media-label {
  left: auto;
  right: 14px;
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
}

.project-body h3 {
  margin: 12px 0 8px;
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.35;
  transition: color var(--transition);
}

.project-card:hover .project-body h3 {
  color: var(--primary);
}

.project-body p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 18px;
}

.project-tags span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-alt);
}

/* Action Links */
.project-links {
  display: flex;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all var(--transition);
}

.project-links a:hover {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(140, 90, 60, 0.25);
}

/* ---------- Experience ---------- */
.timeline-item {
  position: relative;
  padding-left: 50px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 25px;
  margin-bottom: 35px;
}

body[dir="rtl"] .timeline-item {
  padding-left: 0;
  padding-right: 50px;
}

.timeline-dot {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(140, 90, 60, 0.18);
}

body[dir="rtl"] .timeline-dot {
  left: auto;
  right: 4px;
}

.timeline-date {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.timeline-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.timeline-type {
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.timeline-card h3 {
  margin: 8px 0 10px;
}

.timeline-card p {
  color: var(--muted);
  font-size: 0.87rem;
  margin: 0;
}

.experience-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.experience-image {
  min-height: 250px;
  overflow: hidden;
  background: var(--bg-alt);
}

.experience-image img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.25, 1, 0.5, 1);
}

.experience-card:hover .experience-image img {
  transform: scale(1.05);
}

.experience-content {
  padding: 28px 28px 28px 0;
}

body[dir="rtl"] .experience-content {
  padding: 28px 0 28px 28px;
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.experience-tags span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

/* ICPC Gallery */
.competition-section {
  max-width: 900px;
  margin: 80px auto 0;
}

.competition-heading {
  margin-bottom: 28px;
}

.competition-heading h3 {
  font-size: 1.5rem;
  margin: 5px 0 8px;
}

.competition-heading p {
  color: var(--muted);
  max-width: 700px;
  font-size: 0.88rem;
}

.competition-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.competition-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.competition-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--primary);
  box-shadow: 0 18px 35px -10px rgba(140, 90, 60, 0.22);
}

.competition-image {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: var(--bg-alt);
}

.competition-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.25, 1, 0.5, 1);
}

.competition-card:hover .competition-image img {
  transform: scale(1.06);
}

.competition-image span {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(22, 15, 10, 0.78);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

body[dir="rtl"] .competition-image span {
  left: auto;
  right: 12px;
}

.competition-info {
  padding: 18px;
}

.competition-info h4 {
  margin: 0 0 5px;
  font-size: 0.92rem;
}

.competition-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.activities {
  max-width: 900px;
  margin: 80px auto 0;
}

.activities h3 {
  margin-bottom: 18px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.activity-grid span {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  background: var(--surface);
  backdrop-filter: blur(10px);
  transition: transform var(--transition);
}

.activity-grid span:hover {
  transform: translateX(4px);
}

/* ---------- Education / Training ---------- */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

.info-block {
  padding: 5px 0;
}

.info-block h2 {
  margin-bottom: 10px;
}

.info-block > p {
  color: var(--muted);
  max-width: 500px;
}

.big-stat {
  margin-top: 35px;
  font-size: clamp(3.5rem, 7vw, 5.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.07em;
  color: var(--primary);
}

.big-stat span {
  color: var(--muted);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

.training-list {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
}

.training-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 650;
  transition: transform var(--transition);
}

.training-list li:hover {
  transform: translateX(4px);
}

.training-list li span {
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
}

.training-list small {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact-section {
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: start;
}

.contact-copy h2 {
  max-width: 560px;
}

.contact-copy > p {
  color: var(--muted);
  max-width: 480px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.social-links a {
  border: 1px solid var(--line);
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 0.74rem;
  font-weight: 700;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.social-links a:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: var(--surface-solid);
}

.contact-form {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

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

.contact-form label {
  display: block;
  margin-bottom: 15px;
}

.contact-form label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.contact-form textarea {
  resize: vertical;
  min-height: 145px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(140, 90, 60, 0.15);
}

.form-submit {
  width: 100%;
  border: 0;
}

/* ---------- Footer ---------- */
.footer {
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

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

.footer p,
.footer a {
  color: var(--muted);
  font-size: 0.72rem;
  margin: 0;
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--primary);
}

/* ---------- Ultra-Smooth Scroll Reveal Animation ---------- */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition:
    opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ---------- RTL Adjustments ---------- */
body[dir="rtl"] .hero-content,
body[dir="rtl"] .about-copy,
body[dir="rtl"] .skill-card,
body[dir="rtl"] .project-body,
body[dir="rtl"] .timeline-card,
body[dir="rtl"] .info-block,
body[dir="rtl"] .contact-copy,
body[dir="rtl"] .contact-form {
  text-align: right;
}

body[dir="rtl"] .project-links,
body[dir="rtl"] .social-links {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

body[dir="rtl"] .check-list li::before {
  margin-inline-end: 0;
  margin-inline-start: 10px;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1000px) {
  .nav-links {
    gap: 17px;
  }
  .hero-grid {
    gap: 35px;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid,
  .contact-grid {
    gap: 40px;
  }
}

@media (max-width: 820px) {
  .section {
    padding: 85px 0;
  }
  .menu-btn {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 20px;
    right: 20px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 11px 13px;
    border-radius: 10px;
  }

  .nav-links a:hover {
    background: var(--bg-alt);
  }

  .hero {
    min-height: auto;
    padding-top: 145px;
  }

  .hero-grid,
  .about-grid,
  .contact-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero-content {
    text-align: center;
  }
  .hero-text {
    margin-inline: auto;
  }
  .hero-actions,
  .hero-meta {
    justify-content: center;
  }

  .hero-visual {
    min-height: 530px;
    order: -1;
  }

  .photo-frame {
    width: min(330px, 74vw);
  }

  .about-copy,
  .contact-copy {
    text-align: center;
  }

  .about-highlights {
    text-align: left;
  }
  body[dir="rtl"] .about-highlights {
    text-align: right;
  }

  .about-card {
    max-width: 620px;
    margin-inline: auto;
  }

  .contact-copy > p {
    margin-inline: auto;
  }
  .social-links {
    justify-content: center;
  }

  .projects-heading {
    display: block;
    text-align: center;
  }

  .projects-heading > p {
    margin-inline: auto;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .experience-card {
    grid-template-columns: 1fr;
  }
  .experience-image {
    min-height: 260px;
    max-height: 330px;
  }
  .experience-image img {
    min-height: 260px;
  }
  .experience-content,
  body[dir="rtl"] .experience-content {
    padding: 24px;
  }
  .competition-gallery {
    grid-template-columns: 1fr;
  }
  .competition-image {
    height: 260px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(var(--container), calc(100% - 28px));
  }
  .section {
    padding: 70px 0;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }
  h2 {
    font-size: 2.15rem;
  }

  .hero-visual {
    min-height: 455px;
  }
  .orbit-one {
    width: 400px;
    height: 400px;
  }
  .orbit-two {
    width: 330px;
    height: 330px;
  }

  .floating-card {
    padding: 9px 11px;
  }
  .card-top {
    right: 0;
  }
  .card-bottom {
    left: 0;
  }

  .about-highlights,
  .skills-grid,
  .projects-grid,
  .activity-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: auto;
  }
  .skill-card h3 {
    margin-top: 35px;
  }
  .project-media {
    height: 205px;
  }
  .contact-form {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .nav-actions {
    gap: 5px;
  }
  .icon-btn,
  .lang-btn,
  .menu-btn {
    min-width: 37px;
    height: 37px;
  }
  .lang-btn {
    padding: 0 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}