
/* ===== Base Fixes (أهم قسم يوضع في البداية) ===== */

/* أوقف تكبير النص التلقائي في WebView/Safari */
html {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  font-size: 16px; /* يمنع زوم الإدخال على iOS */
  scroll-behavior: smooth;
}

/* استبدل vh بوحدات iOS الجديدة */
:root {
  --vh: 1svh; /* يستخدم الارتفاع الآمن في iOS */
}

/* اجعل الصور والفيديو تتقلص صح */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* يمنع أي تمدد عرض أفقي */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #e6edf3;
  line-height: 1.6;
  animation: fadeIn 0.6s ease-in;
  position: relative;
  overflow-x: hidden;
  background: #0d1117;
}

/* nav-links الافتراضية */
.nav-links {
  display: none;
}


/* fallback: لو المتصفح ما يدعم svh */
@supports not (height: 100svh) {
}


/* ===== Ultimate Background: Glowing Gradient + Grid Mesh ===== */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
height: 100%;
  background:
    linear-gradient(90deg, rgba(88,166,255,0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(88,166,255,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: moveGrid 14s linear infinite;
  z-index: -3;
  opacity: 0.35;
}

body::after {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
 width: 100%;
height: 100%;
  background: 
    radial-gradient(circle at 25% 30%, rgba(0,150,255,0.18), transparent 70%),
    radial-gradient(circle at 80% 70%, rgba(0,255,255,0.12), transparent 80%),
    radial-gradient(circle at center, rgba(20,80,200,0.25), transparent 65%);
  filter: blur(80px);
  animation: gradientFlow 16s ease-in-out infinite alternate;
  z-index: -2;
  opacity: 0.7;
}

@keyframes moveGrid {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}

@keyframes gradientFlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(5%, -5%) scale(1.05); opacity: 0.8; }
  100% { transform: translate(-5%, 5%) scale(1); opacity: 0.6; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Navigation ===== */
nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(22,27,34,0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #21262d;
}
nav ul {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  justify-content: center;
  gap: 28px;
  list-style: none;
}
nav a {
  color: #e6edf3;
  font-weight: 500;
  transition: color 0.2s ease;
}
nav a:hover { color: #58a6ff; }
nav a.active { color: #1f6feb; font-weight: 600; }

/* ===== Header ===== */
header .intro h1 { font-size: 2.6rem; }
header .intro p { font-size: 1.05rem; margin-bottom: 12px; }


/* === HERO / HEADER (نسخة واحدة فقط) === */
header {
  /* ارتفاع يعتمد على svh لتفادي مشاكل شريط iOS */
  min-height: calc(85 * var(--vh));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 8%;
  background: linear-gradient(145deg,#0d1117,#161b22);
  border-bottom: 1px solid #21262d;
}

/* لو عندك .container داخل الهيدر خلّ المحتوى يتمدّد */
header > .container { 
  display: flex; 
  align-items: center; 
  gap: 40px; 
}

header .intro {
  flex: 1;
  text-align: left;
}

header .intro h1 {
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  line-height: 1.15;
  max-width: 18ch;
  margin-bottom: 10px;
}

header .intro p {
  max-width: 60ch;
  font-size: clamp(1rem, 2.8vw, 1.1rem);
  color: #c9d1d9;
}

/* استجابة للجوال */
@media (max-width: 900px){
  header { 
    padding: 40px 6%; 
    flex-direction: column; 
    text-align: center; 
  }
  header .intro { text-align: center; }
}
@media (max-width: 400px){
  header .intro h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
}


  /* إصلاح إضافي لعناصر الهيدر */
  header .hero-img {
    max-width: 360px;
    width: 90%;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
  }

  header .intro {
    text-align: center !important;
    margin-top: 10px;
  }
}


/* يمنع الكلمات الطويلة من تفجير السطر */
h1, h2, h3 { overflow-wrap: anywhere; }

/* اختيارياً: قلّل أقصى طول بصري */
header .intro h1 { max-width: 18ch; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: #238636;
  color: #fff;
  padding: 10px 20px;
  margin: 8px 6px 0 0;
  border-radius: 10px;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { background:#2ea043; transform: translateY(-2px); }
.btn.disabled {
  background: #444c56; color: #9da7b1; cursor: not-allowed;
}

/* ===== Sections ===== */
section { padding: 70px 20px; }
section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
}

/* ===== Grid & Cards ===== */
.card {
  background: #161b22;
  border: 1px solid #21262d;
  padding: 22px;
  border-radius: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(30px);
}
.card.show {
  opacity: 1;
  transform: translateY(0);
}
.card h3 {
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
}
.card p {
  font-size: 0.95rem;
  color: #9da7b1;
  text-align: center;
}

/* ===== Animation Delay ===== */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.25s; }
.delay-3 { transition-delay: 0.4s; }

/* ===== Projects ===== */
.project-card {
  margin: 20px auto;
  max-width: 700px;
  text-align: center;
}
.project-img {
  width: 100%;
  max-height: 250px;
  border-radius: 12px 12px 0 0;
  object-fit: cover;
  margin-bottom: 15px;
}

/* ===== Tags ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}
.tags span {
  background: #161b22;
  border: 1px solid #30363d;
  color: #58a6ff;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 20px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.tags span:hover {
  background: #21262d;
  transform: scale(1.05);
}
/* ===== Skills Carousel ===== */


.skill {
  flex: 0 0 auto;
  background: #161b22;
  border: 1px solid #21262d;
  padding: 20px 25px;
  border-radius: 12px;
  text-align: center;
  min-width: 140px;
}
.skill i { font-size: 36px; color: #58a6ff; margin-bottom: 8px; }
.skill p { font-size: 1rem; font-weight: 500; color: #e6edf3; }

/* ===== Contact ===== */
.contact-form {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background: #161b22;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  background: #1e1e1e;
  color: #fff;
}
.contact-form button {
  background: #4da6ff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s ease;
}
.contact-form button:hover {
  background: #1e90ff;
  transform: scale(1.05);
}

/* ===== Contact Icons ===== */
.contact-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}
.icon-link {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 22px; color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.icon-link:hover { transform: scale(1.2); }
.icon-link.email { background-color: #d93025; }
.icon-link.github { background-color: #333; }
.icon-link.linkedin { background-color: #0077b5; }
.icon-link.twitter { background-color: #000; }
.icon-link.whatsapp { background-color: #25d366; }

/* ===== Footer ===== */
footer {
  border-top: 1px solid #21262d;
  background: #161b22;
  text-align: center;
  padding: 18px;
  color: #8b949e;
  font-size: 0.9rem;
}
footer .signature {
  margin-top: 6px;
  font-style: italic;
  color: #58a6ff;
}

/* ===== Scroll to Top ===== */
#toTop {
  position: fixed;
  bottom: 25px; right: 25px;
  width: 46px; height: 46px;
  background: #238636;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: all 0.4s ease;
  z-index: 999;
}
#toTop.show { opacity: 1; pointer-events: all; }
#toTop:hover { background: #2ea043; transform: translateY(-3px); }

/* ===== Responsive ===== */
@media (max-width: 900px){
}
@media (max-width: 640px){
  nav ul { flex-wrap: wrap; gap: 14px; }
}

/* ===== Fix About Page Layout ===== */
.about-section {
  padding: 60px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.about-photo-center {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.about-photo-center img {
  width: 320px;
  max-width: 90%;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  transition: all 1s ease;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
}

.about-cards .card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.about-cards .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}

.about-cards .card i {
  font-size: 26px;
  color: #58a6ff;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .about-photo-center img { width: 80%; }
}

/* ===== Fix Experience & Volunteering Cards Visibility ===== */
#experience .card,
#volunteering .card,
#achievements .card {
  opacity: 1 !important;
  transform: none !important;
}

/* ===== Grid Layout Restore ===== */
.grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== Experience Logos ===== */
.experience-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  margin: 15px auto;
  display: block;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  transition: transform 0.3s ease;
}
.experience-logo:hover {
  transform: scale(1.1);
}

/* ===== Buttons in Experience & Volunteering ===== */
#experience .btn, 
#volunteering .btn {
  display: inline-block;
  background: #238636;
  color: #fff;
  padding: 10px 18px;
  margin-top: 10px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.25s ease;
}
#experience .btn:hover,
#volunteering .btn:hover {
  background: #2ea043;
  transform: translateY(-2px);
}

/* ===== Optional Polish Effects ===== */

/* 1. Glow Hover for Project Cards */
.project-card:hover {
  box-shadow: 0 0 25px rgba(88,166,255,0.25);
  transform: translateY(-4px) scale(1.02);
  transition: all 0.4s ease;
}

/* 2. Smooth Press Feedback for Buttons */
.btn:active {
  transform: scale(0.97);
  background: #1f883d;
}

/* 3. Mobile Font Adjustment */
@media (max-width: 480px) {
  body { font-size: 15px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* 4. Image Hover Motion (for all images in the site) */
img:hover {
  transform: scale(1.04) rotateZ(0.2deg);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  box-shadow: 0 0 20px rgba(88,166,255,0.25);
}

/* ===== Fix: Always show Project Cards ===== */
#projects .card,
#experience .card,
#volunteering .card,
#achievements .card {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* ===== Unified Hover & Click Animations for All Cards ===== */

/* تأثير التحويم (Hover) لكل الكروت */
.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 25px rgba(88,166,255,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* تأثير الضغط (Click) لكل الكروت */
.card:active {
  transform: scale(0.97);
  box-shadow: 0 0 15px rgba(88,166,255,0.25);
  transition: transform 0.1s ease;
}

/* تحسين إضافي للمشاريع والإنجازات وقت التمرير */
#projects .project-card:hover,
#experience .card:hover,
#volunteering .card:hover,
#achievements .card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 0 35px rgba(88,166,255,0.3);
}

/* عشان الصور داخل البطاقات تطلع ناعمة مع الحركة */
.card img {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover img {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(88,166,255,0.25);
}

/* ===== Scroll Animation for Cards (Professional Fade-Up) ===== */
.card {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

/* لما تظهر في الشاشة */
.card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hero Image Entrance Animation ===== */
@keyframes heroAppear {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(40px);
    filter: blur(6px);
  }
  60% {
    opacity: 1;
    transform: scale(1.02) translateY(0);
    filter: blur(0);
  }
  100% {
    transform: scale(1);
  }
}

/* نبضة خفيفة بعد الظهور */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(88,166,255,0.25); }
  50% { box-shadow: 0 0 35px rgba(88,166,255,0.4); }
}

/* ===== JS Helper (احفظه في نهاية index.html قبل </body>) ===== */

/* ===== Fix Hero Image Visibility After Animation ===== */

/* ===== Fix About Button Alignment ===== */
.about-btn-container {
  text-align: center;
  margin: 60px 0 40px;
}

/* تصميم الزر About Me */
.about-btn.big-btn {
  display: inline-block;
  font-size: 1.8rem;
  padding: 18px 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #007BFF, #0056b3);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
}

/* تأثير التحويم */
.about-btn.big-btn:hover {
  background: linear-gradient(135deg, #0056b3, #003d80);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
}

/* Achievements page: tighten bottom spacing */
#achievements { padding-bottom: 24px; }

/* Ensure no extra scroll because of fixed background on short pages */
html, body { overflow-x: hidden; }

/* timeline line always full height of its container */
.timeline::before { bottom: 0; height: auto; }

/* ===== Universal Card Interaction (Hover + Touch) ===== */

/* التأثير الأساسي */
.card {
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

/* عند التحويم أو اللمس */
.card:hover,
.card:active {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 25px rgba(88,166,255,0.35);
  background: rgba(22,27,34,0.95);
}

/* الصور داخل الكروت تتحرك بشكل ناعم */
.card img {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover img,
.card:active img {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(88,166,255,0.3);
}

/* ===== دعم اللمس للهواتف (iPhone / Android) ===== */
@media (hover: none) and (pointer: coarse) {
  .card:active {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(88,166,255,0.4);
    background: rgba(22,27,34,0.95);
  }
}

/* ===== حركة ناعمة عند رفع الإصبع في الجوال ===== */
.card {
  -webkit-tap-highlight-color: transparent;
}

/* ===== Smooth Fade-In & Slide-Up Animation on Scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* إضافة حركة بسيطة عند ظهور الصور أيضًا */
.reveal img {
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}
.reveal.active img {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(88,166,255,0.25);
}

/* ===== Universal Smooth Interaction for All Cards ===== */
.card {
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

/* Hover + Touch (Laptop + iPhone) */
.card:hover,
.card:active {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 25px rgba(88,166,255,0.35);
  background: rgba(22,27,34,0.95);
}

/* Smooth image scaling inside cards */
.card img {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover img,
.card:active img {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(88,166,255,0.3);
}

/* Touch support for iPhone / Android */
@media (hover: none) and (pointer: coarse) {
  .card:active {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(88,166,255,0.4);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ====== Navigation Bar ====== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(11, 24, 41, 0.4);
  backdrop-filter: blur(8px);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
  background: rgba(11, 24, 41, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.navbar .logo {
  font-weight: 700;
  color: white;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.navbar a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
  color: #4da6ff;
}

/* ====== Mobile Menu Button ====== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ====== Responsive Design (Mobile) ====== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    background: rgba(11, 24, 41, 0.95);
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    display: none !important; /* ← أضف هذا */
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease;
  }

  .nav-links.show {
    display: flex !important; /* ← وأضف هذا */
  }
}

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

.subtitle {
  font-size: 1.4rem;
  color: #58a6ff;
  margin-top: 6px;
  margin-bottom: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ===== Center Hero Section Vertically ===== */

header .intro {
  flex: 1;
  text-align: center;
}

header .intro .title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
}

header .intro p {
  max-width: 600px;
  margin: 8px auto;
  font-size: 1.1rem;
  color: #c9d1d9;
  line-height: 1.6;
}

/* ===== Fix Hero Section Alignment: Center Text & Balance with Image ===== */


header .intro {
  flex: 1 !important;
  text-align: center !important;
}

header .intro .title {
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin-bottom: 15px !important;
}

/* ===== Smooth Fade-In & Slide-Up Animation on Scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* fallback: لو المتصفح ما يدعم svh */



  /* اضبط الصورة */
  header .hero-img {
    width: 90%;
    max-width: 340px;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 20px;
  }

  /* اضبط النص */
  header .intro {
    text-align: center !important;
    margin-top: 10px;
  }

  /* تأكد من توازن الهيدر */
  header .intro h1,
  header .intro .title {
    font-size: clamp(1.8rem, 7vw, 2.6rem) !important;
    line-height: 1.2;
    margin-bottom: 12px;
  }
}

/* إصلاح إضافي لتطبيقات Android WebView */
@media (max-height: 700px) and (orientation: portrait) {
  header {
    min-height: auto !important;
    padding-top: 80px !important;
    padding-bottom: 60px !important;
  }
}


  body.linkedin-fix .hero-img {
    width: 90%;
    max-width: 340px;
    height: auto;
    border-radius: 16px;
    margin-top: 20px;
  }

  body.linkedin-fix .intro {
    text-align: center !important;
    margin-top: 12px;
    padding: 0 16px;
  }

  body.linkedin-fix .intro h1,
  body.linkedin-fix .intro .title {
    font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  html, body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

/* ===== Universal WebView Fix (LinkedIn + Instagram + Safari iOS) ===== */
@supports (-webkit-touch-callout: none) {
  header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - env(safe-area-inset-top)) !important;
    padding-top: calc(80px + env(safe-area-inset-top)) !important;
    padding-bottom: 80px !important;
    text-align: center;
    box-sizing: border-box;
  }

  header .intro {
    margin-top: 20px;
    text-align: center !important;
    padding: 0 16px;
  }

  header .intro h1,
  header .intro .title {
    font-size: clamp(1.8rem, 6vw, 2.6rem) !important;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  header .hero-img {
    width: 90%;
    max-width: 340px;
    height: auto;
    border-radius: 16px;
    margin-top: 20px;
    object-fit: cover;
  }

  .skills-carousel {
    margin-top: 60px;
  }

  html, body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    overflow-x: hidden !important;
  }
}
/* ===== LinkedIn WebView Override Fix ===== */
@supports (-webkit-touch-callout: none) {
  body.linkedin-fix header {
    min-height: 100dvh !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: calc(env(safe-area-inset-top) + 60px) !important;
    padding-bottom: calc(env(safe-area-inset-bottom) + 60px) !important;
    text-align: center !important;
    background: linear-gradient(145deg,#0d1117,#161b22);
  }

  body.linkedin-fix header .intro {
    padding: 0 20px;
    margin-top: 20px;
  }

  body.linkedin-fix header .hero-img {
    width: 90%;
    max-width: 340px;
    border-radius: 16px;
    object-fit: cover;
    margin-top: 20px;
  }
}

/* ===== Smooth Fade-In & Slide-Up Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}



