/* ============================================
   Construction Portfolio — base styles
   ============================================ */

:root {
  --color-bg: #f6f4f1;
  --color-surface: #ffffff;
  --color-text: #1c1a17;
  --color-muted: #6b6459;
  --color-border: #e4e0d9;
  --color-dark: #15130f;
  --color-dark-surface: #211e19;
  --color-accent: #d9622b;
  --color-accent-dark: #b8501f;
  --max-width: 1200px;
  --radius: 3px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.muted { color: var(--color-muted); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.6em;
  display: block;
}

.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--color-accent);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

.btn-outline.on-dark {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.btn-outline.on-dark:hover {
  background: #fff;
  color: var(--color-dark);
}

/* ---------- Hero ---------- */

.hero {
  background: var(--color-dark);
  color: #fff;
  padding: 90px 0 100px;
  position: relative;
}

.hero-inner {
  max-width: 700px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: #c9c5bd;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ---------- Section spacing ---------- */

.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head .btn {
  flex-shrink: 0;
}

/* ---------- Project grid / cards ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(20,18,14,0.12);
}

.project-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9e5dd;
}

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

.project-card-body {
  padding: 18px 20px 22px;
}

.project-card-body h3 {
  margin-bottom: 4px;
}

.project-card-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- Project detail modal ---------- */

.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(10,9,7,0.78);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 150;
  padding: 40px 20px;
  overflow-y: auto;
}

.project-modal.open {
  display: flex;
}

.project-modal-content {
  background: var(--color-surface);
  border-radius: var(--radius);
  max-width: 880px;
  width: 100%;
  padding: 36px;
  position: relative;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
}

.project-modal-close:hover {
  color: var(--color-text);
}

.modal-meta-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
  color: var(--color-text);
  font-size: 0.92rem;
}

.modal-meta-row strong {
  color: var(--color-muted);
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  font-weight: 700;
}

.project-description {
  max-width: 760px;
  font-size: 1.05rem;
  color: var(--color-text);
}

@media (max-width: 600px) {
  .project-modal {
    padding: 0;
  }

  .project-modal-content {
    border-radius: 0;
    min-height: 100vh;
    padding: 28px 20px;
  }
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.photo-grid figure {
  margin: 0;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e9e5dd;
  aspect-ratio: 4 / 3;
}

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.photo-grid figure:hover img {
  transform: scale(1.04);
}

.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--color-muted);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,9,7,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 2px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.2);
}

@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* ---------- Contact ---------- */

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 420px;
}

.contact-card h3 { margin-bottom: 8px; }

.contact-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.contact-list li {
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
}

.contact-list li:first-child { border-top: none; }

.contact-list a {
  text-decoration: none;
  font-weight: 600;
}

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

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-dark);
  color: #a9a49a;
  padding: 40px 0;
  margin-top: 40px;
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner a {
  color: #a9a49a;
  text-decoration: none;
}

.footer-inner a:hover { color: #fff; }
