/* ================================
   CSS Variables (Easy to customize)
   ================================ */
:root {
  --color-primary: #d4d426;      /* Yellow accent */
  --color-dark: #1a1a1a;         /* Dark background */
  --color-darker: #0d0d0d;       /* Darker sections */
  --color-light: #f5f5f5;        /* Light background */
  --color-text: #333;            /* Body text */
  --color-text-light: #ffffff;   /* Light text */
  --color-text-muted: #666;      /* Muted text */
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --max-width: 1200px;
  --spacing: 2rem;
}

/* ================================
   Reset & Base
   ================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-light);
}

img {
  max-width: 100%;
  height: auto;
}

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

/* ================================
   Navigation
   ================================ */
.site-header {
  background-color: rgba(26, 26, 26, 0.85);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-light);
  font-weight: 600;
}

.nav-brand .logo {
  height: 40px;
  width: auto;
}

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

.nav-links a {
  color: var(--color-text-light);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.nav-links .dropdown {
  position: relative;
  padding-bottom: 0.5rem;
}

.nav-links .dropdown-toggle {
  color: var(--color-text-light);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  cursor: pointer;
}

.nav-links .dropdown:hover .dropdown-toggle {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-dark);
  list-style: none;
  min-width: 200px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-top: 0;
}

.nav-links .dropdown:hover .dropdown-menu {
  display: block;
}

.nav-links .dropdown-menu li {
  margin: 0;
}

.nav-links .dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-text-light);
  transition: background-color 0.2s;
  border-radius: 0;
}

.nav-links .dropdown-menu a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-links .dropdown-menu li:first-child a {
  border-radius: 4px 4px 0 0;
}

.nav-links .dropdown-menu li:last-child a {
  border-radius: 0 0 4px 4px;
}

/* ================================
   Hero Section
   ================================ */
.hero {
  background-size: cover;
  background-position: center;
  background-color: var(--color-dark);
  color: var(--color-text-light);
  padding: 6rem var(--spacing) 4rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
}

.hero-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.hero .tagline {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero .mission-title {
  color: var(--color-primary);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.hero .mission-statement {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Page Hero Layout */
.page-hero {
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  width: 100%;
  padding-top: 60px;
}

.page-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.page-hero .company-lead {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.page-hero .hero-title {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-hero .hero-text {
  font-size: 1.3rem;
  color: var(--color-text-light);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Content wrapper for page-hero layout */
.content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
}

/* Links in content areas */
.content-wrapper a,
.page-content a {
  color: #0066cc;
  text-decoration: underline;
  transition: color 0.2s;
}

.content-wrapper a:hover,
.page-content a:hover {
  color: #0052a3;
  text-decoration: underline;
}

.content-wrapper a:visited,
.page-content a:visited {
  color: #551a8b;
}

.content-wrapper h1 {
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.content-wrapper h2 {
  color: var(--color-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.content-wrapper p {
  margin-bottom: 1rem;
}

.content-wrapper ul, .content-wrapper ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.content-wrapper li {
  margin-bottom: 0.5rem;
}

/* Related Links for Projects */
.related-links {
  margin-top: 3rem;
  padding: 1.5rem;
  background-color: rgba(212, 212, 38, 0.1);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
}

.related-links h3 {
  color: var(--color-dark);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.related-links ul {
  list-style: none;
  padding-left: 0;
}

.related-links li {
  margin-bottom: 0.75rem;
}

.related-links a {
  color: #0066cc;
  text-decoration: underline;
  transition: color 0.2s;
}

.related-links a:hover {
  color: #0052a3;
}

.related-links a:visited {
  color: #551a8b;
}

/* ================================
   Features Grid (Homepage cards)
   ================================ */
.features {
  padding: 3rem var(--spacing);
  max-width: var(--max-width);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
}

.feature-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.feature-card img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.feature-text h3 {
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.feature-text p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ================================
   Page Content
   ================================ */
.site-main {
  min-height: calc(100vh - 60px - 100px); /* viewport - header - footer */
}

.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--spacing) 3rem;
}

.page-content h1 {
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.page-content h2 {
  color: var(--color-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

/* ================================
   Project Pages
   ================================ */
.project {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--spacing);
}

.project-header {
  text-align: center;
  margin-bottom: 2rem;
}

.project-header h1 {
  color: var(--color-dark);
  font-size: 2.5rem;
}

.project-header .subtitle {
  color: var(--color-text-muted);
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.featured-image {
  margin: 2rem 0;
  text-align: center;
}

.featured-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.featured-image figcaption {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.project-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.project-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

.project-content img {
  margin: 1.5rem 0;
  border-radius: 4px;
}

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

.footer-content p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.footer-content a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.footer-content a:hover {
  opacity: 0.8;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card {
    flex-direction: column;
  }
  
  .feature-card img {
    width: 100%;
    height: 200px;
  }
}