/* FILE: css/style.css (Full file with the correct fix) */

/* ------------------- */
/* Variables & Resets  */
/* ------------------- */
:root {
  --font-primary: 'Lora', serif;
  --font-headings: 'Patrick Hand', cursive;
  --font-special: 'Patrick Hand SC', cursive; /* UPDATED: New special font */
  
  --color-background: #f4f6f2; /* UPDATED: New background color */
  --color-text: #403d39;
  --color-text-light: #6b6864;
  --color-accent: #556b2f;
  --color-accent-dark: #4a5d28;
  --color-border: #edeae4;
  --color-panel-bg: #e9ede3; /* Light green for highlighted panels */
  --color-card-bg: #f4f6f2; /* DEFINITIVE FIX: A very pale green for card backgrounds */
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  line-height: 1.7;
  background-color: var(--color-background);
  /* Polka dot opacity increased to 0.15 */
  background-image: radial-gradient(rgba(85, 107, 47, 0.15) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  color: var(--color-text);
}

/* ------------------- */
/* Layout & Structure  */
/* ------------------- */
.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
}

.site-footer {
  text-align: center;
  padding: 3rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ------------------- */
/* Navigation          */
/* ------------------- */
.site-logo {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 1.8rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.site-nav a {
  margin-left: 2rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  padding-bottom: 0.25rem;
  transition: color 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-accent);
}

/* ------------------- */
/* Reusable Content Panels */
/* ------------------- */
.content-panel {
  margin-top: 4rem;
  padding: 3rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background-color: #ffffff; /* Default is white */
}

.content-panel--green {
  background-color: var(--color-panel-bg); /* Modifier for green background */
}

.content-panel .section-heading {
  margin-top: 0;
}

/* ------------------- */
/* Page-Specific Content */
/* ------------------- */
.hero {
  text-align: center;
  padding: 5rem 1rem;
}

.hero h1 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--color-text-light);
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
}

.section-heading {
  font-family: var(--font-special);
  font-size: 2.5rem;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 3rem;
  line-height: 1.2; /* Adjusted for new font */
}

.page-intro {
  text-align: left; 
  padding: 3rem 0;
}

.page-intro h1 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  /* UPDATED: Added underline style */
  display: inline-block;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.5rem;
}

.page-intro p {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ------------------- */
/* Grids & Carousels   */
/* ------------------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.carousel-wrapper {
  position: relative;
}

.project-carousel {
  display: flex;
  overflow-x: auto;
  gap: 2rem;
  padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.project-carousel::-webkit-scrollbar {
  display: none;
}

.project-carousel .project-card {
  flex: 0 0 calc(50% - 1rem);
  scroll-snap-align: start;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all 0.2s ease;
}

.carousel-button:hover {
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  color: var(--color-accent);
}

.carousel-button--prev {
  left: -22px;
}

.carousel-button--next {
  right: -22px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* ------------------- */
/* Cards               */
/* ------------------- */
.project-card {
  background-color: var(--color-card-bg); 
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.project-card:hover h3 {
  color: var(--color-accent);
}

.project-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover; 
  border-bottom: 1px solid var(--color-border);
}

.project-card-content {
  padding: 1.5rem;
}

.project-card h3 {
  font-family: var(--font-headings);
  font-weight: 400;
  margin-top: 0;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.project-card p {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.project-tags {
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-tags li {
  display: inline-block;
  background-color: #ffffff; 
  color: #4a5d28;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.summary-card {
  background-color: var(--color-panel-bg);
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-accent);
}

.summary-card h3 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 1.8rem;
  margin-top: 0;
}

.summary-card p {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.summary-card .project-tags li {
  background-color: #ffffff;
  color: var(--color-accent-dark);
}

/* ------------------- */
/* Buttons             */
/* ------------------- */
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-family: var(--font-primary);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.button:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(64, 61, 57, 0.15);
}

.button-primary {
  background-color: var(--color-accent);
  color: #ffffff;
}
.button-primary:hover {
  background-color: var(--color-accent-dark);
  color: #ffffff;
}

.button-secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.button-secondary:hover {
  background-color: #ffffff;
  border-color: #dcd8d1;
}

/* ------------------- */
/* Mobile Responsive   */
/* ------------------- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .project-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .site-header {
    flex-direction: column;
    gap: 1.5rem;
  }
  .site-nav a {
    margin: 0 0.5rem;
  }
  .content-panel {
    padding: 2rem 1.5rem;
  }
  .project-carousel .project-card {
    flex-basis: 90%;
  }
  .carousel-button {
    display: none;
  }
}

/* FILE: css/style.css (additions only) */

/* ------------------- */
/* About Page          */
/* ------------------- */
.page-intro-tagline {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.6;
}

.text-accent {
  color: var(--color-accent);
  font-weight: 700;
}

.about-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-top: 4rem;
  align-items: start;
}

.about-story h2 {
  font-family: var(--font-special);
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.about-story h2:first-of-type {
  margin-top: 0;
}

/* DEFINITIVE FIX: Made the default list style more specific */
.about-story ul:not(.sunflower-list) {
  list-style: disc;
  padding-left: 20px; /* Standard indentation for lists */
}

.about-story ul:not(.sunflower-list) li {
  margin-bottom: 1.25rem;
  padding-left: 0.5rem;
}


.about-skills {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.5rem;
  background-color: var(--color-panel-bg);
  position: sticky;
  top: 2rem;
}

.about-skills h3 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 2rem;
}

.skills-section {
  margin-bottom: 2rem;
}

.skills-section h4 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  border-bottom: 1px solid rgba(64, 61, 57, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skills-list li {
  margin-bottom: 0.5rem;
}

.sunflower-list {
  list-style: none;
  padding-left: 0;
}

.sunflower-list li {
  padding-left: 2.5em;
  position: relative;
  margin-bottom: 1.25rem;
}

.sunflower-list li::before {
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 1.2em;
  content: '🌻';
}


/* Responsive adjustments for about page */
@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-skills {
    position: static;
  }
}


/* ------------------- */
/* Contact Page        */
/* ------------------- */
.contact-panel {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  margin-top: 2rem;
}

.alternate-contact {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(64, 61, 57, 0.1);
}

.alternate-contact p {
  color: var(--color-text-light);
  margin-top: 0;
  margin-bottom: 1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}
.contact-link:hover {
  text-decoration: underline;
}
.contact-link svg {
  color: var(--color-text-light);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 1rem;
  background-color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.form-submit-row {
  text-align: right;
}
.button--icon {
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
}
.button--icon svg {
  width: 24px;
  height: 24px;
}


/* ------------------- */
/* Mobile Responsive   */
/* ------------------- */
@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}


/* FILE: css/style.css (additions only) */

/* ------------------- */
/* Blog Pages          */
/* ------------------- */
.post-list {
  max-width: 800px;
  margin: 4rem auto 0 auto;
}

.post-preview {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-preview:last-child {
  border-bottom: none;
}

.post-preview h2 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 2.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.post-preview h2 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-preview h2 a:hover {
  color: var(--color-accent);
}

.post-meta {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Single Post Styles */
.post {
  max-width: 800px;
  margin: 0 auto;
}

.post-header {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 3rem;
}

.post-header h1 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 3rem;
  line-height: 1.3;
}

.post-content {
  font-size: 1.125rem;
}

.post-content h3 {
  font-family: var(--font-special);
  font-size: 2rem;
  margin-top: 3rem;
}

/* FILE: css/style.css (additions only) */

/* ... (all previous styles remain the same) ... */

/* ------------------- */
/* Latest Writing Section (Homepage) */
/* ------------------- */
.latest-writing-section {
  margin-top: 5rem;
  padding: 3rem 0;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 3rem;
}

.latest-writing-section .section-heading {
  margin-top: 0;
}

.latest-post-preview {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.latest-post-preview h3 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 2.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.latest-post-preview h3 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.latest-post-preview h3 a:hover {
  color: var(--color-accent);
}

/* FILE: css/style.css (additions only) */

/* ------------------- */
/* Individual Project Page */
/* ------------------- */
.project-page {
  max-width: 800px;
  margin: 0 auto;
}

.project-header {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 3rem;
}

.project-header h1 {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.project-tagline {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

/* REMOVED: .project-details class as it's no longer in the header */

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

/* NEW: Style for the project details now in the content */
.project-meta-details {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
  background-color: var(--color-background);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin: 2rem 0;
}

.project-meta-details strong {
  color: var(--color-text);
}


.project-content h3 {
  font-family: var(--font-special);
  font-size: 2rem;
  margin-top: 3rem;
}

/* NEW: Style for contained GIFs */
.project-gif {
  max-width: 100%;
  width: 600px; /* Adjust this value as needed */
  display: block;
  margin: 2.5rem auto;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* NEW: Styles for the flowchart link on the project page */
.view-flowchart-link {
  text-align: center;
  margin: 3rem 0;
}

/* NEW: Styles for diagrams and their figures */
.project-diagram {
  display: block;
  max-width: 100%;
  width: 100%; /* Allow it to be large on its own page */
  margin: 0 auto;
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.project-figure {
  margin: 2.5rem 0; /* Adds space around the figure */
}

.project-figure figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 1rem;
  font-style: italic;
}

.project-deliverables {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

.deliverables-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* NEW: Styles for tables within project content */
.project-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 1rem; /* Slightly smaller font for tables */
}

.project-content th,
.project-content td {
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  text-align: left;
}

.project-content th {
  background-color: var(--color-panel-bg); /* Use the sage green for the header */
  font-family: var(--font-primary);
  font-weight: 700;
}

/* Styles for lists inside tables */
.project-content td ul {
  margin: 0;
  padding-left: 1.2rem;
}

a {
  color: var(--color-accent);
}


/* NEW: Styles for the RACI Legend */
.legend {
  max-width: 400px;
  margin: 2rem auto;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background-color: var(--color-panel-bg);
}

.legend h4 {
  margin-top: 0;
  font-family: var(--font-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  color: var(--color-text-light);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.legend ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.legend li {
  margin-bottom: 0.5rem;
}

.legend li strong {
  color: var(--color-accent);
  min-width: 20px;
  display: inline-block;
}
