/* ————————————————————————————————
   SEIF ALI UMAAR — direction / archive
   layout language: numbered index (r-i-s-k.info)
   × quiet cargo minimalism
———————————————————————————————— */

:root {
  --bg: #f3f1ec;
  --ink: #111111;
  --ink-soft: #6b6b66;
  --line: #d8d5cd;
  --accent: #c8330a;
  --mono: "SF Mono", ui-monospace, "IBM Plex Mono", Menlo, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--bg); }

/* ————— header ————— */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.wordmark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.nav { display: flex; gap: 26px; }

.nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 2px;
}

.nav a:hover, .nav a.active { color: var(--ink); }

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--ink);
}

/* ————— main ————— */
#app { flex: 1; width: 100%; }

/* landing — fixed height, no scroll */
.landing {
  height: calc(100dvh - 118px); /* viewport minus header and footer */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
  max-width: 980px;
  overflow: hidden;
}

.landing h1 {
  font-size: clamp(34px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-transform: uppercase;
}

.landing h1 em {
  font-style: italic;
  font-weight: 400;
}

.landing .lede {
  margin-top: 28px;
  max-width: 520px;
  color: var(--ink-soft);
  font-size: 16px;
}

.landing .go {
  margin-top: 44px;
  display: flex;
  gap: 34px;
}

.landing .go a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}

.landing .go a:hover { color: var(--accent); border-color: var(--accent); }

/* ————— index list ————— */
.index-wrap { padding: 40px 24px 80px; }

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.section-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.index { list-style: none; border-top: 1px solid var(--line); }

.index li { border-bottom: 1px solid var(--line); }

.index a.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 16px 4px;
  transition: padding-left 0.18s ease;
}

.index a.row:hover { padding-left: 14px; }

.index a.row:hover .t { color: var(--accent); }

.index .no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.index .t {
  font-size: clamp(17px, 2.6vw, 26px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.index .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-align: right;
  text-transform: uppercase;
}

/* hover preview */
.hover-preview {
  position: fixed;
  pointer-events: none;
  z-index: 90;
  width: 240px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hover-preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.hover-preview img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
}

@media (hover: none) { .hover-preview { display: none; } }

/* ————— project page ————— */
.project { padding: 40px 24px 80px; }

.project .back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  display: inline-block;
  margin-bottom: 36px;
}

.project .back:hover { color: var(--accent); }

.project header.p-head {
  max-width: 900px;
  margin-bottom: 40px;
}

.project h2 {
  font-size: clamp(28px, 5vw, 56px);
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.project .p-meta {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-transform: uppercase;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.project .p-detail {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.info .roles {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.project .p-blurb {
  margin-top: 18px;
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.p-links { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; }

.p-links a {
  font-family: var(--mono);
  font-size: 12px;
  width: fit-content;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.p-links a:hover { color: var(--accent); border-color: var(--accent); }

/* uniform tile grid — 3 per row, 2 on smaller screens */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.grid figure {
  margin: 0;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #e5e2da;
  transition: transform 0.4s ease;
}

.grid figure:hover img { transform: scale(1.02); }

/* video blocks */
.videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.videos .v:first-child:nth-last-child(odd) { grid-column: 1 / -1; }

.videos video {
  width: 100%;
  max-height: 78vh;
  display: block;
  background: #0e0e0d;
}

@media (max-width: 800px) { .videos { grid-template-columns: 1fr; } }

.videos .yt { aspect-ratio: 16 / 9; }

.videos .yt iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #0e0e0d;
}

/* prev / next */
.pn {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

/* ————— lightbox ————— */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12,12,12,0.94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
}

/* ————— info ————— */
.info { padding: 12vh 24px 80px; max-width: 760px; }

.info h2 {
  font-size: clamp(26px, 4.5vw, 44px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.info p { margin-top: 22px; color: var(--ink-soft); font-size: 16px; max-width: 560px; }

.info .contact { margin-top: 40px; display: flex; flex-direction: column; gap: 8px; }

.info .contact a {
  font-family: var(--mono);
  font-size: 13px;
  width: fit-content;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

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

/* ————— footer ————— */
.site-foot {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .index a.row { grid-template-columns: 1fr; }
  .index .meta { display: none; }
  .site-head { padding: 16px; }
  .nav { gap: 16px; }
}

/* fade-in */
.fade { animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
