/*
   David Elsonbaty - black & white
*/

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --faint: #e8e8e8;
  --card: #fafafa;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --ink: #f2f2f2;
    --muted: #9a9a9a;
    --faint: #1e1e1e;
    --card: #111111;
  }
}

* { 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: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
}

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

/*  Intro  */

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  animation: rise 0.8s ease both;
}

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
  animation: rise 0.8s 0.08s ease both;
}

.lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.3rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 34em;
  animation: rise 0.8s 0.16s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kicker, h1, .lede { animation: none; }
}

/*  Sections  */

section { margin-top: 6rem; }

h2 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.elsewhere { margin-top: 3.5rem; }
.elsewhere h2 { margin-bottom: 1.25rem; }

.section-note {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  margin: -1.25rem 0 2rem;
}

/*  Work pills  */

.apps { list-style: none; }

.app {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--card);
  border: 1px solid var(--faint);
  border-radius: 1.25rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.app:hover {
  border-color: var(--muted);
  transform: translateY(-1px);
}

.app img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  flex-shrink: 0;
  filter: grayscale(1);
  opacity: 0.9;
  transition: filter 0.45s ease, opacity 0.45s ease;
}

.app:hover img {
  filter: grayscale(0);
  opacity: 1;
}

.app-info { flex: 1; min-width: 0; }

.app h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.3;
}

.app p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.details {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.details:hover {
  color: var(--ink);
  border-color: var(--ink);
}

@media (max-width: 540px) {
  .app { flex-wrap: wrap; }
  .app-info { flex-basis: calc(100% - 56px - 1.1rem); }
  .details { margin-left: calc(56px + 1.1rem); }
}

/*  Graveyard  */

.graveyard .app {
  padding: 0.85rem 1.25rem;
  background: transparent;
}

.graveyard .app img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  opacity: 0.75;
}

.graveyard .app h3 { font-size: 1.05rem; }

/*  Elsewhere  */

.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.links a {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 2px;
  transition: border-color 0.25s ease;
}

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

/*  Footer  */

footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--faint);
  font-size: 0.78rem;
  color: var(--muted);
}
