/*
 * Stylesheet for Brandon Pereira's personal website.
 *
 * The layout uses CSS variables to define a coherent colour palette
 * and spacing system. Flexbox and grid are used to structure the
 * content responsively. Media queries collapse the navigation and
 * timeline on small screens. Smooth scrolling behaviour is enabled
 * for anchor links.
 */

/* Root colour palette and layout variables */
:root {
  --nav-bg: #0a0a0a;
  --hero-bg: #222222;
  --dark-bg: #0b0b0b;
  --light-green: #e8f5cc;
  --green-accent: #AFE660;
  --primary-text: #ffffff;
  --secondary-text: #d9d9d9;
  --dark-text: #1a1a1a;
  --card-bg: #ffffff;
  --max-width: 1100px;
  --section-padding: 4rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Navigation bar */
.navbar {
  background-color: var(--nav-bg);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links li a {
  color: var(--primary-text);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: var(--green-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-text);
  font-size: 1.75rem;
  cursor: pointer;
  margin-left: auto;
}

/* Hero section */
.hero {
  position: relative;
  background-color: var(--hero-bg);
  color: var(--primary-text);
  overflow: hidden;
  padding: 6rem 1rem 5rem;
  text-align: left;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../assets/hero-bg2.png");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-text .job-title {
  font-size: 1.25rem;
  color: var(--secondary-text);
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons img {
  width: 28px;
  height: 28px;
  filter: none;
  transition: transform 0.3s ease;
}

.social-icons a:hover img {
  transform: scale(1.1);
}

/* About section */
.about {
  padding: var(--section-padding) 1rem;
  background-color: #fff;
  color: var(--dark-text);
}

.about-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}

.about-image img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e0e0e0;
}

.about-content {
  flex: 1;
}

.about-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-text);
}

.about-content p {
  margin-bottom: 1rem;
  color: #555;
}

.location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  color: #000000;
  font-weight: 500;
}

.location img {
  height: 18px;
  width: auto;
  filter: none;
}

.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.button-row .btn {
  min-width: 11rem; /* approx 176px wide to fit "Certifications" comfortably */
  text-align: center;
  display: inline-flex;
  justify-content: center;
}

.btn {
  padding: 0.35rem 1.2rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn {
  background-color: var(--hero-bg);
  color: var(--primary-text);
  border: 1px solid var(--hero-bg);
}

.btn.outline {
  background-color: transparent;
  color: var(--hero-bg);
  border: 1px solid var(--hero-bg);
}

.btn.outline:hover {
  background-color: var(--hero-bg);
  color: var(--primary-text);
}

.btn:hover {
  opacity: 0.9;
}

/* Experience section */
.experience {
  background-color: var(--dark-bg);
  color: var(--primary-text);
  padding: var(--section-padding) 1rem;
}

.experience .section-title {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-text);
}

.timeline {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background-color: var(--green-accent);
}

.timeline-item {
  width: 50%;
  padding: 1.5rem 2rem;
  position: relative;
}

.timeline-item.left {
  text-align: left;
  left: 0;
}

.timeline-item.right {
  text-align: left;
  left: 50%;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--green-accent);
  z-index: 1;
}

.timeline-item.left::before {
  right: -6px;
}

.timeline-item.right::before {
  left: -6px;
}

.timeline-content {
  background: transparent;
  border-left: none;
  color: var(--primary-text);
}

.timeline-date {
  display: block;
  font-size: 0.8rem;
  color: var(--green-accent);
  margin-bottom: 0.25rem;
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--primary-text);
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--secondary-text);
}

.timeline-content p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--secondary-text);
}

/* Projects section */
.projects {
  background-color: var(--dark-bg);
  color: var(--primary-text);
  padding: var(--section-padding) 1rem;
}

.projects .section-title {
  max-width: var(--max-width);
  margin: 0 auto 1rem;
  font-size: 2rem;
  font-weight: 600;
}

.projects .section-description {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  color: var(--secondary-text);
  font-size: 0.9rem;
  text-align: auto;
}

.project-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background-color: var(--card-bg);
  color: var(--dark-text);
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
}

/* Contact section */
.contact {
   background-color: #ffffff;
  color: var(--dark-text);
  padding: var(--section-padding) 1rem;
}

.contact-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-container h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-container p {
  max-width: 500px;
  font-size: 0.9rem;
  color: #333;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact .btn {
  padding: 0.35rem 1.2rem;
  border-radius: 3px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-transform: uppercase;
  width: 180px;
}

.contact .btn.outline {
  background-color: transparent;
  color: var(--dark-text);
  border: 2px solid var(--dark-text);
}

.contact .btn.outline:hover {
  background-color: var(--dark-text);
  color: var(--primary-text);
}

.contact .btn.filled {
  background-color: var(--hero-bg);
  color: var(--primary-text);
  border: 1px solid var(--hero-bg);
}

.contact .btn.filled:hover {
  opacity: 0.9;
}

/* Footer */
.footer {
  background-color: var(--hero-bg);
  color: var(--primary-text);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* Responsive styles */
@media (max-width: 900px) {
  .timeline::before {
    left: 20px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 3rem;
    margin-bottom: 2rem;
  }
  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }
  .timeline-item::before {
    left: 0;
  }
}

@media (max-width: 700px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--nav-bg);
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    display: none;
    border-bottom-left-radius: 4px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .nav-container {
    justify-content: space-between;
  }
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .about-image img {
    width: 200px;
    height: 200px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .contact-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
}