/* ── Tokens ── */
:root {
  --bg:        #f5f0e8;
  --ink:       #1a1a1a;
  --soft:      #e8e2d6;
  --line:      #c8bfb0;
  --block:     #ffffff;

  --lime:      #a3e635;
  --mint:      #34d399;
  --magenta:   #e879f9;

  --font-brand: 'Permanent Marker', cursive;
  --font-body:  'Space Grotesk', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  padding: 3rem 2rem 2rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.logo {
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--ink);
  letter-spacing: -1px;
}

.tagline {
  margin-top: 0.75rem;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: #555;
  font-weight: 400;
}

/* ── Main ── */
main {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* ── Cards ── */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--block);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card-title {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  color: var(--ink);
}

.card-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
  flex: 1;
}

.card-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--lime);
  padding-bottom: 1px;
  width: fit-content;
  transition: color 0.15s, border-color 0.15s;
}

.card-link:hover {
  color: #3a7c00;
  border-color: var(--mint);
}

/* ── Card soon ── */
.card--soon {
  border-style: dashed;
  background: var(--soft);
  opacity: 0.7;
}

.card--soon .card-title {
  color: #888;
}

/* ── Footer ── */
footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8rem;
  color: #999;
}

/* ── Card clickable (lightbox) ── */
.card[data-mode="lightbox"] {
  cursor: pointer;
}

.card-action {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--lime);
  padding-bottom: 1px;
  width: fit-content;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.15s, border-color 0.15s;
}

.card-action:hover {
  color: #3a7c00;
  border-color: var(--mint);
}

/* ── Lightbox overlay ── */
@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

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

.lightbox__img {
  max-width: 90%;
  max-height: 65vh;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.4);
  animation: lightbox-in 0.2s ease-out;
}

.lightbox__close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.lightbox__close:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 480px) {
  header { padding: 2rem 1.25rem 1.5rem; }
  main   { padding: 2rem 1.25rem; }
  .projects { grid-template-columns: 1fr; }
}
