/* ============================================================
   TAREK MOHAMED — PORTFOLIO STYLES
   ============================================================
   Structure:
   1. CSS Variables (colors, fonts)
   2. Reset & Base
   3. Navigation
   4. Shared Section Utilities
   5. Hero
   6. Services
   7. About
   8. Skills
   9. Projects
   10. Experience
   11. Achievements
   12. Education
   13. Contact
   14. Footer
   15. Scroll Animation
   16. Responsive / Media Queries
   ============================================================ */


/* ── 1. CSS VARIABLES ── */

:root {
  --bg-dark: #121212;
  --bg-section: #1a1a1a;
  --bg-card: #222222;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-dim: rgba(59, 130, 246, 0.1);
  --accent-mid: rgba(59, 130, 246, 0.25);
  --text-primary: #ffffff;
  --text-secondary: #b5b5b5;
  --text-muted: #757575;
  --border: #2d2d2d;
  --nav-bg: rgba(18, 18, 18, 0.9);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── 3. NAVIGATION ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6%;
  height: 64px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}


/* ── 4. SHARED SECTION UTILITIES ── */
section {
  padding: 100px 6%;
}

.section-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--accent);
}

.section-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 40px;
}

/* Shared Buttons */
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-outline:hover {
  background: var(--accent-dim);
}

/* Social Buttons (shared by hero & footer) */
.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s;
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ── 5. HERO ── */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-greeting {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.hero-greeting span {
  color: var(--accent);
}

.hero-name {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -2px;
}

.hero-role {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 460px;
  margin-bottom: 36px;
}

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

.hero-socials {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

/* Hexagon Photo — Hero */
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

.hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
}

.hex-container {
  width: 420px;
  height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hex-bg {
  width: 380px;
  height: 380px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: absolute;
}

.hex-photo {
  width: 360px;
  height: 360px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background-image: url('../assets/img/img1.jpg');
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hex-initials {
  display: none;
}


/* ── 6. SERVICES ── */
#services {
  background: var(--bg-section);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
  transition: border-color 0.3s, transform 0.3s;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.service-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ── 7. ABOUT ── */
#about {
  background: var(--bg-section);
}

#about {
  display: flex;
  align-items: center;
  gap: 80px;
}

.about-photo-col {
  flex-shrink: 0;
}

.about-text {
  flex: 1;
}

.about-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.about-info-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.about-info-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.about-info-val a {
  color: var(--accent);
  text-decoration: none;
}


/* ── 8. SKILLS ── */
#skills {
  background: var(--bg-section);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: border-color 0.3s, transform 0.3s;
  cursor: default;
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.skill-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.skill-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}


/* ── 9. PROJECTS ── */
#projects {
  background: var(--bg-section);
}

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.project-links {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.project-github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.project-github-link:hover {
  color: var(--accent);
}

.project-github-link img {
  width: 16px;
  height: 16px;
}

.project-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: 0.5px;
}


/* ── 10. EXPERIENCE ── */
/* #experience { background: var(--bg-section); } */

.exp-timeline {
  position: relative;
  padding-left: 32px;
  margin-top: 40px;
}

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

.exp-item {
  position: relative;
  margin-bottom: 40px;
}

.exp-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-dot-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.exp-date {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

.exp-role {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.exp-company {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
}

.exp-bullets {
  list-style: none;
}

.exp-bullets li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0 4px 14px;
  position: relative;
  line-height: 1.7;
}

.exp-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 10px;
}


/* ── 11. ACHIEVEMENTS ── */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.ach-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.3s, transform 0.2s;
}

.ach-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.ach-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ach-text-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.ach-text-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ach-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.ach-link:hover {
  color: var(--accent);
}

.ach-link img {
  width: 16px;
  height: 16px;
}

/* CP */
#cp {
  background: var(--bg-section);
}

/* ── 12. EDUCATION ── */
/* #education { background: var(--bg-section); } */

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 32px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  max-width: 720px;
  margin-top: 40px;
}

.edu-year {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  min-width: 120px;
}

.edu-degree {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.edu-school {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 12px;
}

.edu-courses {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.edu-courses strong {
  color: var(--text-primary);
}


/* ── 13. CONTACT ── */
.contact-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 3 per row */
  gap: 16px 40px;
  align-items: start;
  margin-top: 40px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.contact-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: brightness(1.2);
  /* optional */
}

.contact-info-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-info-val {
  font-size: 14px;
  font-weight: 500;
}

.contact-info-val a {
  color: var(--text-primary);
  text-decoration: none;
}

.contact-info-val a:hover {
  color: var(--accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form textarea {
  height: 130px;
}

.contact-form .btn-primary {
  align-self: flex-start;
}


/* ── 14. FOOTER ── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 32px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-size: 16px;
  font-weight: 700;
}

.footer-logo span {
  color: var(--accent);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 12px;
}


/* ── 15. SCROLL ANIMATION ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── 16. RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-socials {
    justify-content: center;
  }

  .hero-btns {
    justify-content: center;
  }

  #about {
    flex-direction: column;
  }

  .skills-inner {
    flex-direction: column;
  }

  .contact-inner {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .nav-links {
    display: none;
  }

  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .edu-card {
    flex-direction: column;
    gap: 12px;
  }
}