/* ============================================
   TOMAS MOUSSA PORTFOLIO – style.css
   Finance Dark Theme with Blue Accents
   ============================================ */

/* ---------- RESET & VARIABLES ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #050d1a;
  --bg-secondary: #091629;
  --bg-card: #0d1f35;
  --accent: #1a8cff;
  --accent-2: #00d4ff;
  --accent-glow: rgba(26, 140, 255, 0.25);
  --text-primary: #e8f1ff;
  --text-secondary: #7fa8d4;
  --text-muted: #4a7098;
  --border: rgba(26, 140, 255, 0.15);
  --gradient: linear-gradient(135deg, #1a8cff, #00d4ff);
  --font-main: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --radius: 14px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --input-bg: #0d1f35;
  --input-border: rgba(26, 140, 255, 0.2);
}

/* ---------- LIGHT MODE VARIABLES ---------- */
body.light {
  --bg-primary: #f0f5ff;
  --bg-secondary: #e4edf8;
  --bg-card: #ffffff;
  --accent: #1a6fff;
  --accent-2: #0099cc;
  --accent-glow: rgba(26, 111, 255, 0.2);
  --text-primary: #0a1628;
  --text-secondary: #2a4a7a;
  --text-muted: #5a7a9a;
  --border: rgba(26, 111, 255, 0.18);
  --input-bg: #ffffff;
  --input-border: rgba(26, 111, 255, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

/* ---------- PARTICLES CANVAS ---------- */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(5, 13, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 30px rgba(26, 140, 255, 0.08);
}

body.light .navbar.scrolled {
  background: rgba(240, 245, 255, 0.92);
  box-shadow: 0 2px 24px rgba(26, 111, 255, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo .dot {
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-left: 1rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(20deg) scale(1.1);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* Photo */
.hero-photo-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.hero-photo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--gradient);
  animation: spin-ring 8s linear infinite;
  -webkit-mask:
    radial-gradient(farthest-side, transparent calc(100% - 3px), #fff 0);
  mask:
    radial-gradient(farthest-side, transparent calc(100% - 3px), #fff 0);
}

@keyframes spin-ring {
  to {
    transform: rotate(360deg);
  }
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 40px var(--accent-glow);
}

/* Text */
.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

/* Typing */
.typing-wrapper {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0.5rem 0;
}

.typing-text {
  font-weight: 500;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* GPA badge */
.hero-gpa {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.gpa-value {
  color: var(--accent-2);
  font-weight: 700;
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(26, 140, 255, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  animation: float 2.5s ease-in-out infinite;
  letter-spacing: 1px;
}

.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {

  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }

  50% {
    transform: translateY(6px);
    opacity: 0.3;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

/* ---------- SECTIONS ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.container {
  max-width: 1150px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(26, 140, 255, 0.08);
  border: 1px solid var(--border);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
}

.highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- AOS FADE-IN ---------- */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-aos].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- ABOUT ---------- */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: start;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px var(--accent-glow);
}

.about-card-icon {
  width: 70px;
  height: 70px;
  background: rgba(26, 140, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  font-size: 1.6rem;
  color: var(--accent);
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.about-bio p {
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 0.97rem;
  margin-bottom: 1rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.8rem;
  min-width: 90px;
  flex: 1;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ---------- SKILLS ---------- */
.skills {
  background: var(--bg-primary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px var(--accent-glow);
  border-color: var(--accent);
}

.skill-icon-wrap {
  width: 60px;
  height: 60px;
  background: rgba(26, 140, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
  transition: background var(--transition), color var(--transition);
}

.skill-card:hover .skill-icon-wrap {
  background: var(--accent);
  color: #fff;
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.skill-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ---------- CONTACT ---------- */
.contact {
  background: var(--bg-secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px var(--accent-glow);
  border-color: var(--accent);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: rgba(26, 140, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 auto 1rem;
  transition: background var(--transition);
}

.contact-card:hover .contact-icon {
  background: var(--accent);
  color: #fff;
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.contact-card a:hover {
  color: var(--accent);
}

/* ---------- MESSAGE / CONTACT FORM ---------- */
.message-section {
  background: var(--bg-primary);
}

.form-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a8cff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-send {
  background: var(--gradient);
  color: #fff;
  border: none;
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 24px var(--accent-glow);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-send:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(26, 140, 255, 0.4);
}

.btn-send:active {
  transform: translateY(0);
}

.form-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  color: #22c55e;
  font-weight: 600;
  font-size: 0.95rem;
  animation: fadeInUp 0.4s ease;
}

.form-success.show {
  display: flex;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Light mode mobile nav */
body.light .nav-links {
  background: rgba(240, 245, 255, 0.97);
}

/* ---------- FOOTER ---------- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner strong {
  color: var(--text-secondary);
}

.footer-sub {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70vw;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(9, 22, 41, 0.97);
    backdrop-filter: blur(20px);
    gap: 2.5rem;
    transition: right var(--transition);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    order: 2;
  }

  .about-bio {
    order: 1;
  }

  .hero-photo-wrapper {
    width: 160px;
    height: 160px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.8rem 1.2rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4rem 1.2rem;
  }

  .hero {
    padding: 5rem 1.2rem 3rem;
  }

  .about-stats {
    gap: 1rem;
  }

  .stat {
    padding: 1rem 1.2rem;
  }
}