:root {
  --green-dark: #2f4a3c;
  --green-mid: #4c7a5e;
  --green-light: #e8efe9;
  --cream: #faf8f3;
  --text: #2b2b26;
  --text-soft: #5c5c54;
  --border: #d8ddd4;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--green-dark);
  color: white;
  padding: 48px 0 28px;
}

.site-header h1 {
  font-family: var(--font-heading);
  margin: 0 0 6px;
  font-size: 2.4rem;
  letter-spacing: 0.01em;
}

.site-header .tagline {
  margin: 0 0 20px;
  color: #cfe0d3;
  font-size: 1.05rem;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-header nav a {
  color: white;
  text-decoration: none;
  font-size: 0.92rem;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-header nav a:hover {
  opacity: 1;
  border-bottom-color: white;
}

/* Sections */
.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--green-light);
}

.section h2 {
  font-family: var(--font-heading);
  color: var(--green-dark);
  font-size: 1.7rem;
  margin: 0 0 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

.section h3 {
  font-family: var(--font-heading);
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 1.2rem;
}

.project-meta {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin: 0 0 10px;
  font-style: italic;
}

/* Project cards */
.project-card {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: 36px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  margin-left: -10px;
  margin-right: -10px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.project-card:hover {
  background: rgba(76, 122, 94, 0.08);
}

.project-card:hover .project-photo {
  border-color: var(--green-dark);
}

.project-card.reverse {
  flex-direction: row-reverse;
}

.project-photo {
  flex: 0 0 260px;
  height: 180px;
  border-radius: 6px;
}

.project-text {
  flex: 1;
}

.project-text p:last-child {
  margin-bottom: 10px;
}

.view-project {
  display: inline-block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--green-dark);
}

/* Project detail pages */
.detail-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.back-link {
  color: var(--green-dark);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.project-hero {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 8px;
  margin: 28px 0;
  display: block;
}

.detail-title {
  font-family: var(--font-heading);
  color: var(--green-dark);
  font-size: 2rem;
  margin: 0 0 6px;
}

.detail-body {
  max-width: 700px;
  font-size: 1.02rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.project-gallery .placeholder {
  height: 160px;
  border-radius: 6px;
}

.project-gallery figure {
  margin: 0;
}

.project-gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.project-gallery figcaption {
  font-size: 0.82rem;
  margin-top: 6px;
}

.project-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

@media (max-width: 640px) {
  .project-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .project-hero {
    height: 220px;
  }
}

/* Placeholder image blocks */
.placeholder {
  background: repeating-linear-gradient(
    45deg,
    #dfe6e0,
    #dfe6e0 10px,
    #eef2ee 10px,
    #eef2ee 20px
  );
  border: 1px dashed var(--green-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.82rem;
  padding: 12px;
}

.placeholder-text {
  color: var(--text-soft);
  font-style: italic;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.timeline-item {
  display: flex;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-date {
  flex: 0 0 130px;
  font-weight: 600;
  color: var(--green-mid);
  font-size: 0.9rem;
  padding-top: 3px;
}

.timeline-content {
  flex: 1;
}

.timeline-content p:last-child {
  margin-bottom: 0;
}

/* Highlight list */
.highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.highlight-list li {
  background: white;
  border-left: 3px solid var(--green-mid);
  padding: 14px 18px;
  border-radius: 2px;
}

/* Dev grid */
.dev-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dev-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
}

.dev-card ul {
  margin: 0;
  padding-left: 18px;
}

.dev-card li {
  margin-bottom: 6px;
}

/* Contact / footer */
.resume-link {
  display: inline-block;
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--green-mid);
  padding-bottom: 2px;
}

.site-footer {
  padding: 24px 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* Zoomable images */
img.zoomable {
  cursor: zoom-in;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 22, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
  padding: 40px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-caption {
  color: #eef2ee;
  margin-top: 14px;
  font-size: 0.95rem;
  text-align: center;
  max-width: 70vw;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: white;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}

.lightbox-close:hover {
  color: var(--green-light);
}

/* Responsive */
@media (max-width: 640px) {
  .project-card,
  .project-card.reverse {
    flex-direction: column;
  }
  .project-photo {
    flex: none;
    width: 100%;
  }
  .timeline-item {
    flex-direction: column;
    gap: 6px;
  }
  .dev-grid {
    grid-template-columns: 1fr;
  }
}
