/* Ahmed's portfolio (templates/ahmed.html): a 90s desktop. Grey paper, hard black shadows, one red,
   one pixel font, and a DOS prompt. Hand-written; not part of the Tailwind build. */
:root {
  --paper: #ededed;
  --ink: #0a0a0a;
  --white: #fff;
  --red: #c8281e;
  --dim: #8a8a8a;
  --edge: 3px;
}

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

html { background: var(--paper); }

body {
  min-height: 100vh;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: none;
}

a { color: inherit; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* The pointer: a 90s arrow, and the hand over anything that can be clicked */
html { cursor: url(../img/retro-arrow.png) 0 0, default; }
a, button, summary, .btn { cursor: url(../img/retro-hand.png) 10 0, pointer; }

/* Menu bar: titles drop a menu down when clicked, as on an old Mac */
.menubar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: stretch; gap: 0.25rem;
  padding: 0 0.75rem;
  background: var(--white);
  border-bottom: var(--edge) solid var(--ink);
}
.menu { position: relative; }
.menu > summary, .menubar > a {
  display: block; padding: 0.15rem 0.7rem;
  list-style: none; text-decoration: none; user-select: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary, .menu > summary:hover, .menubar > a:hover { background: var(--ink); color: var(--white); }
.menu-list {
  position: absolute; left: 0; top: 100%;
  min-width: 15rem; padding: 0.25rem 0;
  list-style: none;
  background: var(--white);
  border: var(--edge) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.menu-list a { display: flex; justify-content: space-between; gap: 2rem; padding: 0.05rem 1rem; text-decoration: none; white-space: nowrap; }
.menu-list a:hover, .menu-list a:focus-visible { background: var(--ink); color: var(--white); outline: 0; }
.menu-list .rule { margin: 0.25rem 0; border-top: 2px dotted var(--dim); }

/* The clock, top right: hands are turned by the script, and read ten past ten without it */
.clock { margin-left: auto; align-self: center; width: 1.75rem; height: 1.75rem; flex: none; }
.clock circle { fill: var(--white); stroke: var(--ink); stroke-width: 2.5; }
.clock line { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: square; }
.clock .tick { stroke-width: 2; }

/* Desktop: the prompt across the top, the small files in a row under it */
.desktop {
  max-width: 76rem; margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid; gap: 2.25rem;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}
.win.term { grid-column: 1 / -1; }
.win { scroll-margin-top: 4rem; }

/* Windows */
.win {
  display: flex; flex-direction: column;
  background: var(--white);
  border: var(--edge) solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}
.win-title {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-bottom: var(--edge) solid var(--ink);
}
.win-title h2 { font-size: 1.5rem; font-weight: 400; white-space: nowrap; }
.win-box { width: 1.1rem; height: 1.1rem; flex: none; border: 2px solid var(--ink); }
/* The ruled stripes that fill the rest of a title bar */
.win-title::after {
  content: ""; flex: 1; height: 1.05rem;
  background: repeating-linear-gradient(var(--ink) 0 2px, transparent 2px 5px);
}
.win-body { flex: 1; padding: 1.5rem 1.6rem 1.6rem; }

/* The prompt */
.term .win-body { background: var(--ink); color: #e6e6e6; padding: 1.4rem 1.6rem 1.8rem; }
.term p { min-height: 1.15em; }
.banner { font: inherit; line-height: 0.72; color: #ff4b3e; overflow: hidden; font-size: clamp(1.1rem, 4.4vw, 1.9rem); margin: 0.3rem 0 1.4rem; }
.term h1 {
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  font-weight: 400; line-height: 0.95;
  color: var(--white);
  margin: 0.5rem 0 1.4rem;
}
.term .big { font-size: 2.2rem; color: var(--white); margin: 0.3rem 0 1.1rem; }
.term .dim { color: var(--dim); }
.ps { color: var(--dim); margin-right: 0.15em; }
.red { color: var(--red); }
.term .red { color: #ff4b3e; }
.inv { background: #ff4b3e; color: var(--ink); }

.prompt { display: flex; align-items: baseline; }
.prompt input {
  flex: 1; min-width: 0;
  font: inherit; color: var(--white);
  background: transparent; border: 0; outline: 0;
  caret-color: #ff4b3e; caret-shape: block;
  text-transform: uppercase;
}
.prompt input::placeholder { color: #555; }
[data-out] p { white-space: pre-wrap; }
[data-out] a, .term .big a { color: #ff4b3e; }
.term .ids { font-size: 1.75rem; margin: -0.6rem 0 1.1rem; }

/* Lines are typed out one by one when the script is running (it sets .boot on <html>) */
.boot [data-line] { visibility: hidden; }
.boot [data-line].on { visibility: visible; }

/* Numbered lines, as in a text editor */
.lines { list-style: none; counter-reset: line; }
.lines li { counter-increment: line; display: flex; gap: 1rem; padding: 0.3rem 0; }
.lines li::before { content: counter(line); color: var(--dim); font-size: 1.1rem; align-self: center; width: 0.8rem; }
.lines .in { padding-left: 1.6rem; }
.lines .in::before { margin-left: -1.6rem; }
.lines strong { font-weight: 400; font-size: 1.75rem; overflow-wrap: anywhere; }

/* Buttons */
.buttons { margin-top: 1.4rem; }
.btn {
  display: inline-block; padding: 0.1rem 0.8rem;
  font-size: 1.75rem; letter-spacing: 0.05em; text-decoration: none;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}
.btn-red { background: var(--red); color: var(--white); }
.btn:hover { background: var(--ink); color: var(--white); }
.btn:active { transform: translate(5px, 5px); box-shadow: none; }

/* ahmed.bmp: the photo, reduced to black and white */
.photo .win-body { padding: 0; }
.photo img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.6); image-rendering: pixelated; }

@media (max-width: 52rem) {
  body { font-size: 1.3rem; }
  .desktop { grid-template-columns: 1fr; padding: 1.5rem 1rem 3rem; gap: 1.75rem; }
  .win { box-shadow: 6px 6px 0 var(--ink); }
  .menubar { padding-inline: 0.25rem; }
}
