* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: #000000;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Navigation Styles */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 45px 0px;
}
.navbar.scrolled {
  background: rgba(0, 0, 0, 0.98);
  box-shadow: 0 2px 20px rgba(255, 255, 255, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 70px;
  gap: 3rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 40px;
}
.nav-logo img {
  height: 120px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s ease;
}
.nav-logo h2 {
  color: #ffffff;
  font-weight: 700;
  font-size: 2.5rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  font-size: 30px;
}
.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}
.nav-link:hover { color: #cccccc; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffffff, #cccccc);
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Mobile Navigation */
.hamburger { display: none; flex-direction: column; cursor: pointer; }
.bar { width: 25px; height: 3px; background-color: #ffffff; margin: 3px 0; transition: 0.3s; }

/* Home Section */
.home-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}
.home-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}
.home-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; position: relative; z-index: 1; margin-top: 100px;
}
.home-content { animation: fadeInUp 1s ease-out; }
.main-title {
  font-size: 3.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.main-description { font-size: 1.2rem; color: #cccccc; margin-bottom: 2.5rem; line-height: 1.8; }

.cta-buttons { display: flex; gap: 1rem; }
.btn-primary, .btn-secondary {
  padding: 15px 30px; border: none; border-radius: 50px; font-weight: 600;
  text-decoration: none; transition: all 0.3s ease; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
  color: #000000; box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3); }
.btn-secondary { background: transparent; color: #ffffff; border: 2px solid rgba(255, 255, 255, 0.3); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #ffffff; color: #ffffff; }

.home-visual { display: flex; justify-content: center; align-items: center; }
.floating-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px; padding: 3rem; backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}
.card-content { text-align: center; }
.card-content i { font-size: 4rem; color: #ffffff; margin-bottom: 1rem; display: block; }
.card-content span { font-size: 1.5rem; font-weight: 600; color: #ffffff; }

/* KAUST Logos */
.kaust-logos {
  display: flex; justify-content: center; align-items: center;
  gap: 40px; margin: 4rem 0; flex-wrap: wrap;
}
.kaust-logo { max-height: 120px; height: auto; width: auto; opacity: 0.9; transition: all 0.3s ease; filter: brightness(1.1); }
.kaust-logo:hover { opacity: 1; transform: scale(1.05); }

/* About Section */
.about-section { padding: 120px 0; position: relative; background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title {
  font-size: 3rem; font-weight: 700; margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.title-underline { width: 80px; height: 4px; background: linear-gradient(90deg, #ffffff, #cccccc); margin: 0 auto 1.5rem; border-radius: 2px; }
.section-subtitle { font-size: 1.2rem; color: #cccccc; }
.about-description { font-size: 1.2rem; color: #cccccc; line-height: 1.8; margin-bottom: 3rem; text-align: center; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px; padding: 2rem; text-align: center; transition: all 0.3s ease;
}
.feature-item:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.feature-item i { font-size: 2.5rem; color: #ffffff; margin-bottom: 1rem; }
.feature-item h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: #ffffff; }
.feature-item p { color: #cccccc; line-height: 1.6; }

/* Examples Section */
.examples-section { padding: 120px 0; position: relative; background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%); }
.examples-container { max-width: 900px; margin: 0 auto; }

/* layout (you also re-define as flex below) */
.example-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}
.examples-container .example-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-direction: row;
}

.image-container { display: flex; flex-direction: column; align-items: center; }

/* Card */
.image-wrapper {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 350px;

  /* ensure full-fit image with a steady card height */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  position: relative;
  overflow: hidden;               /* keep content inside */
}
.image-wrapper:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

/* NO CROP + NO OVERFLOW */
.examples-section .example-image {
  display: block;
  max-width: 100%;
  width: auto;                     /* don't stretch wider than natural size */
  height: auto;
  max-height: 250px;               /* fit in card height */
  object-fit: contain;             /* show entire picture */
  margin: 0 auto 1rem;
  border-radius: 10px;
  background: #0f0f0f;             /* subtle letterbox */
}

.image-label {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; color: #ffffff; font-weight: 600; font-size: 1.1rem;
}
.image-label i { color: #ffffff; font-size: 1.2rem; }

/* Arrows: only one visible depending on screen size */
.transformation-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transform: none;
  font-size: 2rem;
  color: #ffffff;
}
.transformation-arrow .arrow-right { display: inline-flex !important; }
.transformation-arrow .arrow-down  { display: none !important; }

/* Animations */
@keyframes pulse { 0%,100% {opacity:1; transform:scale(1);} 50% {opacity:.7; transform:scale(1.1);} }
@keyframes fadeInUp { from {opacity:0; transform:translateY(30px);} to {opacity:1; transform:translateY(0);} }
@keyframes float { 0%,100% {transform: translateY(0);} 50% {transform: translateY(-20px);} }

/* Members Section */
.members-section { padding: 5rem 0; color: white; background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%); }
.members-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 3rem; }
.member-card {
  background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
  border-radius: 20px; padding: 2rem; text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.member-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); }
.member-photo {
  width: 190px; height: 200px; object-fit: cover; margin: 0 auto 1.5rem; transition: border-color 0.3s ease; border-radius: 10px;
}
.member-card:hover .member-photo { border-color: rgba(255, 255, 255, 0.6); }
.member-name { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; color: white; }
.member-major { font-size: 1rem; color: rgba(255, 255, 255, 0.8); margin-bottom: 1.5rem; }
.member-links { display: flex; justify-content: center; gap: 1rem; }
.member-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 45px; height: 45px; background: rgba(255, 255, 255, 0.2);
  border-radius: 50%; color: white; text-decoration: none; transition: all 0.3s ease; font-size: 1.2rem;
}
.member-link:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.1); }
.member-link.linkedin:hover { background: #ffffff; color: #000000; }
.member-link.github:hover { background: #ffffff; color: #000000; }

/* Contact Section */
.contact-section { padding: 120px 0; position: relative; background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%); }
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.info-item { display: flex; align-items: flex-start; gap: 1rem; }
.info-item i { font-size: 1.5rem; color: #ffffff; margin-top: 0.2rem; min-width: 24px; }
.info-item h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: #ffffff; }
.info-item p { color: #cccccc; line-height: 1.6; }
.contact-form {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px; padding: 2.5rem; backdrop-filter: blur(10px);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #ffffff; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; color: #ffffff; font-size: 1rem; transition: all 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* Footer */
.footer { background: #000000; padding: 2rem 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-content { display: flex; justify-content: space-between; align-items: center; color: #888888; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: #888888; text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: #ffffff; }

/* ---------------------- Responsive ---------------------- */
@media (max-width: 768px) {
  .nav-logo { display: flex; flex-direction: row; align-items: center; justify-content: center; width: 100%; text-align: center; gap: 15px; padding: 20px; }
  .nav-logo img { height: 140px; }
  .nav-logo h2 { font-size: 2.8rem; }

  .nav-menu { font-size: 20px; }
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed; left: -100%; top: 70px; flex-direction: column;
    background-color: rgba(0, 0, 0, 0.98); width: 100%; text-align: center; transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05); backdrop-filter: blur(10px); padding: 2rem 0;
  }
  .nav-menu.active { left: 0; }
  .nav-menu li { margin: 1rem 0; }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .main-title { font-size: 2.5rem; }
  .main-description { font-size: 1.1rem; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .section-title { font-size: 2.5rem; }

  .features-grid { grid-template-columns: 1fr; }
  .contact-content { grid-template-columns: 1fr; gap: 2rem; }
  .footer-content { flex-direction: column; gap: 1rem; text-align: center; }

  .kaust-logos { flex-direction: column; gap: 2rem; margin: 3rem 0; }
  .kaust-logo { max-height: 100px; }

  .members-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .member-card { padding: 1.5rem; }

  /* Examples: stack vertically */
  .examples-container .example-pair { flex-direction: column; gap: 15px; text-align: center; }
  .example-pair { grid-template-columns: 1fr; gap: 1.5rem; }

  /* Mobile arrow: show ↓ only */
  .transformation-arrow { transform: none !important; font-size: 1.5rem; }
  .transformation-arrow .arrow-right { display: none !important; }
  .transformation-arrow .arrow-down  { display: inline-flex !important; }

  .image-wrapper { max-width: 300px; margin: 0 auto; }
  .examples-section .example-image { max-height: 250px; }
}

@media (max-width: 500px) {
  .container { padding: 0 15px; }
  .home-section { padding-top: 100px; min-height: calc(100vh - 70px); }
  .nav-logo { gap: 10px; }
  .nav-logo img { height: 120px; }
  .nav-logo h2 { font-size: 2.2rem; }
  .main-title { font-size: 2rem; line-height: 1.3; margin-bottom: 1rem; }
  .main-description { font-size: 1rem; margin-bottom: 2rem; }
  .section-title { font-size: 2rem; }
  .contact-form { padding: 1.5rem; }
  .home-content { padding-top: 1rem; }
  .floating-card { padding: 2rem; margin-top: 1rem; }
  .card-content i { font-size: 3rem; }
  .card-content span { font-size: 1.2rem; }
  .kaust-logo { max-height: 80px; }

  .examples-container { padding: 0 1rem; }
  .image-wrapper { padding: 1.5rem; max-width: 100%; }
  .transformation-arrow { font-size: 1.2rem; margin: 1rem 0; }
  .members-grid { grid-template-columns: 1fr; gap: 1rem; }
}
