/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500&display=swap');

/* --- CSS Variables & Theming --- */
:root {
  --primary-green: #00994D;
  --background-color: #fcfcf9;
  --footer-brown: #A95C4F;
  --font-family: 'Manrope', sans-serif;
  --base-spacing: 1.5rem;
  --duotone-shadow: rgba(0, 153, 77, 0.2);
  --duotone-highlight: rgba(0, 153, 77, 0.8);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--primary-green);
  line-height: 1.6;
  min-height: 100vh;
}

/* --- Global Wrapper Layout (matches WordPress) --- */
.global-wrapper {
  padding: calc(var(--base-spacing) * 3.5) 0;
  max-width: 100%;
}

.main-columns {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--base-spacing) * 2);
}

/* --- 7.5% Header Column --- */
.header-column {
  flex-basis: 7.5%;
  flex-shrink: 0;
}

/* Logo in social sidebar */
.logo {
  margin-bottom: calc(var(--base-spacing) * 1.5);
  padding-bottom: calc(var(--base-spacing) * 0.5);
  border-bottom: 1px solid rgba(0, 153, 77, 0.2);
  margin-top: -0.2rem;
  text-decoration: none;
  display: block;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.7;
}

.logo-image {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  border-radius: 0.5px;
}

/* --- 92.5% Content Column --- */
.content-column {
  flex-basis: 92.5%;
  flex-shrink: 0;
}

.content-wrapper {
  min-height: 80vh;
}

/* --- Hero Section: 50/50 Split --- */
.hero-columns {
  display: flex;
  margin-bottom: calc(var(--base-spacing) * 4);
}

.hero-text-column {
  flex-basis: 50%;
  padding-right: calc(var(--base-spacing) * 2);
}

.hero-empty-column {
  flex-basis: 50%;
}

.hero-text {
  font-size: 1.4rem;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: calc(var(--base-spacing) * 1.5);
}

.main-nav {
  margin-top: calc(var(--base-spacing) * 0.5);
}

.main-nav a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
  margin-right: calc(var(--base-spacing) * 1.2);
  font-size: 1rem;
  display: inline-block;
}

.main-nav a:hover {
  text-decoration: underline;
}

.main-nav a.current-page {
  text-decoration: underline;
  opacity: 0.7;
}

/* --- Spacer --- */
.spacer-xl {
  height: calc(var(--base-spacing) * 5);
}

/* --- Blog Section: 25/75 Split --- */
.blog-columns {
  display: flex;
}

.blog-empty-column {
  flex-basis: 25%;
}

.blog-content-column {
  flex-basis: 75%;
}

/* --- Page Layout for Other Pages --- */
.nav-title-section {
  display: flex;
  flex-direction: column;
  width: 30%;
  gap: calc(var(--base-spacing) * 2);
}

.page-nav a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
  margin-right: calc(var(--base-spacing) * 1.2);
  font-size: 1rem;
  display: inline-block;
}

.page-nav a:hover {
  text-decoration: underline;
}

.page-nav a.current-page {
  text-decoration: underline;
  opacity: 0.7;
}

.page-title-left {
  font-size: 3.25rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--primary-green);
}

.content-layout {
  display: flex;
}

.content-left {
  flex-basis: 30%;
}

.content-right {
  flex-basis: 70%;
}

/* --- Experience Page Styles --- */
.experience-content {
  max-width: 680px;
}

.experience-section {
  margin-bottom: calc(var(--base-spacing) * 3);
}

.experience-section:last-child {
  margin-bottom: 0;
}

.experience-entry {
  margin-bottom: calc(var(--base-spacing) * 2.5);
}

.experience-entry:last-child {
  margin-bottom: 0;
}

.experience-header {
  display: flex;
  flex-direction: column;
  gap: calc(var(--base-spacing) * 0.25);
  margin-bottom: calc(var(--base-spacing) * 0.5);
}

.role-title {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--primary-green);
}

.company {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--primary-green);
  opacity: 0.8;
}

.experience-meta {
  display: flex;
  gap: calc(var(--base-spacing) * 1);
  margin-bottom: calc(var(--base-spacing) * 0.75);
}

.duration,
.location {
  font-size: 0.95rem;
  color: var(--primary-green);
  opacity: 0.7;
}

.experience-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--primary-green);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--base-spacing) * 2);
}

.skill-category-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--primary-green);
  margin-bottom: calc(var(--base-spacing) * 0.75);
}

.skill-list {
  list-style: none;
  padding: 0;
}

.skill-list li {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--primary-green);
  opacity: 0.8;
  margin-bottom: calc(var(--base-spacing) * 0.25);
  position: relative;
  padding-left: calc(var(--base-spacing) * 0.75);
}

.skill-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-green);
  opacity: 0.6;
}

/* --- Projects Page Styles --- */
.projects-content {
  max-width: 680px;
}

.project-entry {
  margin-bottom: calc(var(--base-spacing) * 4);
}

.project-entry:last-child {
  margin-bottom: 0;
}

.project-title {
  font-size: 3.25rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: calc(var(--base-spacing) * 1.5);
}

.project-title-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--primary-green);
  text-decoration-thickness: 1.5px;
  text-decoration-skip-ink: none;
  text-underline-offset: 5px;
}

.project-title-link:hover {
  text-decoration: none;
}

.project-meta {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--base-spacing) * 1.2);
}

.project-image-container {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--duotone-shadow), var(--duotone-highlight));
  overflow: hidden;
  position: relative;
}

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

.project-details {
  display: flex;
  flex-direction: column;
  gap: calc(var(--base-spacing) * 0.25);
  flex: 1;
}

.project-description {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--primary-green);
  opacity: 0.8;
  margin-top: calc(var(--base-spacing) * 0.75);
}

.project-year {
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
  color: var(--primary-green);
}

.project-tech {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--primary-green);
  opacity: 0.8;
}

/* Hide images on mobile */
@media (max-width: 1024px) {
  .project-image-container {
    display: none;
  }
  
  .project-title {
    font-size: 2.5rem;
  }
  
  .project-year {
    font-size: 1.6rem;
  }
  
  .project-meta {
    align-items: center;
  }
}

/* --- Blog Post Content Styles --- */
.post-content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--primary-green);
}

.post-content p {
  margin-bottom: calc(var(--base-spacing) * 1.2);
}

.post-content h1,
.post-content h2,
.post-content h3 {
  font-weight: 400;
  line-height: 1.3;
  margin-top: calc(var(--base-spacing) * 2);
  margin-bottom: calc(var(--base-spacing) * 1);
}

.post-content h1 {
  font-size: 2rem;
}

.post-content h2 {
  font-size: 1.6rem;
}

.post-content h3 {
  font-size: 1.3rem;
}

.post-content strong {
  font-weight: 500;
}

.post-content em {
  font-style: italic;
}

.post-content ul,
.post-content ol {
  margin-bottom: calc(var(--base-spacing) * 1.2);
  padding-left: calc(var(--base-spacing) * 1.5);
}

.post-content li {
  margin-bottom: calc(var(--base-spacing) * 0.5);
}

/* --- About Page Styles --- */
.page-title {
  font-size: 3.25rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: calc(var(--base-spacing) * 1.5);
  color: var(--primary-green);
}

.about-content {
  max-width: 680px;
}

.about-section {
  margin-bottom: calc(var(--base-spacing) * 3);
}

.about-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: calc(var(--base-spacing) * 1);
  color: var(--primary-green);
}

.about-paragraph {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: calc(var(--base-spacing) * 1.2);
  color: var(--primary-green);
}

.about-paragraph:last-child {
  margin-bottom: 0;
}

/* --- Blog List Styles --- */
.blog-list {
  list-style: none;
}

.blog-post {
  margin-bottom: calc(var(--base-spacing) * 4);
}

.blog-post:last-of-type {
  margin-bottom: 0;
}

.post-title {
  font-size: 3.25rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: calc(var(--base-spacing) * 1.5);
}

.post-title a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--primary-green);
  text-decoration-thickness: 1.5px;
  text-decoration-skip-ink: none;
  text-underline-offset: 5px;
}

.post-title a:hover {
  text-decoration: none;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: calc(var(--base-spacing) * 1.2);
}

.post-image-container {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--duotone-shadow), var(--duotone-highlight));
  overflow: hidden;
  position: relative;
}

.post-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 40%, var(--primary-green) 100%);
  opacity: 0.1;
  pointer-events: none;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-date {
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}

/* --- Social Sidebar (Fixed Position) --- */
.social-sidebar {
  position: fixed;
  left: calc(var(--base-spacing) * 1.5);
  top: calc(var(--base-spacing) * 3.5);
  z-index: 10;
}

.social-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0;
}

.social-links a {
  margin-bottom: var(--base-spacing);
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: var(--primary-green);
  transition: opacity 0.2s ease-in-out;
}

.social-links a:hover svg {
  opacity: 0.7;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .main-columns {
    flex-direction: column;
    padding: 0 var(--base-spacing);
    padding-left: calc(var(--base-spacing) * 3);
  }

  .header-column {
    flex-basis: auto;
    margin-bottom: var(--base-spacing);
  }

  .content-column {
    flex-basis: auto;
  }

  .hero-columns {
    flex-direction: column;
  }

  .hero-text-column {
    flex-basis: auto;
    padding-right: 0;
    margin-bottom: var(--base-spacing);
  }

  .hero-empty-column {
    display: none;
  }

  .blog-columns {
    flex-direction: column;
  }

  .blog-empty-column {
    display: none;
  }

  .blog-content-column {
    flex-basis: auto;
  }

  .social-sidebar {
    position: fixed;
    left: calc(var(--base-spacing) * 0.5);
    top: calc(var(--base-spacing) * 0.5);
    transform: none;
    text-align: left;
    margin: 0;
  }

  .social-links {
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--base-spacing) * 0.5);
  }

  .logo {
    margin-bottom: calc(var(--base-spacing) * 0.5);
    padding-bottom: calc(var(--base-spacing) * 0.25);
    border-bottom: 1px solid rgba(0, 153, 77, 0.2);
    margin-right: 0;
    padding-right: 0;
    border-right: none;
  }

  .logo-image {
    width: 28px;
    height: 28px;
  }

  .social-links svg {
    width: 28px;
    height: 28px;
  }

  .social-links a {
    margin-bottom: calc(var(--base-spacing) * 0.5);
  }

  .hero-text {
    font-size: 1.2rem;
  }

  .post-title {
    font-size: 2.5rem;
  }

  .post-date {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .global-wrapper {
    padding: var(--base-spacing) 0;
  }

  .hero-text {
    font-size: 1.1rem;
  }

  .post-title {
    font-size: 2.1rem;
  }

  .post-date {
    font-size: 1.4rem;
  }

  .post-image-container {
    width: 65px;
    height: 65px;
  }
}
