/* ----- FONTS ----- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@600;700;800&display=swap");
/* ----- VARIABLES ----- */
:root {
  --body-color: rgb(245, 245, 245);
  --color-white: rgb(255, 255, 255);
  --text-color-second: rgb(40, 40, 40);
  --text-color-third: rgb(0, 174, 199);
  --first-color: rgb(90, 70, 200);
  --first-color-hover: rgb(70, 50, 180);
  --second-color: rgb(0, 184, 224);
  --third-color: rgb(180, 150, 40);
  --first-shadow-color: rgba(0, 0, 0, 0.15);
  /* Elevation Shadows (light mode - directional for better affordance) */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.10);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.12), 0 8px 18px rgba(0,0,0,0.10);
  --shadow-lg: 0 10px 24px rgba(0,0,0,0.16), 0 16px 36px rgba(0,0,0,0.12);
  --card-border: rgba(0,0,0,0.06);
  /* Dark Mode Variables */
  --body-color-dark: rgb(18, 18, 18);
  --color-white-dark: rgb(35, 35, 35);
  --text-color-second-dark: rgb(210, 210, 210);
  --text-color-third-dark: rgb(50, 190, 200);
  --first-shadow-color-dark: rgba(255, 255, 255, 0.15);
  /* Dark-mode blue glow (omni-directional) */
  --shadow-sm-dark: 0 0 10px rgba(50, 190, 200, 0.25);
  --shadow-md-dark: 0 0 18px rgba(50, 190, 200, 0.28), 0 0 36px rgba(50, 190, 200, 0.18);
  --shadow-lg-dark: 0 0 28px rgba(50, 190, 200, 0.32), 0 0 56px rgba(50, 190, 200, 0.20);
}
/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--second-color);
  color: #fff;
  border-radius: 8px;
  z-index: 1000;
}
/* Dark Mode Styles */
.dark-mode {
  --body-color: var(--body-color-dark);
  --color-white: var(--color-white-dark);
  --text-color-second: var(--text-color-second-dark);
  --text-color-third: var(--text-color-third-dark);
  --first-shadow-color: var(--first-shadow-color-dark);
}
.dark-mode .nav-menu {
  background: rgba(35, 35, 35, 0.95);
  backdrop-filter: blur(12px);
}
.dark-mode .btn {
  background: rgb(50, 50, 50);
  color: var(--text-color-second-dark);
}
.dark-mode .btn:hover {
  background: var(--second-color);
  color: var(--color-white-dark);
}
.dark-mode .featured-text-card span {
  background: rgb(140, 120, 30);
}
/* Dark-mode subtle borders for cards */
.dark-mode .project-card,
.dark-mode .project-box,
.dark-mode .about-info,
.dark-mode .contact-info,
.dark-mode .icon {
  border: 1px solid rgba(255,255,255,0.06);
}
.dark-mode .about-info p,
.dark-mode .project-box label,
.dark-mode .footer_menu_list a {
  color: rgb(160, 160, 160);
}
.dark-mode footer {
  background: rgb(15, 15, 15);
}
.dark-mode .scroll-btn {
  background: var(--color-white-dark);
  color: var(--text-color-second-dark);
}
.dark-mode .icon {
  background: rgb(50, 50, 50);
  color: var(--text-color-second-dark);
}
.dark-mode .icon:hover {
  background: var(--first-color);
  color: var(--color-white-dark);
}
.dark-mode .input-field,
.dark-mode textarea {
  background: rgb(45, 45, 45);
  color: var(--text-color-second-dark);
  border-color: rgb(90, 90, 90);
}
.dark-mode .bottom-footer p {
  color: rgb(200, 200, 200);
}
.dark-mode .top-footer p {
  color: var(--text-color-third-dark);
}
.dark-mode .nav-menu-btn i {
  color: var(--text-color-second-dark);
}
.dark-mode .nav-link {
  color: var(--text-color-second-dark);
}
.dark-mode nav {
  background: rgba(35, 35, 35, 0.95);
  backdrop-filter: blur(12px);
}
.dark-mode nav.scrolled { background: rgba(35,35,35,0.95) !important; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.dark-mode .success-message {
  background: rgb(50, 190, 200);
  color: var(--color-white-dark);
}

/* ----- BASE ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}
html { scroll-padding-top: 90px; }
/* ----- SMOOTH SCROLL ----- */
html {
  scroll-behavior: smooth;
}
/* ----- SCROLL BAR DESIGN ----- */
::-webkit-scrollbar {
  width: 8px;
  border-radius: 25px;
}
::-webkit-scrollbar-track {
  background: #f5f5f5;
}
::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 25px;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}
/* ----- GLOBAL BUTTON DESIGN ----- */
.btn {
  font-weight: 500;
  padding: 12px 24px;
  background: var(--color-white);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 250ms cubic-bezier(0.2, 0.65, 0.2, 1), box-shadow 250ms ease, background 250ms ease, color 250ms ease;
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  font-family: "Montserrat", sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover {
  background: var(--second-color);
  color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.dark-mode .btn { box-shadow: var(--shadow-sm-dark); }
.dark-mode .btn:hover { box-shadow: var(--shadow-md-dark); }
.btn > i {
  margin-left: 8px;
  font-size: 16px;
}
/* RTL tweaks (remain inactive in LTR) */
html[dir="rtl"] .btn > i { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .featured-name p { direction: rtl; }
html[dir="rtl"] .featured-text-info p { direction: rtl; }
html[dir="rtl"] .nav-menu { justify-content: center; }
html[dir="rtl"] .nav-menu .nav_menu_list { flex-direction: row; }
html[dir="rtl"] .social_icons { direction: rtl; }

/* ----- GLOBAL ICONS DESIGN ----- */
i {
  font-size: 18px;
}
/* ----- BASE ----- */
body {
  background: var(--body-color);
  transition: background 0.3s ease;
}
.container {
  width: 100%;
  position: relative;
}
/* Add a centered content width for main wrapper */
.wrapper {
  padding-inline: 10vw;
  max-width: 1200px;
  margin: 0 auto;
}
/* Media responsiveness */
img { display: block; max-width: 100%; height: auto; }
/* Improve focus visibility */
:focus-visible {
  outline: 3px solid var(--second-color);
  outline-offset: 2px;
}
/* Single-focus frame for inputs and textarea */
.input-field:focus-visible,
textarea:focus-visible { outline: none; }
/* ----- Subtle continuous animations ----- */
@keyframes floatY {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
  50% { box-shadow: 0 8px 18px rgba(0,0,0,0.18); }
}
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}
.social_icons .icon { animation: floatY 4s ease-in-out infinite; }
.social_icons .icon:nth-child(2) { animation-delay: 0.2s; }
.social_icons .icon:nth-child(3) { animation-delay: 0.4s; }
.social_icons .icon:nth-child(4) { animation-delay: 0.6s; }
.scroll-btn { 
  animation: pulseGlow 3.6s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.scroll-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.scroll-btn:hover::before {
  left: 100%;
}

.scroll-btn:hover {
  transform: translateX(-50%) translateY(-8px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.hero-blob { animation: breathe 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .social_icons .icon,
  .scroll-btn,
  .hero-blob,
  .scroll-btn::before { 
    animation: none !important; 
  }
  .scroll-btn {
    opacity: 1 !important;
    animation: none !important;
  }
}
/* ----- NAVIGATION BAR ----- */
nav {
  position: fixed;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding-inline: calc(6vw + env(safe-area-inset-left));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 100;
  border-radius: 0;
}
nav.scrolled {
  height: 60px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(14px);
}
.nav-logo, .nav-menu, .nav-button, .nav-menu-btn { min-width: 0; }
.nav-logo {
  position: relative;
  flex: 1 1 auto;
}
.nav-name {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text-color-third);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-logo span {
  position: absolute;
  top: -12px;
  right: -18px;
  font-size: 3em;
  color: var(--text-color-second);
  opacity: 0.2;
}
.nav-menu,
.nav_menu_list {
  display: flex;
  align-items: center;
  position: relative;
}
.nav-menu { justify-content: center; }
.nav-menu .nav_list {
  list-style: none;
  position: relative;
}
.nav-link {
  text-decoration: none;
  color: var(--text-color-second);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 14px;
  margin-inline: 15px;
  transition: color 0.25s ease, background 0.25s ease;
  position: relative;
  z-index: 2;
  border-radius: 10px;
}
.nav-link:hover,
.nav-link.active-link {
  color: var(--first-color);
  background: rgba(90, 70, 200, 0.08);
}
.nav_menu_list::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  background: var(--first-color);
  transition: all 0.3s ease;
  z-index: 1;
  display: none;
}
.nav-link:hover ~ .nav_menu_list::after,
.nav-link.active-link ~ .nav_menu_list::after {
  left: var(--left);
  width: var(--width);
}
.nav-menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
}
.nav-menu-btn i {
  font-size: 26px;
  cursor: pointer;
  color: var(--text-color-second);
  transition: color 0.3s ease;
}
.nav-menu-btn i:hover {
  color: var(--first-color);
}
.nav-button {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-self: end;
}
.nav-button .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
}
.nav-button .theme-toggle {
  width: 40px;
  height: 40px;
  padding: 10px;
}
.theme-toggle-mobile {
  display: none;
}
/* ----- THEME TOGGLE ANIMATION ----- */
.theme-toggle, .theme-toggle-mobile {
  position: relative;
  overflow: hidden;
}
.theme-icon {
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.theme-icon.uil-moon {
  opacity: 1;
  transform: rotate(0deg);
}
.theme-icon.uil-sun {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
  position: absolute;
  top: 50%;
  left: 50%;
  color: #fff;
}
.dark-mode .theme-icon.uil-moon {
  opacity: 0;
  transform: rotate(90deg);
}
.dark-mode .theme-icon.uil-sun {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  color: #fff;
}
/* ----- WRAPPER DESIGN ----- */
.wrapper {
  padding-inline: 10vw;
}
/* ----- FEATURED BOX ----- */
.featured-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  min-height: 700px;
  padding: 50px 0;
  margin-top: 100px;
  background: linear-gradient(135deg, rgba(90, 70, 200, 0.1), rgba(0, 184, 224, 0.1));
  border-radius: 16px;
  overflow: hidden;
}
/* decorative floating blobs for parallax depth */
.hero-blob {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  transform: translate3d(0,0,0);
  transition: transform 300ms ease;
}
.hero-blob.one { background: rgba(90, 70, 200, 0.65); top: 10%; left: 8%; }
.hero-blob.two { background: rgba(0, 184, 224, 0.65); bottom: 8%; right: 10%; }
@media only screen and (max-width: 900px) {
  .hero-blob { display: none; }
}
.dark-mode .featured-box {
  background: linear-gradient(135deg, rgba(50, 50, 50, 0.2), rgba(50, 190, 200, 0.2));
}
/* ----- FEATURED TEXT BOX ----- */
.featured-text {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  max-width: 900px;
  width: 100%;
  padding: 40px 20px;
}
.featured-text-card span {
  background: var(--third-color);
  color: var(--color-white);
  padding: 8px 15px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.featured-name {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 800;
  color: var(--text-color-second);
  margin-block: 30px;
  line-height: 1.1;
}
.featured-name p {
  display: inline;
}
.typedText {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 800;
  color: var(--text-color-third);
  line-height: 1.1;
}
.featured-text-info {
  font-size: 18px;
  margin-bottom: 50px;
  color: var(--text-color-second);
  line-height: 1.8;
  max-width: 600px;
}
.featured-text-btn {
  display: flex;
  gap: 30px;
  justify-content: center;
}
.featured-text-btn > .blue-btn {
  background: var(--first-color);
  color: var(--color-white);
}
.featured-text-btn > .blue-btn:hover {
  background: var(--first-color-hover);
  transform: translateY(-5px);
}
.social_icons {
  display: flex;
  margin-top: 5em;
  gap: 30px;
  justify-content: center;
}
.icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  background: var(--color-white);
  color: var(--text-color-second);
  transition: transform 250ms cubic-bezier(0.2, 0.65, 0.2, 1), background 250ms ease, color 250ms ease, box-shadow 250ms ease;
}
.icon a {
  color: inherit;
  text-decoration: none;
}
.icon:hover {
  background: var(--first-color);
  color: var(--color-white);
  transform: translateY(-5px) scale(1.03);
  box-shadow: var(--shadow-lg);
}
.icon i {
  font-size: 24px;
}
.dark-mode .icon {
  background: rgb(50, 50, 50);
  color: var(--text-color-second-dark);
}
.dark-mode .icon { box-shadow: var(--shadow-md-dark); }
.dark-mode .icon:hover {
  background: var(--first-color);
  color: var(--color-white-dark);
  box-shadow: var(--shadow-lg-dark);
}
/* ----- SCROLL BUTTON ----- */
.scroll-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 180px;
  height: 60px;
  gap: 10px;
  text-decoration: none;
  color: var(--text-color-second);
  background: var(--color-white);
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-weight: 500;
  opacity: 0;
  animation: fadeInUp 1s ease-out 2s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.scroll-btn:hover {
  background: var(--second-color);
  color: var(--color-white);
}
.scroll-btn i {
  font-size: 24px;
}
/* ----- MAIN BOX ----- */
.section {
  padding-block: 6em;
  border-radius: 16px;
  overflow: visible;
}
.row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 60px;
}
.col {
  display: flex;
  width: 50%;
  flex-direction: column;
  gap: 20px;
}
/* ----- REUSABLE CSS ----- */
.top-header {
  text-align: center;
  margin-bottom: 5em;
}
.top-header h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 4.5vw, 36px);
  color: var(--text-color-second);
  margin-bottom: 12px;
}
.top-header span {
  color: #888;
  font-size: 16px;
}
h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color-second);
  margin-bottom: 20px;
}
/* ----- ABOUT INFO ----- */
.about-info {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 40px 30px;
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  border-radius: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
#experience .about-info h3, #experience .about-info p { transition: color 0.25s ease; }
/* Light mode hover for Experience cards */
#experience .about-info:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0,0,0,0.08);
  background: var(--second-color);
  color: #fff;
}


#experience .about-info:hover h3,
#experience .about-info:hover p,
#experience .about-info:hover i { color: #fff; }
.dark-mode .about-info { box-shadow: var(--shadow-md-dark); }
.dark-mode .about-info:hover { box-shadow: var(--shadow-lg-dark); }
.about-info p {
  text-align: center;
  font-size: 16px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 20px;
}
.about-btn {
  display: flex;
  justify-content: center;
  width: 100%;
}
.about-btn button {
  background: var(--first-color);
  color: var(--color-white);
  border-radius: 12px;
  padding: 12px 24px;
}
.about-btn button:hover {
  background: var(--first-color-hover);
  transform: translateY(-3px);
}
/* ----- SKILLS BOX ----- */
.skills-box {
  margin: 15px;
}
.skills-header {
  margin-bottom: 30px;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skills-list span {
  font-size: 14px;
  background: var(--first-color);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
}

/* Dark mode hover effect for Experience cards */
  .dark-mode #experience .about-info {
    position: relative;
    overflow: hidden;
    background: var(--color-white-dark); /* للتأكد من إن الخلفية الأساسية مش بتتغير */
  }
  .dark-mode #experience .about-info::after {
    content: "";
    position: absolute;
    bottom: -100%;
    background: var(--first-color); /* اللون الأرجواني */
    width: 100%;
    height: 100%;
    transition: bottom 0.4s ease;
    z-index: 1;
  }
  .dark-mode #experience .about-info:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg-dark);
    border-color: rgba(255,255,255,0.06);
  }
  .dark-mode #experience .about-info:hover::after {
    bottom: 0;
  }
  .dark-mode #experience .about-info:hover h3,
  .dark-mode #experience .about-info:hover p,
  .dark-mode #experience .about-info:hover i {
    color: var(--color-white);
    z-index: 2;
  }
/* ----- PROJECTS BOX ----- */
.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  width: 100%;
  gap: 25px;
}
/* Increase spacing between cards in Services and Projects */
#services .project-container,
#projects .project-container { gap: 48px; }
.project-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 280px;
  background: var(--color-white);
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Ensure services card text is centered like others */
#services .project-box, #services .project-box h3, #services .project-box label { text-align: center; }
.project-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.dark-mode .project-box { box-shadow: var(--shadow-md-dark); }
.dark-mode .project-box:hover { box-shadow: var(--shadow-lg-dark); }
.project-box > i {
  font-size: 60px;
  color: var(--second-color);
  margin-bottom: 20px;
}
.project-box label {
  font-size: 16px;
  color: #666;
}
.project-box::after {
  content: "";
  position: absolute;
  bottom: -100%;
  background: var(--first-color);
  width: 100%;
  height: 100%;
  transition: 0.4s;
  z-index: 1;
}
/* Light mode: use blue overlay instead of purple on hover for cards */
body:not(.dark-mode) .project-box::after { background: var(--second-color); }
.project-box:hover::after {
  bottom: 0;
}
.project-box:hover i,
.project-box:hover > h3,
.project-box:hover > label {
  color: var(--color-white);
  z-index: 2;
}
/* ----- CONTACT BOX ----- */
.contact-info {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  width: 100%;
  height: 340px;
  background: var(--second-color);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.dark-mode .contact-info { box-shadow: var(--shadow-md-dark); }
.dark-mode .contact-info:hover { box-shadow: var(--shadow-lg-dark); }
.contact-info > h2 {
  color: #fff;
  font-family: "Montserrat", sans-serif;
  margin-bottom: 25px;
}
.contact-info > p {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 16px;
  margin-block: 8px;
}
html[dir="rtl"] .contact-info > p { justify-content: center; }
.contact-info p > i {
  font-size: 20px;
  color: #fff;
}
.contact-info::after {
  content: "";
  position: absolute;
  bottom: -100%;
  background: var(--first-color);
  width: 100%;
  height: 100%;
  transition: bottom 0.4s ease;
  z-index: 1;
}
/* Light mode: match other cards (white base, blue on hover) */
body:not(.dark-mode) .contact-info { background: var(--color-white); border: 1px solid var(--card-border); }
body:not(.dark-mode) .contact-info > h2,
body:not(.dark-mode) .contact-info > p,
body:not(.dark-mode) .contact-info p > i { color: var(--text-color-second); }
body:not(.dark-mode) .contact-info:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); background: var(--second-color); border-color: transparent; }
body:not(.dark-mode) .contact-info:hover > h2,
body:not(.dark-mode) .contact-info:hover > p,
body:not(.dark-mode) .contact-info:hover p > i { color: #fff; }
body:not(.dark-mode) .contact-info::after { content: none; }
.contact-info:hover::after {
  bottom: 0;
}
.contact-info:hover h2,
.contact-info:hover p,
.contact-info:hover i {
  color: var(--color-white);
  z-index: 2;
}
.dark-mode .contact-info {
  background: var(--color-white-dark);
}
.dark-mode .contact-info > h2,
.dark-mode .contact-info > p,
.dark-mode .contact-info p > i {
  color: var(--text-color-second-dark);
}
.dark-mode .contact-info::after {
  background: var(--first-color);
}
.dark-mode .contact-info:hover::after {
  bottom: 0;
}
.dark-mode .contact-info:hover h2,
.dark-mode .contact-info:hover p,
.dark-mode .contact-info:hover i {
  color: var(--color-white);
}
/* ----- CONTACT FORM ----- */
.form-control {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  position: relative;
}
.form-inputs {
  display: flex;
  gap: 20px;
  width: 100%;
  margin-bottom: 20px;
}
.input-field {
  width: 50%;
  height: 60px;
  background: transparent;
  border: 2px solid #bbb;
  border-radius: 12px;
  padding-inline: 20px;
  outline: none;
  font-size: 16px;
  color: var(--text-color-second);
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.input-field:focus {
  border-color: var(--second-color);
  box-shadow: none;
  outline: none;
}
textarea {
  width: 100%;
  height: 280px;
  background: transparent;
  border: 2px solid #bbb;
  border-radius: 12px;
  padding: 20px;
  outline: none;
  resize: none;
  font-size: 16px;
  color: var(--text-color-second);
  transition: all 0.3s ease;
  margin-bottom: 20px;
  box-sizing: border-box;
}

@media only screen and (max-width: 540px) {
  textarea {
    height: 200px;
    padding: 15px;
    font-size: 15px;
    margin-bottom: 15px;
  }
}
textarea:focus {
  border-color: var(--second-color);
  box-shadow: none;
  outline: none;
}
.form-button > .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--second-color);
  color: var(--color-white);
  padding: 14px 28px;
}
.form-button > .btn:hover {
  background: var(--first-color-hover);
}
.form-button i {
  font-size: 20px;
  rotate: -45deg;
}
.honeypot-field {
  display: none;
}
.success-message {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--first-color);
  color: var(--color-white);
  padding: 15px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 500;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--first-shadow-color);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.success-message.show {
  display: block;
  opacity: 1;
}
iframe[name="formspree-iframe"] {
  display: none;
}
/* ----- FOOTER BOX ----- */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  row-gap: 40px;
  background: #f5f5f5;
  padding-block: 50px 70px;
  border-radius: 16px;
  overflow: visible;
}
.top-footer p {
  font-family: "Montserrat", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color-third);
}
.middle-footer .footer-menu {
  display: flex;
}
.footer_menu_list {
  list-style: none;
}
.footer_menu_list a {
  text-decoration: none;
  color: var(--text-color-second);
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  margin-inline: 25px;
  transition: color 0.3s ease;
}
.footer_menu_list a:hover {
  color: var(--first-color);
}
.footer-social-icons {
  display: flex;
  gap: 35px;
}
.bottom-footer {
  font-size: 15px;
  margin-top: 15px;
}
.bottom-footer p {
  color: #666;
}
.bottom-footer .name-highlight {
  color: var(--text-color-third);
  text-decoration: none;
}
/* ----- Theme Toggle Button ----- */
.theme-toggle, .theme-toggle-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dark-mode .theme-toggle, .dark-mode .theme-toggle-mobile { box-shadow: var(--shadow-sm-dark); }
.theme-toggle:hover, .theme-toggle-mobile:hover {
  background: var(--first-color);
  color: var(--color-white);
  transform: translateY(-3px);
}
.theme-toggle i, .theme-toggle-mobile i {
  font-size: 20px;
  margin: 0;
}
/* ----- PROJECTS: featured grid ----- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  width: 100%;
  justify-items: center;
}
/* Match larger spacing in Portfolio section */
#portfolio .projects-grid { gap: 48px; }
.project-card {
  background: var(--color-white);
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  min-height: 450px;
  transition: transform 280ms cubic-bezier(0.2, 0.65, 0.2, 1), box-shadow 280ms ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.dark-mode .project-card { box-shadow: var(--shadow-md-dark); }
.dark-mode .project-card:hover { box-shadow: var(--shadow-lg-dark); }
.project-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}
.project-content { 
  padding: 20px; 
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--text-color-second);
  font-size: 20px;
  margin-bottom: 8px;
  line-height: 1.3;
}
.project-desc { 
  color: #666; 
  font-size: 15px; 
  margin-bottom: 16px; 
  line-height: 1.5;
  flex: 1;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.project-tags span { font-size: 12px; background: var(--first-color); color: #fff; padding: 4px 8px; border-radius: 6px; }
body:not(.dark-mode) .project-tags span { background: var(--second-color); }
.project-links { 
  display: flex; 
  gap: 12px; 
  margin-top: auto;
}
/* Add extra spacing for the GitHub button in Projects section */
#portfolio .project-links { margin-top: 16px; }
.project-links a { 
  text-decoration: none;
  flex: 1;
  text-align: center;
  font-size: 14px;
  padding: 10px 16px;
}

/* ----- PROJECT IMAGE STYLES ----- */
.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

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

/* ----- PROJECT TECH TAGS ----- */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  font-size: 13px;
  background: var(--first-color);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tech-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(90, 70, 200, 0.3);
}

.dark-mode .tech-tag {
  background: var(--second-color);
}

.dark-mode .tech-tag:hover {
  box-shadow: 0 2px 8px rgba(50, 190, 200, 0.3);
}

/* ----- PROJECT MOCKUP STYLES ----- */
/* Dashboard Preview */
.dashboard-preview {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dashboard-mockup {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  height: 85%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  overflow: hidden;
}

.dashboard-header {
  background: #f8f9fa;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #e9ecef;
}

.dashboard-nav {
  display: flex;
  gap: 8px;
}

.nav-item {
  width: 60px;
  height: 6px;
  background: #dee2e6;
  border-radius: 3px;
}

.nav-item.active {
  background: var(--second-color);
}

.dark-mode .nav-item.active {
  background: var(--first-color);
}

.dashboard-user {
  width: 24px;
  height: 24px;
  background: var(--second-color);
  border-radius: 50%;
}

.dark-mode .dashboard-user {
  background: var(--first-color);
}

.dashboard-content {
  padding: 12px;
  height: calc(100% - 40px);
}

.dashboard-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-card {
  flex: 1;
  background: #f8f9fa;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-icon {
  width: 16px;
  height: 16px;
  background: var(--second-color);
  border-radius: 4px;
}

.dark-mode .stat-icon {
  background: var(--first-color);
}

.stat-text {
  flex: 1;
  height: 4px;
  background: #dee2e6;
  border-radius: 2px;
}

.dashboard-chart {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px;
  height: 60px;
  display: flex;
  align-items: end;
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  width: 100%;
  height: 100%;
}

.bar {
  flex: 1;
  background: linear-gradient(to top, var(--second-color), var(--text-color-third));
  border-radius: 2px 2px 0 0;
  min-height: 20%;
  animation: barGrow 2s ease-out;
}

.dark-mode .bar {
  background: linear-gradient(to top, var(--first-color), var(--first-color-hover));
}

@keyframes barGrow {
  from { height: 0; }
  to { height: var(--height); }
}

/* Weather Preview */
.weather-preview {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.weather-mockup {
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  width: 90%;
  height: 85%;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.weather-header {
  text-align: center;
  margin-bottom: 12px;
}

.weather-location {
  width: 80px;
  height: 6px;
  background: var(--second-color);
  border-radius: 3px;
  margin: 0 auto 4px;
}

.dark-mode .weather-location {
  background: var(--first-color);
}

.weather-date {
  width: 60px;
  height: 4px;
  background: #b2bec3;
  border-radius: 2px;
  margin: 0 auto;
}

.weather-main {
  text-align: center;
  margin-bottom: 16px;
}

.weather-icon {
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}

.sun {
  width: 32px;
  height: 32px;
  background: #fdcb6e;
  border-radius: 50%;
  position: relative;
  animation: rotate 8s linear infinite;
}

.sun-rays {
  position: absolute;
  width: 40px;
  height: 40px;
  top: -4px;
  left: -4px;
}

.sun-rays::before,
.sun-rays::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 8px;
  background: #fdcb6e;
  border-radius: 1px;
}

.sun-rays::before {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.sun-rays::after {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

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

.weather-temp {
  font-size: 18px;
  font-weight: bold;
  color: #0984e3;
  margin-bottom: 4px;
}

.weather-desc {
  width: 70px;
  height: 4px;
  background: #b2bec3;
  border-radius: 2px;
  margin: 0 auto;
}

.weather-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.weather-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.detail-icon {
  width: 12px;
  height: 12px;
  background: var(--second-color);
  border-radius: 2px;
}

.dark-mode .detail-icon {
  background: var(--first-color);
}

.detail-text {
  width: 20px;
  height: 3px;
  background: #ddd;
  border-radius: 1px;
}

.weather-forecast {
  display: flex;
  justify-content: space-between;
}

.forecast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.forecast-day {
  width: 16px;
  height: 3px;
  background: #b2bec3;
  border-radius: 1px;
}

.forecast-icon {
  width: 10px;
  height: 10px;
  background: var(--second-color);
  border-radius: 50%;
}

.dark-mode .forecast-icon {
  background: var(--first-color);
}

.forecast-temp {
  width: 12px;
  height: 3px;
  background: #ddd;
  border-radius: 1px;
}

/* Shopping Preview */
.shopping-preview {
  background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.shopping-mockup {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  height: 85%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  overflow: hidden;
}

.shopping-header {
  background: #f8f9fa;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #e9ecef;
}

.shopping-logo {
  width: 20px;
  height: 20px;
  background: var(--second-color);
  border-radius: 4px;
}

.dark-mode .shopping-logo {
  background: var(--first-color);
}

.shopping-search {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-bar {
  width: 80px;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
}

.search-icon {
  width: 12px;
  height: 12px;
  background: var(--second-color);
  border-radius: 2px;
}

.dark-mode .search-icon {
  background: var(--first-color);
}

.shopping-cart {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.cart-icon {
  width: 16px;
  height: 16px;
  background: var(--second-color);
  border-radius: 2px;
}

.dark-mode .cart-icon {
  background: var(--first-color);
}

.cart-count {
  background: #e17055;
  color: white;
  font-size: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -4px;
  right: -4px;
}

.shopping-content {
  padding: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.product-card {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 8px;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-image {
  width: 100%;
  height: 32px;
  background: linear-gradient(45deg, var(--second-color), var(--text-color-third));
  border-radius: 4px;
  margin-bottom: 6px;
}

.dark-mode .product-image {
  background: linear-gradient(45deg, var(--first-color), var(--first-color-hover));
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-title {
  width: 40px;
  height: 3px;
  background: #b2bec3;
  border-radius: 1px;
}

.product-price {
  font-size: 8px;
  color: var(--second-color);
  font-weight: bold;
}

.dark-mode .product-price {
  color: var(--first-color);
}

/* ----- SECONDARY BUTTON STYLE ----- */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--first-color);
  color: var(--first-color);
}

.btn-secondary:hover {
  background: var(--first-color);
  color: var(--color-white);
}
/* ----- MEDIA QUERY == 1200px ----- */
@media only screen and (max-width: 1200px) {
  .wrapper { padding-inline: 6vw; }
  .row { gap: 50px; }
}
/* ----- MEDIA QUERY == 1024px ----- */
@media only screen and (max-width: 1024px) {
  .featured-text {
    padding: 30px;
    max-width: 100%;
  }
  .featured-name {
    font-size: 60px;
  }
  .typedText {
    font-size: 60px;
  }
}
/* ----- MEDIA QUERY == 1465px ----- */
@media only screen and (max-width: 1465px) {
  nav { 
    padding-inline: 4vw; 
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav-button {
    display: none;
  }
  .nav-menu.responsive {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    width: 100%;
    height: calc(100vh - 70px);
    transition: all 0.3s ease;
    z-index: 99;
  }
  .nav_menu_list {
    flex-direction: column;
    gap: 30px;
  }
  .nav-link {
    font-size: 18px;
    margin-inline: 0;
  }
  .nav_menu_list::after {
    display: none;
  }
  .nav-menu-btn { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    flex-shrink: 0; 
    margin-left: auto; 
    padding-right: 8px;
  }
  .nav-menu-btn i { 
    font-size: 24px; 
    flex: 0 0 auto; 
  }
  .theme-toggle-mobile {
    display: flex;
    width: 36px;
    height: 36px;
    padding: 8px;
    flex: 0 0 auto;
  }
  .featured-box {
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    margin-top: 100px;
  }
  .featured-text {
    width: 100%;
    min-height: 60vh;
  }
  .social_icons {
    margin-top: 3em;
  }
  .row { flex-direction: column; gap: 28px; }
  .col { justify-content: stretch; width: 100%; gap: 16px; }
  .about-info { padding: 28px 20px; }
  .skills-box { margin: 0; }

  .skills-list { gap: 6px; }
  .project-container {
    justify-content: center;
  }
  .project-box {
    width: 80%;
  }
  footer { padding-block: 40px 50px; }
  .middle-footer .footer-menu { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 12px; }
  .footer_menu_list a { margin-inline: 12px; }
  .footer-social-icons { flex-wrap: nowrap; gap: 18px; justify-content: center; }
}
/* ----- MEDIA QUERY == 768px ----- */
@media only screen and (max-width: 768px) {
  nav { padding-inline: 16px; }
  .nav-name { font-size: clamp(18px, 4.5vw, 22px); }
  .nav-menu-btn i { font-size: 22px; }
  .theme-toggle-mobile { width: 34px; height: 34px; padding: 7px; }
}
/* ----- MEDIA QUERY == 540px ----- */
@media only screen and (max-width: 540px) {
  nav { 
    padding-inline: 12px; 
    overflow: visible; 
  }
  .nav-name { 
    font-size: clamp(18px, 5vw, 24px); 
  }
  .nav-menu-btn { 
    display: flex;
    align-items: center;
    gap: 6px; 
    flex-shrink: 0; 
    margin-left: auto; 
    padding-right: 6px;
  }
  .nav-menu-btn i { 
    font-size: 20px; 
    flex: 0 0 auto;
  }
  .theme-toggle-mobile { 
    display: flex;
    width: 32px; 
    height: 32px; 
    padding: 6px; 
    flex: 0 0 auto;
  }
  .featured-name {
    font-size: 48px;
  }
  .typedText {
    font-size: 48px;
  }
  .featured-text-info {
    font-size: 15px;
  }
  .social_icons {
    gap: 25px;
  }
  .icon {
    width: 50px;
    height: 50px;
  }
  .project-box { width: 100%; }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .project-card {
    max-width: 100%;
    min-height: 400px;
  }
  .project-image {
    height: 180px;
  }
  .project-content {
    padding: 16px;
  }
  .project-title {
    font-size: 18px;
  }
  .project-desc {
    font-size: 14px;
  }
  .about-info { padding: 22px 16px; }
  .skills-box { margin: 0; }
  .skills-list span { font-size: 13px; }

  .form-inputs {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
  }
  .input-field {
    width: 100%;
    height: 50px;
    font-size: 14px;
    padding-inline: 12px;
    box-sizing: border-box;
  }
  .success-message {
    font-size: 14px;
    padding: 12px;
  }
  .top-footer p { font-size: 24px; }
  .middle-footer .footer-menu { gap: 8px; }
  .footer_menu_list a { margin-inline: 8px; font-size: 14px; white-space: nowrap; }
  .footer-social-icons { gap: 16px; }
  .bottom-footer { font-size: 14px; text-align: center; }
  /* Hide entire footer on small screens */
  footer { display: none !important; }
}
/* Ultra-small devices */
@media only screen and (max-width: 380px) {
  nav { 
    padding-inline: 8px; 
    overflow: visible; 
  }
  .nav-menu-btn { 
    gap: 4px; 
    margin-left: auto; 
    padding-right: 4px;
  }
  .nav-menu-btn i { 
    font-size: 18px; 
  }
  .theme-toggle-mobile { 
    width: 28px; 
    height: 28px; 
    padding: 5px; 
  }
  .nav-name { 
    font-size: 18px; 
  }
}
/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.nav-hover-box {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  width: 0;
  border-radius: 10px;
  background: rgba(90, 70, 200, 0.12);
  box-shadow: 0 6px 16px rgba(90,70,200,0.15);
  transition: none;
  will-change: auto;
  pointer-events: none;
  z-index: 1;
  display: none;
}