/* ------------------------------------------------------------------
   Global styles and variables
   This stylesheet defines the look and feel for the personal website
   of Ala Mashini. The palette is intentionally minimal: black,
   white and shades of grey, with a teal accent inspired by modern
   technology brands. Layouts adjust gracefully from desktop down
   to mobile screens.
------------------------------------------------------------------ */

:root {
  /* Base colours (light theme) */
  --bg-color: #f9fafb;          /* very light grey background */
  --section-bg: #ffffff;         /* white sections */
  --card-bg: #f3f4f6;            /* light grey cards */ 
  --text-color: #1f2937;         /* dark text */
  --muted-text: #6b7280;         /* muted dark grey text */
  --primary-color: #00a67e;      /* teal accent */
  --border-color: #e5e7eb;       /* light border */
  --nav-bg: #101828;             /* dark navigation background */
  --hero-text: #ffffff;          /* white text for hero for contrast */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Navigation bar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  /* Use dark background to harmonise with hero overlay */
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-bg);
  z-index: 999;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

/* Navigation container */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

.logo img {
  width: 40px;
  height: auto;
}

/* Navigation links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--section-bg);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s, border-bottom 0.3s;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-links li a:hover,
.nav-links li a:focus {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.nav-links li a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--section-bg);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--section-bg);
  left: 0;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

/* Responsive navigation */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--section-bg);
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 998;
  }
  .nav-links.open {
    max-height: 400px;
  }
  .nav-links li {
    text-align: center;
  }
  .nav-links li a {
    padding: 1rem 0;
    display: block;
  }
}

nav li a {
  color: var(--section-bg);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s, border-bottom 0.3s;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
}

nav li a:hover,
nav li a:focus {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

nav li a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Hero section */
.hero {
  min-height: 100vh;
  background-image: url('assets/hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Dark gradient overlay to improve contrast with white text */
  background: linear-gradient(to bottom, rgba(16, 24, 40, 0.8), rgba(16, 24, 40, 0.3));
}

.hero .overlay {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 3rem;
  margin: 0 0 1rem;
  line-height: 1.2;
  color: var(--hero-text);
}

.hero p {
  font-size: 1.25rem;
  margin: 0 0 2rem;
  color: var(--hero-text);
}

.cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--bg-color);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.btn:hover,
.btn:focus {
  background-color: var(--text-color);
  color: var(--bg-color);
}

.btn.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn.btn-secondary:hover,
.btn.btn-secondary:focus {
  background-color: var(--primary-color);
  color: var(--bg-color);
}

/* Generic section styling */
.section {
  padding: 6rem 1rem 4rem;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  background-color: var(--section-bg);
  border-bottom: 1px solid var(--border-color);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-color);
}

.section p {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted-text);
}

/* Card layout for professional background */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.card {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  flex: 1 1 calc(33% - 2rem);
  min-width: 250px;
  max-width: 350px;
  border: 1px solid var(--border-color);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-align: center;
}

.card p {
  margin: 0;
  color: var(--muted-text);
}

/* Lists for thesis and help sections */
.thesis-list,
.help-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 800px;
}

.thesis-list li,
  .help-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--muted-text);
}

/* Remove icon styling now that bullets are handled via pseudo elements */

/* Custom bullet for thesis/help lists */
.thesis-list li::before,
.help-list li::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--primary-color);
  border-radius: 50%;
  margin-right: 0.75rem;
  margin-top: 0.45rem;
  flex-shrink: 0;
}

/* Additional spacing for help list items */
.help-list li {
  margin-bottom: 2rem;
}

/* Contact form */
.contact form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact .field input,
.contact .field textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  resize: vertical;
  font-size: 1rem;
}

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

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

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted-text);
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
}

/* Headshot styling for personal connection */
.headshot-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.headshot {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

/* Visually hidden labels for accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Testimonials */
.testimonials .testimonial-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.testimonial-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  flex: 1 1 calc(33% - 2rem);
  min-width: 250px;
  max-width: 350px;
}

.testimonial-card .quote {
  font-style: italic;
  color: var(--text-color);
  margin: 0 0 0.5rem;
}

.testimonial-card .author {
  color: var(--muted-text);
  text-align: right;
  margin: 0;
}

/* Responsive styles */
@media (max-width: 900px) {
  .cards {
    flex-direction: column;
    align-items: center;
  }
  .card {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  nav li a {
    font-size: 0.8rem;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .section {
    padding-top: 5rem;
  }
}
