/* Ban Suleiman — portfolio
   Shared styles. Layout is intentionally simple: full-bleed images on project
   pages, a shelf metaphor on the home page. */

:root {
  --olive:  #4c5a1b;   /* home page background */
  --blue:   #CCD5E1;   /* panel, previous option */
  --clay:   #CE8662;   /* "ideal customer" roll-down panel */
  --brown:  #241309;   /* panel text on the clay panel */
  --ink:    #111111;
  --paper:  #ffffff;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- home ---------- */
.home { min-height: 100vh; background: var(--olive); display: flex; flex-direction: column; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(8px, 2vw, 16px);
  padding: 10px clamp(16px, 4vw, 30px);
  border-bottom: 1px solid rgba(0,0,0,0.55);
  position: sticky; top: 0; z-index: 10; background: var(--olive);
}
.site-header__name { font-size: clamp(14px,3vw,22px); letter-spacing: -0.01em; white-space: nowrap; flex-shrink: 0; }
.typewriter {
  display: flex; align-items: center; gap: 8px;
  font-size: clamp(14px,3vw,22px); letter-spacing: -0.01em;
  flex: 1 1 auto; min-width: 0; overflow: hidden; justify-content: center;
}
.typewriter__inner { display: inline-flex; align-items: baseline; height: 1.3em; line-height: 1.3em; }
.typewriter__caret {
  display: inline-block; width: 2px; height: 1em; margin-left: 2px;
  background: currentColor; transform: translateY(0.12em);
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.btn-outline {
  border: 1px solid var(--ink); padding: 9px clamp(12px,2.5vw,22px);
  font: inherit; font-size: clamp(14px,3vw,22px); line-height: 1;
  background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.shelves {
  flex: 1; display: flex; flex-direction: column; gap: 96px;
  padding: 34px clamp(18px,6vw,90px) 60px;
  max-width: 1600px; width: 100%; margin: 0 auto; position: relative;
}

/* roll-down "ideal customer" panel — clip-path animates from 0 to full height */
.panel { position: absolute; inset: 0; overflow: hidden; z-index: 5; pointer-events: none;
  clip-path: inset(0 0 100% 0); transition: clip-path 0.8s cubic-bezier(0.65,0,0.35,1); }
.panel.is-open { clip-path: inset(0 0 0 0); }
.panel__inner { height: 100%; background: var(--clay); color: var(--brown);
  display: flex; align-items: center; padding: 36px 50px; }
.panel__inner p { margin: 0; font-size: clamp(26px,5.2vw,88px); line-height: 1.2;
  letter-spacing: -0.01em; font-weight: 500; text-wrap: pretty; }
.panel__inner b { font-weight: 800; }

/* --- the shelf. DO NOT change these heights/margins: the wood illusion
       depends on the 22px receding plank + 30px front face and the rotateX. --- */
.shelf { position: relative; }
.shelf--1 { margin-top: 40px; }
.shelf--2 { margin-top: 60px; }
.shelf__items { display: flex; align-items: flex-end; justify-content: space-between; gap: clamp(12px,3vw,40px); }
.shelf__cell { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-end; }
.shelf__board { position: relative; z-index: 2; width: 97%; margin: 0 auto; }
.shelf__top {
  height: 22px;
  background-image: linear-gradient(180deg, rgba(255,244,220,0.26), rgba(110,70,35,0.10)), url('assets/wood-oak.png');
  background-size: auto, 460px auto; background-position: center, center 42%;
  background-repeat: no-repeat, repeat-x;
  box-shadow: inset 0 9px 12px rgba(70,42,15,0.22), inset 0 -1px 0 rgba(255,228,185,0.55);
  transform: perspective(800px) rotateX(52deg); transform-origin: bottom;
  border-radius: 2px 2px 0 0;
}
.shelf__face {
  height: 30px;
  background-image: linear-gradient(180deg, rgba(62,40,18,0.20), rgba(30,18,6,0.42)), url('assets/wood-oak.png');
  background-size: auto, 460px auto; background-position: center, center 58%;
  background-repeat: no-repeat, repeat-x;
  box-shadow: inset 0 2px 0 rgba(255,228,185,0.45), inset 0 -6px 9px rgba(30,18,6,0.32), 0 24px 26px rgba(0,0,0,0.26);
  border-radius: 0 0 4px 4px;
}

/* objects sitting on the shelves */
.obj-shadow { filter: drop-shadow(0 4px 2px rgba(0,0,0,0.38)) drop-shadow(-7px -5px 9px rgba(0,0,0,0.12)) drop-shadow(0 11px 12px rgba(0,0,0,0.14)); }
.obj-square { width: min(196px, 100%); aspect-ratio: 1; }
.obj-square img { width: 100%; height: 100%; object-fit: contain; }
.obj-lift { transform: translateY(8px); }
.obj-4 { transform: translateY(14px) scale(1.2); transform-origin: bottom center; }
.obj-speaker { transform: translateY(8px) scale(1.18); transform-origin: bottom center; }

/* browser-window mock (Field Notes) */
.browser { position: relative; width: min(300px, 100%); transform: translateY(8px); }
.browser__chrome { border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.12); background: #e8eaed; }
.browser__bar { height: 26px; display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.browser__lights { display: flex; gap: 5px; }
.browser__lights span { width: 9px; height: 9px; border-radius: 50%; }
.browser__url { flex: 1; height: 15px; background: #fff; border-radius: 8px;
  display: flex; align-items: center; padding: 0 8px; font-size: 8px; color: #9aa0a6; }
.browser__shot { aspect-ratio: 2000/1132; background: #000; }
.browser__shot img { width: 100%; height: 100%; object-fit: cover; }
.cursor { position: absolute; left: 52%; top: 44%; z-index: 6;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.35));
  animation: cursorFloat 5s cubic-bezier(0.45,0,0.55,1) infinite; }
@keyframes cursorFloat {
  0%   { transform: translate(0,0) rotate(0deg); }
  20%  { transform: translate(-12px,9px) rotate(-6deg); }
  45%  { transform: translate(8px,16px) rotate(3deg); }
  70%  { transform: translate(14px,5px) rotate(7deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

/* spinning vinyl, drawn in CSS */
.vinyl { width: 100%; height: 100%; border-radius: 50%; position: relative;
  animation: spin 3.5s linear infinite;
  background: repeating-radial-gradient(circle, #171717 0 1px, #0b0b0b 1px 3px); }
.vinyl__sheen { position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(125deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%, rgba(255,255,255,0) 58%, rgba(255,255,255,0.07)); }
.vinyl__glint { position: absolute; left: 50%; top: 5%; width: 2px; height: 45%;
  transform: translateX(-50%); background: linear-gradient(rgba(255,255,255,0.45), rgba(255,255,255,0)); }
.vinyl__label { position: absolute; left: 50%; top: 50%; width: 36%; height: 36%;
  transform: translate(-50%,-50%); border-radius: 50%; background: #C6DFFE;
  box-shadow: 0 0 0 4px #0b0b0b; display: flex; align-items: center; justify-content: center; }
.vinyl__hole { width: 14%; height: 14%; border-radius: 50%; background: #0b0b0b; }
.vinyl__pin { position: absolute; top: 10%; left: 50%; width: 9%; height: 9%;
  transform: translateX(-50%); border-radius: 50%; background: #0b0b0b; }
@keyframes spin { to { transform: rotate(360deg); } }

/* entrance warning dialog — Windows 98 style */
.warn {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0,0,0,0.6);
  animation: warnOverlayIn .2s ease both;
}
.warn[hidden] { display: none; }

.warn__dialog {
  width: min(440px, 92vw);
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 1px 1px 0 #000, inset 1px 1px 0 #e8e8e8;
  animation: warnIn .22s ease both;
}

.warn__titlebar {
  display: flex; align-items: center; gap: 4px;
  background: linear-gradient(90deg, #8B2200 0%, #F26522 100%);
  padding: 4px 4px 4px 7px;
  user-select: none;
}
.warn__titlebar-label {
  flex: 1;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0;
}
.warn__titlebar-close {
  width: 18px; height: 16px; flex-shrink: 0;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  font-size: 9px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  color: #000; font-weight: 900; font-family: Arial, sans-serif;
  box-shadow: inset 1px 1px 0 #e8e8e8;
}
.warn__titlebar-close:active {
  border-top-color: #404040; border-left-color: #404040;
  border-right-color: #fff; border-bottom-color: #fff;
}

.warn__eye {
  margin: 8px;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #dfdfdf;
  border-bottom: 2px solid #dfdfdf;
  background: white;
  line-height: 0;
}
.warn__eye svg { display: block; width: 100%; height: auto; }
.warn__body { padding: 14px 18px 14px; }

.warn__dialog h1 {
  display: block;
  font-family: Arial, sans-serif;
  font-weight: 700; font-size: 13px; line-height: 1.3;
  margin: 0 0 10px; color: #000; letter-spacing: 0;
}
.warn__dialog p {
  font-family: Arial, sans-serif;
  font-size: 12px; line-height: 1.6;
  margin: 0 0 6px; color: #000; padding: 0;
}

.warn__actions {
  display: flex; gap: 8px; margin-top: 16px;
  justify-content: center; border-top: none; padding: 0;
}
.warn__actions button {
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 12px; font-weight: 400;
  padding: 5px 18px; min-width: 90px;
  background: #c0c0c0; color: #000;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: inset 1px 1px 0 #e8e8e8, 1px 1px 0 #000;
  border-radius: 0; transition: none;
}
.warn__actions button:active {
  border-top-color: #404040; border-left-color: #404040;
  border-right-color: #fff; border-bottom-color: #fff;
  box-shadow: inset -1px -1px 0 #e8e8e8, 1px 1px 0 #000;
}
.warn__primary, .warn__ghost { /* both use the same Win98 raised look */ }

@keyframes warnOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes warnIn {
  0%   { opacity: 0; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- project pages ---------- */
.project { min-height: 100vh; background: var(--paper); }
.back { position: fixed; top: 38px; left: 30px; z-index: 10;
  display: inline-flex; align-items: center; justify-content: center;
  width: 108px; cursor: pointer; }
/* drawn rather than typed, so the stroke can be a hairline like the header rule.
   vector-effect on the paths pins the stroke at 1px at any rendered size. */
.back svg { width: 100%; height: auto; display: block; }
.back:hover { opacity: .6; }
.bleed { width: 100%; height: auto; }
.bleed + .bleed { margin-top: -1px; }
.project__intro { padding: 90px clamp(18px,6vw,90px) 48px; }
.project__intro p { margin: 0; max-width: none;
  font-size: clamp(22px,3vw,46px); line-height: 1.35; letter-spacing: -0.01em;
  font-weight: 500; text-align: justify; text-align-last: left;
  hyphens: none; word-spacing: -0.01em; }
@media (max-width: 640px) { .project__intro p { text-align: left; } }
.note { padding: 40px clamp(18px,6vw,90px) 80px; display: flex; align-items: flex-end;
  gap: clamp(24px,5vw,72px); flex-wrap: wrap; }
.note__num { font-size: clamp(60px,14vw,180px); line-height: 1; font-weight: 700;
  letter-spacing: -0.02em; flex-shrink: 0; }
.note p { margin: 0; flex: 1; min-width: 280px; font-size: clamp(15px,1.5vw,20px);
  line-height: 1.6; text-wrap: pretty; }
.split { display: flex; width: 100%; }
.split > div { width: 50%; }
.split .note { gap: clamp(20px,3vw,48px); }
.split .note p { min-width: 0; }
@media (max-width: 700px) {
  .split { flex-direction: column; }
  .split > div { width: 100%; }
}
