/* ========================================
   COMPONENTS.CSS - Reusable Components
   ======================================== */

/* ========================================
   NAVIGATION
   ======================================== */

.navigation {
  background: var(--color-primary);
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-primary);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.logo:hover {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Mobile Menu Toggle (hidden by default) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition-fast);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  text-align: left;
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  line-height: var(--leading-relaxed);
  max-width: 70ch;
  margin-bottom: var(--space-6);
}

/* ========================================
   BUTTONS & CTAs
   ======================================== */

.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

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

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

/* CTA Button */
.cta-button {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
  background: var(--color-accent);
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cta-button:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ========================================
   ABOUT INTRO SECTION (Photo + Quote)
   ======================================== */

.about-intro {
  background: var(--color-primary);
  padding: var(--space-12) var(--space-6);
}

.about-intro-container {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-8);
  align-items: center;
}

.about-intro-image {
  position: relative;
}

.about-intro-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  border: 4px solid var(--color-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.about-intro-content {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.faraday-quote {
  font-family: var(--font-primary);
  font-size: var(--text-2xl);
  font-weight: var(--weight-medium);
  font-style: italic;
  color: var(--color-white);
  line-height: var(--leading-relaxed);
  border-left: 4px solid var(--color-accent);
  padding-left: var(--space-4);
  margin: 0 0 var(--space-3) 0;
}

.quote-attribution {
  font-family: var(--font-technical);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  margin-top: var(--space-2);
  margin-left: var(--space-4);
  margin-bottom: var(--space-4);
}

.about-intro-content .cta-button {
  align-self: flex-start;
  margin-left: var(--space-4);
}

/* ========================================
   PROJECT GRID
   ======================================== */

.projects-section {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-6);
  text-align: left;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

/* ========================================
   PROJECT CARD
   ======================================== */

.project-card {
  background: var(--color-primary);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition-base), border var(--transition-base);
  border: 3px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
}

.project-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  background-size: cover;
  background-position: center;
}

.project-content {
  padding: var(--space-3);
}

.project-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.project-description {
  font-size: var(--text-sm);
  color: #b0b0b0;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
}

.project-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: 3px;
  font-family: var(--font-technical);
}

/* ========================================
   PROJECT DETAIL PAGE
   ======================================== */

/* Project Hero Image */
.project-hero {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Breadcrumb */
.breadcrumb {
  max-width: var(--container-medium);
  margin: 0 auto;
  padding: var(--space-3) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

/* Project Article */
.project-article {
  max-width: var(--container-medium);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}

.project-article-title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-2);
}

.project-meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-family: var(--font-technical);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.project-meta span {
  display: inline-block;
}

/* Content Container */
#content-container {
  margin-top: var(--space-6);
}

/* Project Image Figure */
.project-image-figure {
  margin: var(--space-6) 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.project-image-figure img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-image-figure figcaption {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: var(--leading-normal);
}

/* Full-Width Image */
.project-image-full {
  margin: var(--space-8) 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.project-image-full img {
  width: 100%;
  height: auto;
  display: block;
}

/* Project Navigation */
.project-navigation {
  max-width: var(--container-medium);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3) var(--space-8);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

.back-link:hover {
  border-bottom-color: var(--color-accent);
  color: var(--color-primary);
}

/* ========================================
   BLOG SECTION & CARDS
   ======================================== */

.blog-section {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

/* Blog Card - Different from Project Card */
.blog-card {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 2px solid var(--color-border);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.15);
  border-color: var(--color-accent);
}

.blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  background-size: cover;
  background-position: center;
}

.blog-content {
  padding: var(--space-3);
}

.blog-meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-family: var(--font-technical);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.blog-meta span {
  display: inline-block;
}

.blog-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  line-height: var(--leading-snug);
}

.blog-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
}

.blog-tags {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.blog-tag {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(255, 107, 53, 0.1);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: 3px;
  font-family: var(--font-primary);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  margin-top: var(--space-2);
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

/* Blog Post Detail Page */
.blog-article {
  max-width: var(--container-medium);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}

.blog-article-title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-2);
}

.blog-article-meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-family: var(--font-technical);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-8) var(--space-6);
  margin-top: var(--space-16);
}

.footer-container {
  max-width: var(--container-wide);
  margin: 0 auto;
  text-align: center;
}

.footer p {
  font-size: var(--text-sm);
  color: #b0b0b0;
  max-width: none;
}

.footer a {
  color: var(--color-white);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.footer a:hover {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

/* ========================================
   FORMS (Optional)
   ======================================== */

.form-group {
  margin-bottom: var(--space-3);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

input,
textarea {
  width: 100%;
  padding: var(--space-2);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: 4px;
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

textarea {
  resize: vertical;
  min-height: 120px;
}
