/* ═══════════════════════════════════════════════════════════
   KERO WAGDY — PORTFOLIO STYLESHEET
   Dark mode · Electric blue accent · Mobile-first
   ═══════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─── */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #1e1e2e;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --accent: #0ea5e9;
  --accent-hover: #38bdf8;
  --accent-glow: rgba(14, 165, 233, .15);
  --accent-glow-strong: rgba(14, 165, 233, .35);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
  --shadow: 0 4px 24px rgba(0, 0, 0, .35);
  --max-width: 1140px;
  --nav-h: 70px;
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.accent {
  color: var(--accent);
}

/* ─── Section Spacing ─── */
.section {
  padding: 100px 0;
}

.section__title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 14px auto 0;
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(10, 10, 15, .7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, .92);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* .navbar__logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
} */


.navbar__logo:hover {
  color: var(--text-primary);
}

.navbar__logo img {
  width: 50px;
  height: 35px;
}

.navbar__list {
  display: flex;
  gap: 32px;
}

.navbar__link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  padding: 4px 0;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--accent);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

/* Hamburger */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.navbar__toggle span {
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar__toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: calc(var(--nav-h) + 40px) 0 60px;
  overflow: hidden;
}

.hero__bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--accent-glow-strong);
  filter: blur(150px);
  top: -100px;
  right: -150px;
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0% {
    opacity: .5;
    transform: scale(1);
  }

  100% {
    opacity: .8;
    transform: scale(1.15);
  }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero__name {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Profile Picture */
.hero__image {
  display: flex;
  justify-content: center;
}

.hero__image-wrapper {
  width: 320px;
  height: 500px;
  border-radius: 99%;
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow: 0 0 60px var(--accent-glow-strong), 0 0 120px var(--accent-glow);
  animation: float 5s ease-in-out infinite;
}

.hero__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow-strong);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow-strong);
}

.btn--sm {
  padding: 10px 20px;
  font-size: .85rem;
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════════ */
.about {
  background: var(--bg-secondary);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1.05rem;
}

.about__text strong {
  color: var(--text-primary);
}

.about__stats {
  display: grid;
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.stat-card__number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.stat-card__label {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════════════════════ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  transition: all var(--transition);
}

.skill-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 10px 40px var(--accent-glow);
}

.skill-card__icon {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

svg.skill-card__icon {
  width: 2.6rem;
  height: 2.6rem;
  margin-inline: auto;
}

.skill-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.skill-card__desc {
  font-size: .85rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════════════ */
.projects {
  background: var(--bg-secondary);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 48px var(--accent-glow);
}

/* Image + Overlay */
.project-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5/3;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.project-card:hover .project-card__image img {
  transform: scale(1.08);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, .8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__body {
  padding: 24px;
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-card__desc {
  font-size: .92rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card__tags span {
  font-size: .78rem;
  padding: 5px 14px;
  border-radius: 50px;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════ */
.contact__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Form */
.contact__form {
  display: grid;
  gap: 22px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
}

/* Info Block */
.contact__info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact__info p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.contact__socials {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.social-link {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px var(--accent-glow-strong);
}

.contact__email {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.contact__email a {
  color: var(--text-secondary);
}

.contact__email a:hover {
  color: var(--accent);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transform: translateY(120px);
  opacity: 0;
  transition: all .4s ease;
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__inner p {
  font-size: .9rem;
  color: var(--text-secondary);
}

.footer__top {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.footer__top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════
   FADE-IN ANIMATION
   ═══════════════════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__tagline {
    margin-inline: auto;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__image {
    order: -1;
  }

  .hero__image-wrapper {
    width: 240px;
    height: 240px;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar__toggle {
    display: flex;
  }

  .navbar__menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: all .4s ease;
  }

  .navbar__menu.open {
    transform: translateY(0);
    opacity: 1;
  }

  .navbar__list {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 60px) 0 60px;
  }

  .hero__image-wrapper {
    width: 180px;
    height: 180px;
  }

  .section {
    padding: 72px 0;
  }

  .section__title {
    margin-bottom: 40px;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn--sm {
    width: auto;
  }

  .contact__socials {
    justify-content: center;
  }

  .contact__info {
    text-align: center;
  }
}

@media (max-width: 400px) {
  .skills__grid {
    grid-template-columns: 1fr;
  }
}