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

/* ── VARIABLES ── */
:root {
  --black: #1a1a1a;
  --white: #f4f2ed;
  --grey: #6b6b6b;
  --mono: "IBM Plex Mono", monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;

  --item-short: 444px;
  --item-long:  666px;
  --gap: 4px;
}

/* ── BASE ── */
body {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  margin: 0;
  padding: 0 60px;
}

a { color: var(--black); text-decoration: none; }
a:hover { background: var(--black); color: var(--white); }

/* ── HEADER ── */
header { 
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index:10;
}

.grid-item-caption { display: none; }

.header-caption {
  font-family: var(--mono);
  font-size: 0.65rem;
  line-height: 1.5;
  text-align: right;
  color: var(--black);
  white-space: nowrap;
  position: absolute;
  top: 0.75rem;
  right: 0px;
}

.site-name {
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-name a { color: inherit; text-decoration: none; }
.site-name a:hover { background: none; color: var(--grey); }

/* ── FOOTER ── */
footer {
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: var(--grey);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 2px;
}

.footer-table {
  width: 100%;
  max-width: 666px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--black);
  margin-bottom: 1rem;
}

.footer-table th {
  text-align: left;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  padding: 0.25rem 2rem 0.25rem 0;
  border-bottom: 1px solid var(--black);
}

.footer-table td {
  padding: 0.4rem 2rem 0.4rem 0;
  border-bottom: 1px solid #dddad3;
}

footer nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 20px 0 20px 0;
}
footer nav a { color: var(--black); }
footer nav a:hover { background: var(--black); color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── HOME: GRID ── */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: flex-end;
  padding: var(--gap) 0;
}

.grid-item-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.grid-item-link:hover { background: none; color: inherit; }
.grid-item-link:hover .label-title {
  background: var(--black);
  color: var(--white);
}

/* Portrait — narrow & tall */
.grid-item-link--portrait { width: var(--item-short); }
.grid-item-link--portrait .grid-item-image {
  width: var(--item-short);
  height: var(--item-long);
}

/* Landscape — wide & short */
.grid-item-link--landscape { width: var(--item-long); }
.grid-item-link--landscape .grid-item-image {
  width: var(--item-long);
  height: var(--item-short);
}

/* Image container */
.grid-item-image {
  overflow: hidden;
  background: var(--white);
  flex-shrink: 0;
  position: relative;
}
.grid-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Label */
.grid-item-label {
  padding: 0.35rem 0 0.5rem;
  font-family: var(--mono);
}
.label-title { font-size: 0.72rem; }
.label-industry { display: none; }

/* ── PROJECT PAGE ── */
.page-project {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-project header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.back-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--grey);
}
.back-link:hover { background: var(--black); color: var(--white); }

.project-layout {
  display: grid;
  grid-template-columns: 200px 1fr 160px;
  flex: 1;
}

/* Left column */
.col-left {
  padding: 1.5rem 1.25rem 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.project-title {
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}
.meta-block { display: flex; flex-direction: column; gap: 0.75rem; }
.meta-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  display: block;
  margin-bottom: 0.1rem;
}
.meta-value { font-size: 0.82rem; }
.project-desc { font-size: 0.85rem; line-height: 1.7; }

ul {
    list-style-type: none;
}

/* Centre column */
.col-centre {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--white);
  min-height: 80vh;
}
.col-centre img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

/* Right column */
.col-right { padding: 1.5rem 1rem; }
.selector-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin-bottom: 0.75rem;
  display: block;
}
.image-selector { list-style: none; }
.image-selector li { list-style: none; }
.image-selector button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--black);
  padding: 0.5rem 0;
  text-align: left;
  width: 100%;
  line-height: 1.4;
}
.image-selector button:hover,
.image-selector button.active {
  background: var(--black);
  color: var(--white);
  padding-left: 0.25rem;
}

/* ── ABOUT PAGE ── */
.about {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-image {
  width: 111px;
  height: 111px;
  overflow: hidden;
  background: #dddad3;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-bio {
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 666px;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  body { padding: 0 20px; }

  :root {
    --item-short: 140px;
    --item-long:  210px;
  }

  .project-layout { grid-template-columns: 1fr; }
  .col-left {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--black);
  }
  .col-centre { min-height: 60vw; }
  .col-right { border-top: 1px solid var(--black); }
}
