/*
 * 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: "Inter", "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.5rem 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-logo {
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-accent);
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.8;
}

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

.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: 2rem 1rem 1.75rem;
  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: 2.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

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

/* Hero CTA buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 1.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.btn-hero {
  background-color: var(--green-accent);
  color: #0a0a0a;
  border: 2px solid var(--green-accent);
  padding: 0.6rem 1.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-hero:hover {
  background-color: transparent;
  color: var(--green-accent);
}

.btn-hero-outline {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
  padding: 0.6rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-hero-outline:hover {
  border-color: var(--green-accent);
  color: var(--green-accent);
}

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

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.social-icons a:hover {
  border-color: var(--green-accent);
  color: var(--green-accent);
  background-color: rgba(175, 230, 96, 0.07);
}

.social-icons svg {
  width: 16px;
  height: 16px;
}

/* 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 .section-title-light {
  margin-bottom: 1rem;
}

.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 {
  text-align: center;
  display: inline-flex;
  justify-content: center;
}

.btn {
  padding: 0.55rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

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

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

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

.btn:hover {
  opacity: 0.85;
}

/* Section title accent underline */
.section-title::after,
.section-title-light::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background-color: var(--green-accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* Scroll fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* 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: left;
}

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

.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);
  border-top: 3px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-top-color: var(--green-accent);
}

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

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

/* Availability badge */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0f7e0;
  color: #4a6a00;
  border: 1px solid #c8e87a;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.85rem;
}

.availability-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #AFE660;
  display: inline-block;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 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: row;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.contact .btn {
  padding: 0.55rem 1.4rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

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

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

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

/* New Design Banner */
.new-design-banner {
  background: #AFE660;
  color: #0a0a0a;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.4rem;
  text-transform: uppercase;
}


.section-title-light {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  color: var(--dark-text);
}

/* Project Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  background: #f0f7e0;
  color: #4a6a00;
  border: 1px solid #c8e87a;
  letter-spacing: 0.02em;
}

/* 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 */
  .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: flex-end;
  }

  /* Hero */
  .hero {
    padding: 1.5rem 1rem 1.5rem;
  }
  .hero-text h1 {
    font-size: 2rem;
  }
  .hero-text .job-title {
    font-size: 0.95rem;
  }

  /* About */
  .about-container {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .about-image {
    align-self: center;
  }
  .about-image img {
    width: 180px;
    height: 180px;
  }
  .button-row {
    justify-content: flex-start;
  }

  /* Projects */
  .project-grid {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}