/* jordangadapee.com
   Layout: one centered 700px column, left-aligned text, lots of air. Eczar for the greeting only, DM Sans for
   everything else, set small and tidy. One ink, hairline cards, the dithered foothills faint behind everything.
   Theme: moon mode by default; a toggle switches to light and remembers the choice. */


@font-face { font-family: "Eczar"; src: url(/fonts/eczar-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(/fonts/dm-sans.woff2) format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  --bg: #0f0f10;
  --ink: #f2f0eb;
  --body: #c9c6bf;
  --muted: #8a877f;
  --line: #2a2927;
  --line-hover: #4a4843;
  --card: #161617;
  --field: #141415;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Eczar", "Iowan Old Style", Georgia, "Times New Roman", serif;
    /* Dithered foothills behind everything; the light theme uses the inverted, snowy version */
  --scene: url(/bg-dark.png);
  --scene-opacity: .28;
  --sheen: rgba(255,255,255,.11);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --ink: #141414;
  --body: #3a3a3a;
  --muted: #737373;
  --line: #e4e2dd;
  --line-hover: #bdbab3;
  --card: #ffffff;
  --field: #ffffff;
  --scene: url(/bg-light.png);
  --scene-opacity: .5;
  --sheen: rgba(40,48,64,.16); /* a faint cool gray, like a shower passing over the valley */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; transition: background .25s ease; }
body {
  margin: 0;
  background: transparent; /* the html element carries the color so the scene below can sit between them */
  color: var(--ink);
  position: relative;
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .25s ease, color .25s ease;
}
/* The foothills: fixed to the viewport, faint, faded out toward the top so the type stays clean */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--scene) center bottom / cover no-repeat;
  opacity: var(--scene-opacity);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, rgba(0,0,0,.7) 35%, #000 60%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, rgba(0,0,0,.7) 35%, #000 60%);
  transition: opacity .25s ease;
  /* Barely-there drift: ~1% of travel over a minute and a half, with a hair of zoom so no edge ever shows */
  transform: scale(1.06);
  animation: drift 75s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: scale(1.06) translate3d(-1.4%, 0.7%, 0); }
  to   { transform: scale(1.06) translate3d(1.4%, -0.7%, 0); }
}
/* A faint sheen that sweeps across the scene every so often, like light moving behind thin cloud */
body::after {
  content: "";
  position: fixed;
  inset: -10% -40%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, var(--sheen) 47%, var(--sheen) 53%, transparent 62%);
  animation: sheen 52s linear infinite;
  will-change: transform;
}
@keyframes sheen {
  /* starts about 10% in from the left edge and fades up so the loop never pops */
  0%   { transform: translate3d(-22%, 0, 0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate3d(45%, 0, 0); opacity: 1; }
}
a { color: inherit; text-decoration: none; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

.site {
  max-width: 700px;
  margin: 0 auto;
  padding-block: clamp(28px, 6vw, 56px) clamp(40px, 7vw, 80px);
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Top row: back link (inner pages) or nothing, plus the theme toggle */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  margin-bottom: clamp(28px, 5vw, 48px);
}
.back {
  font-size: 12.5px;
  color: var(--muted);
  transition: color .15s ease;
}
.back:hover { color: var(--ink); }
.toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.toggle:hover { color: var(--ink); border-color: var(--line-hover); transform: rotate(15deg); }
.toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.toggle svg { width: 16px; height: 16px; display: block; }
.toggle .moon { display: none; }
:root[data-theme="light"] .toggle .sun { display: none; }
:root[data-theme="light"] .toggle .moon { display: block; }

/* Intro */
.hello {
  font: 500 clamp(44px, 7.2vw, 62px)/1.08 var(--font-display);
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  text-wrap: balance;
}
.intro {
  font-size: clamp(15px, 2vw, 16px);
  line-height: 1.6;
  color: var(--body);
  max-width: 530px;
  text-wrap: pretty;
}
.intro b { font-weight: 500; color: var(--ink); }
.intro a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-hover);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease;
}
.intro a:hover { text-decoration-color: var(--ink); }

/* Icon links */
.links {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
.links a, .links .shuffle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--card);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.links a:hover, .links .shuffle:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); transform: translateY(-1px); }
.links a:focus-visible, .links .shuffle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.links .shuffle { padding: 0; cursor: pointer; font: inherit; }
.links .shuffle.spin svg { animation: spin .7s cubic-bezier(.3,.7,.2,1); }
@keyframes spin { from { transform: rotate(0) } to { transform: rotate(360deg) } }
.links svg { width: 19px; height: 19px; display: block; }
.links svg.li { width: 16px; height: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cards */
.kicker-row { margin: 56px 0 16px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: 500 10.5px/1 var(--font);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .15s ease;
}
.kicker { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .15s ease, text-decoration-color .15s ease; }
.kicker:hover { color: var(--ink); text-decoration-color: var(--line-hover); }
.kicker:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
  min-width: 0;
  position: relative;
  transition: background .3s ease, border-color .2s ease, opacity .55s ease var(--d, 0s), transform .55s ease var(--d, 0s);
}
/* On hover the card goes ~90% see-through so the foothills show through it */
.card:hover {
  border-color: var(--line-hover);
  background: color-mix(in srgb, var(--card) 10%, transparent);
}
.card:nth-child(3n+2) { --d: .07s; }
.card:nth-child(3n) { --d: .14s; }
/* Reveal on scroll: hidden only when JS is running, shown as the observer reaches each card */
.js .card { opacity: 0; transform: translateY(14px); }
.js .card.in { opacity: 1; transform: none; }
.val {
  font: 500 18px/1.2 var(--font);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.lbl {
  font-size: 12.75px;
  line-height: 1.5;
  color: var(--muted);
}

/* Footer: place on the left, copyright on the right */
.foot {
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.foot .place { display: inline-flex; align-items: center; gap: 8px; }

/* Contact / thanks / 404 pages */
.form { margin-top: 30px; display: grid; gap: 14px; max-width: 520px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--body); }
.field input, .field textarea {
  font: 16px/1.4 var(--font);
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color .15s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--line-hover); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.button {
  justify-self: start;
  font: 600 14px/1 var(--font);
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.button:hover { opacity: .85; transform: translateY(-1px); }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hidden { display: none !important; }

@media (max-width: 560px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 24px 18px 22px; border-radius: 16px; min-height: 180px; gap: 13px; }
  .card:nth-child(3n+2), .card:nth-child(3n) { --d: 0s; }
  .card:nth-child(2n) { --d: .07s; }
  .val { font-size: 17px; }
  .lbl { font-size: 12.5px; }
  .kicker-row { margin-top: 44px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .card:last-child:nth-child(odd) { grid-column: span 2; } /* no lonely half-row at the bottom */
}
@media (prefers-reduced-motion: reduce) {
  body, .links a, .card, .back, .button, .toggle, .field input, .field textarea, .intro a { transition: none; }
  .links a:hover, .button:hover, .toggle:hover { transform: none; }
  .js .card { opacity: 1; transform: none; }
  body::before { animation: none; transform: none; }
  body::after { display: none; }
}
