/* ---------- Self-hosted DIN2014 (body font) ---------- */
@font-face{
  font-family: "DIN2014";
  src:
    url("../fonts/DIN2014.woff2") format("woff2"),
    url("../fonts/DIN2014.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

:root{
  --bg: #e8e8e8;
  --paper: #fafafa;
  --red: #b9b9b9;
  --ink: #100f0f;

  /* banner (project pages) */
  --bannerPeek: 12px;
  --bannerH: 35px;

  /* homepage knobs */
  --homePad: 30px;
  --homeGap: 30px;
  --homeLeftW: 320px;
  --homeBorder: 1px;
  --homePanelBg: #e8e8e8;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
}

/* =========================================================
   PROJECT PAGES (locked — unchanged)
   ========================================================= */

.header-wrap{
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-wrap::before{
  content:"";
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 44px;
  pointer-events: none;
}

.banner{
  background: var(--red);
  height: var(--bannerPeek);
  overflow: hidden;
  border-bottom: 1px solid #000;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  padding: 0 24px;
  transition: height 220ms ease;
}

.header-wrap:hover .banner,
.header-wrap:focus-within .banner{
  height: var(--bannerH);
}

.nav{
  height: var(--bannerH);
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link{
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
}

.nav-link:hover{ color: #ffff00; }

.split{ display: flex; }

.split-text,
.split-images{
  width: 50%;
  height: 100vh;
  overflow-y: auto;
  padding: 56px;
}

.split-text{
  background: var(--paper);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.split-text p{ margin: 0; }

.title-inline{
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 10px;
  white-space: nowrap;
}

.split-images{
  background: var(--bg);
  padding: 24px 24px;
}

.split-images img,
.split-images .media{
  width: 100%;
  height: auto;
  display: block;
  padding: 6px 0;
}

.split-text::-webkit-scrollbar,
.split-images::-webkit-scrollbar{ display: none; }

.split-text,
.split-images{
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (max-width: 900px){
  .banner{ height: var(--bannerH); }
  .header-wrap::before{ height: 0; }

  .split{ display: block; }

  .split-text,
  .split-images{
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 50px;
  }
}

/* =========================================================
   HOMEPAGE (scoped)
   ========================================================= */

body.home-page{
  background: var(--red);
  overflow: hidden;
  color: #000;
}

/* whole viewport layout */
.home-wrap{
  height: 100vh;
  width: 100vw;
  padding: var(--homePad);
  display: grid;
  grid-template-columns: var(--homeLeftW) 1fr;
  gap: var(--homeGap);
}

/* LEFT: directory panel */
.home-panel{
  position: relative; /* REQUIRED */
  background: var(--homePanelBg);
  border: var(--homeBorder) solid #000;

  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
}

/* TRUE SPECKLED / DITHERED SHADOW */
.home-panel::after{
  content: "";
  position: absolute;

  top: 7px;
  left: 7px;
  right: -7px;
  bottom: -7px;

  z-index: -1;

  background:
    radial-gradient(#000 1px, transparent 1px) 0 0 / 12px 12px,
    radial-gradient(#000 1.5px, transparent 1.6px) 1px 5px / 6px 6px;
  opacity: 1;
}



.home-list{
  overflow-y: auto;
  padding: 10px 12px;
}

.home-list::-webkit-scrollbar{ width: 10px; }
.home-list::-webkit-scrollbar-thumb{ background: #000; }
.home-list{ scrollbar-color: #000 var(--homePanelBg); }

.home-list a{
  display: block;
  text-decoration: none;
  color: #000;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 7px;
  border-bottom: 1px solid #000;
}

.home-list a:hover{ background: #fff; }

.home-contact{
  border-top: var(--homeBorder) solid #000;
  padding: 10px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.home-contact .name{
  display: inline-block;
  background: #ffff00;
  padding: 2px 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.home-contact a{
  color: #000;
  text-decoration: none;
  display: block;
  padding: 2px 0;
}

.home-contact a:hover{ text-decoration: underline; }

/* RIGHT: 2x2 images */
.home-grid{
  display: grid;
  padding: 0;
  background: transparent;
  min-height: 0;
}

.home-cell{
  background: transparent;
  overflow: hidden;
  display: flex;
}

.home-cell img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* Mobile */
@media (max-width: 900px){
  body.home-page{ overflow: auto; }

  .home-wrap{
    height: auto;
    grid-template-columns: 1fr;
  }

  .home-list{
    max-height: 55vh;
  }

  .home-grid{
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: var(--homeGap);
    margin-top: var(--homeGap);
  }

  .home-cell{ height: auto; }

  .home-cell img{
    height: auto;
    max-height: none;
  }
}
