/* ==========================================================================
   adamdexter.net — main stylesheet
   A faithful port of the Carrd design (snapshot 2026-08-27), rewritten as
   plain CSS with self-hosted fonts and no JavaScript dependency.
   Design tokens are kept identical to the original so the migration is
   visually invisible: Staatliches (name), Source Sans Pro 200/300 (body),
   #545454 text, #D9D9D9 rules/icons, 32rem column, 18pt root scale.
   ========================================================================== */

/* ---- Fonts (self-hosted; latin subset; swap so text paints immediately) -- */
@font-face {
  font-family: "Staatliches";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Staatliches-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("../fonts/Source-Sans-Pro-200-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url("../fonts/Source-Sans-Pro-200-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/Source-Sans-Pro-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/Source-Sans-Pro-300-italic.woff2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --color-bg: #ffffff;
  --color-text: #545454;
  --color-rule: #d9d9d9;
  --color-muted: #999999;        /* icon hover (non-text) */
  --color-muted-text: #757575;   /* AA 4.6:1 on white — used for caption + footer text */
  --font-display: "Staatliches", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Source Sans Pro", "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --column: 32rem;
  --padding-horizontal: 3.375rem;
  --padding-vertical: 4.25rem;
  --spacing: 1.25rem;
}

/* ---- Reset (minimal) ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, li, figure, figcaption, hr { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

html {
  font-size: 18pt;
  -webkit-text-size-adjust: none;
  color-scheme: light only;
}
body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-wrap: break-word;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1;
  text-align: center;
}
a { color: inherit; text-decoration: underline; transition: color 0.25s ease; }
a:hover { text-decoration: none; }
a:focus-visible { outline: 2px solid var(--color-muted); outline-offset: 3px; text-decoration: none; }
em { font-style: italic; }
strong { font-weight: bolder; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- Accessibility helpers --------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--color-text);
  color: #fff;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Layout ------------------------------------------------------------- */
.wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  min-height: 100vh;
  padding: 0 3.1875rem;
  position: relative;
}
.main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 0;
  flex-shrink: 0;
  max-width: 100%;
  position: relative;
}
.inner {
  width: var(--column);
  max-width: 100%;
  position: relative;
  padding: var(--padding-vertical) var(--padding-horizontal);
}
.inner > * { margin-top: var(--spacing); margin-bottom: var(--spacing); }
.inner > :first-child { margin-top: 0 !important; }
.inner > :last-child { margin-bottom: 0 !important; }

/* ---- Name (Carrd #text01) ---------------------------------------------- */
.site-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.75em;
  line-height: 1.25;
  letter-spacing: 0.375rem;
  width: calc(100% + 0.375rem);
  text-transform: uppercase;
  color: var(--color-text);
}

/* ---- Images ------------------------------------------------------------- */
.image { display: block; line-height: 0; max-width: 100%; position: relative; }
.image .frame {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  vertical-align: top;
  width: 100%;
}
.image .frame img { width: 100%; max-width: 100%; vertical-align: top; }
.image--signature .frame { width: 15rem; }
.image--headshot .frame { width: 24.125rem; }
.image--headshot { margin-bottom: 0; }
.image figcaption {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 0.75em;
  line-height: 1.5;
  letter-spacing: 0.025rem;
  color: var(--color-muted-text);
  margin-top: 0.75rem;
}

/* ---- Tagline (Carrd #text02) ------------------------------------------- */
.tagline {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 1em;
  line-height: 1.5;
  letter-spacing: 0.05rem;
  width: calc(100% + 0.05rem);
  color: var(--color-text);
}
.tagline > * { display: block; }
.tagline > * + * { margin-top: 1rem; }

/* ---- Bio (Carrd #text03) and Now (Carrd #text04) ----------------------- */
.bio, .now {
  font-family: var(--font-body);
  font-size: 1em;
  line-height: 1.625;
  letter-spacing: 0.025rem;
  width: calc(100% + 0.025rem);
  color: var(--color-text);
}
.bio { font-weight: 300; }
.now { font-weight: 200; }
.bio p + p, .now p + p { margin-top: 1rem; }

/* ---- Dividers ----------------------------------------------------------- */
hr.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 1rem;
  width: 100%;
  position: relative;
}
hr.divider:not(:first-child) { margin-top: 0.75rem !important; }
hr.divider:not(:last-child) { margin-bottom: 0.75rem !important; }
hr.divider::before {
  content: "";
  display: block;
  width: 5rem;
  height: 1px;
  background-color: var(--color-rule);
}

/* ---- Icon links (Carrd #icons01) --------------------------------------- */
.icons { font-size: 0.875em; letter-spacing: 0; }
.icons ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.icons:not(:first-child) { margin-top: 1.75rem !important; }
.icons:not(:last-child) { margin-bottom: 1.75rem !important; }
.icons li { position: relative; }
.icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
  border-radius: 100%;
  border: solid 1px var(--color-rule);
  text-decoration: none;
  transition: border-color 0.25s ease;
}
.icons a svg {
  display: block;
  width: 60%;
  height: 60%;
  fill: var(--color-rule);
  pointer-events: none;
  transition: fill 0.25s ease;
}
.icons a:hover, .icons a:focus-visible { border-color: var(--color-muted); }
.icons a:hover svg, .icons a:focus-visible svg { fill: var(--color-muted); }
.icons .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Footer (new; quiet, carries the canonical sentence) --------------- */
.site-footer {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 0.75em;
  line-height: 1.6;
  letter-spacing: 0.025rem;
  color: var(--color-muted-text);
}
.site-footer p + p { margin-top: 0.5rem; }

/* ---- Responsive scale (identical breakpoints to the Carrd build) ------- */
@media (max-width: 1680px) { html { font-size: 13pt; } }
@media (max-width: 980px)  { html { font-size: 11pt; } }
@media (max-width: 736px) {
  :root { --padding-horizontal: 2rem; --padding-vertical: 3.5rem; --spacing: 1.25rem; }
  .site-name { letter-spacing: 0.328125rem; width: calc(100% + 0.328125rem); }
  .tagline { letter-spacing: 0.04375rem; width: calc(100% + 0.04375rem); }
  .bio, .now { letter-spacing: 0.021875rem; width: calc(100% + 0.021875rem); }
  .icons:not(:first-child) { margin-top: 1.3125rem !important; }
  .icons:not(:last-child) { margin-bottom: 1.3125rem !important; }
}
@media (max-width: 480px) { :root { --spacing: 1.09375rem; } }
@media (max-width: 360px) {
  :root { --padding-horizontal: 1.5rem; --padding-vertical: 2.625rem; --spacing: 0.9375rem; }
  .icons ul { gap: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .icons a { border-color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: var(--color-muted); }
}
