/* =======================================
   BASE / RESET
   ======================================= */

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

html, body {
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --ink: #0d0d0d;
  --muted: #666666;
  --line: #e5e5e5;
  --accent: #c3392b;

  --mono: 'IBM Plex Mono','Courier Prime',ui-monospace,monospace;
  --frame: clamp(16px, 3.5vw, 40px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.6;
}

/* =======================================
   ASCII-STYLE HEADER (used on index + projects)
   ======================================= */

.site-header-ascii {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.ascii-banner {
  font-family: "JetBrains Mono", var(--mono);
  font-size: 18px;
  line-height: 1.2;
  padding: 14px 22px;
  color: var(--ink);
  background: #f9f9f9;

  border: 1px solid var(--ink);
  box-shadow:
    0 0 0 3px #f9f9f9,
    0 0 0 4px var(--ink);
  border-radius: 4px;

  display: inline-block;
}

/* =======================================
   NAVIGATION
   ======================================= */

.top-nav {
  display: flex;
  gap: 16px;
  max-width: 1180px;
  padding: 12px var(--frame) 6px;
  margin: 0 auto;
}

.nav-link {
  text-decoration: none;
  color: #222;
  opacity: 0.8;
  font-size: 14px;
}

.nav-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* =======================================
   INDEX GRID
   ======================================= */

#app {
  padding: 24px var(--frame) 40px;
}

.grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* =======================================
   PROJECT CARDS (index)
   ======================================= */

.card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;

  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    border-color 0.12s ease-out;
}

/* ✅ fixed height slot so all cards are equal height */
.card img {
  width: 100%;
  height: 220px;          /* <-- this makes all three cards identical height */
  object-fit: cover;      /* crops nicely to fit */
  object-position: center;
  display: block;
}

.card-meta {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  min-height: 44px;       /* optional: keeps meta area consistent */
  align-items: center;
}

.card-meta span:first-child {
  font-weight: 500;
}

.card-meta span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #d0d0d0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* =======================================
   PROJECT PAGE LAYOUT (projects/*.html)
   ======================================= */

main {
  padding: 18px var(--frame) 56px;
}

.project {
  max-width: 820px;
  margin: 0 auto;
}

.project h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

/* one-line “materials … dimensions …” style */
.submeta {
  font-size: 13px;
  color: var(--ink);
  opacity: 0.9;
  margin-bottom: 14px;
}

.submeta .label {
  color: var(--muted);
  margin-right: 6px;
}

.submeta .spacer {
  display: inline-block;
  width: 12px;
}

/* project text */
.body {
  font-size: 14px;
  color: var(--ink);
  margin-top: 12px;
}

.body p {
  margin: 0 0 14px;
}

/* =======================================
   PROJECT CAROUSEL
   Small contained images, centered arrows, NO fade
   ======================================= */

.carousel {
  position: relative;
  margin: 14px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.carousel .viewport {
  overflow: hidden;
}

.carousel .track {
  display: flex;
  transition: transform 0.25s ease-out;
  will-change: transform;
}

.carousel .slide {
  min-width: 100%;
  display: grid;
  place-items: center;
  background: #fff;
  padding: 28px; /* airy white frame like the example */
}

/* ✅ don't let the image fill the width */
.carousel .slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 520px;     /* tune if you want smaller: 420–480 */
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

/* ✅ arrows centered vertically and no gradient */
.carousel .nav {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  pointer-events: none;
  background: none;       /* ✅ no ugly fade */
}

.carousel .btn {
  pointer-events: auto;
  border: 1px solid var(--line);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 18px;
  display: grid;
  place-items: center;
  opacity: 0.75;
}

.carousel .btn:hover {
  opacity: 1;
}

/* dots */
.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 10px 0 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d8d8d8;
  display: inline-block;
  cursor: pointer;
}

.dot.is-active {
  background: #999;
}

/* =======================================
   LIGHTBOX (project pages)
   ======================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.85);
}

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

.lightbox__img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}

.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #e5e5e5;
  background: #ffffffcc;
  backdrop-filter: blur(2px);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 18px;
}

.lightbox__btn:hover {
  background: #fff;
}

.lightbox__prev { left: 22px; }
.lightbox__next { right: 22px; }

.lightbox__close {
  top: 18px;
  right: 18px;
  transform: none;
  width: 34px;
  height: 34px;
}

/* =======================================
   FOOTER
   ======================================= */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 12px var(--frame) 18px;
  font-size: 12px;
  color: var(--muted);
}

.site-footer .copy {
  max-width: 1180px;
  margin: 0 auto;
}

/* =======================================
   RESPONSIVE
   ======================================= */

@media (max-width: 600px) {
  .ascii-banner {
    font-size: 16px;
    padding: 12px 18px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card img {
    height: 200px;
  }
}

@media (max-width: 560px) {
  .lightbox__btn { width: 36px; height: 36px; }
  .lightbox__prev { left: 12px; }
  .lightbox__next { right: 12px; }
}


/* =======================================
   ABOUT PAGE
   ======================================= */

.about {
  max-width: 1180px;
  margin: 0 auto;
}

.about h2 {
  max-width: 820px;
  margin: 0 auto 16px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr; /* text wider than photo */
  gap: 28px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

/* text column */
.about .copy {
  max-width: 820px;
}

.about .copy p {
  margin: 0 0 14px;
  font-size: 14px;
}

/* make the first line feel like a “lead” */
.about .copy p:first-child {
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* photo column */
.about-photo {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

/* keeps portrait looking clean and consistent */
.about-photo img {
  width: 100%;
  height: 420px;          /* tune this */
  object-fit: cover;
  object-position: center;
  display: block;
}

/* optional subtle caption area (only shows if you add <figcaption>) */
.about-photo figcaption {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

/* Responsive: stack on mobile */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo img {
    height: 360px;
  }
}
