/*
 * Stylesheet for Brandon Tidd’s personal website
 * The design focuses on clarity, modern aesthetics and accessibility.
 */

/* Root variables define the color palette used throughout the site. */
:root {
  --color-primary: #5e60ce;
  --color-secondary: #64dfdf;
  --color-dark: #0b2545;
  --color-light: #f5f6fa;
  --color-text-dark: #333;
  --color-text-light: #ffffff;
  --max-width: 1200px;
}

/* Reset some basic elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--color-light);
  color: var(--color-text-dark);
  line-height: 1.6;
}

/* Fixed header with semi‑transparent background */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 1000;
  border-bottom: 1px solid #e5e5e5;
}

header .logo a {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-dark);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--color-primary);
}

/* Hero section with full‑width background image */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../images/hero.png');
  background-size: cover;
  background-position: center;
  height: 80vh;
  color: var(--color-text-light);
  text-align: center;
  position: relative;
  margin-top: 64px; /* offset header height */
}

/* Dark overlay to improve legibility on the hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Reusable button style */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  background: var(--color-primary);
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.btn:hover {
  background: var(--color-secondary);
}

/* Generic section styling */
.section {
  padding: 4rem 2rem;
}

.section.dark {
  background-color: var(--color-dark);
  color: var(--color-text-light);
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

/* Grid layout for cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

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

.card p {
  line-height: 1.4;
}

.card a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* About page container */
.about-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-container img {
  flex: 1 1 250px;
  max-width: 300px;
  border-radius: 10px;
}

.about-container div {
  flex: 2 1 300px;
}

/* Timeline for the AI journey page */
.timeline {
  position: relative;
  margin: 2rem auto;
  padding: 0 0.5rem;
  max-width: 800px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-primary);
  transform: translateX(-50%);
}

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

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

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

.timeline-item::before {
  content: '';
  position: absolute;
  top: 1rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 4px solid var(--color-light);
  box-shadow: 0 0 0 2px var(--color-primary);
}

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

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

.timeline-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-size: 1.25rem;
}

.timeline-item p {
  line-height: 1.4;
}

/* Footer styling */
.footer {
  background: var(--color-dark);
  color: var(--color-text-light);
  padding: 2rem;
  text-align: center;
}

.footer a {
  color: var(--color-secondary);
  margin: 0 0.5rem;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  /* Stack timeline items on mobile */
  .timeline::before {
    left: 8px;
  }
  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left;
    padding-left: 40px;
  }
  .timeline-item::before {
    left: -24px;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
}