/* ---------------------------------------------------------------
   Adrian Morris — adrianrmorris.com
   Warm off-white / charcoal. No JavaScript.
   --------------------------------------------------------------- */

@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2122, U+2190-2193;
}

:root {
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --bg:      #faf7f2;
  --surface: #fffdf9;
  --ink:     #2b2926;
  --muted:   #6f6a62;
  --faint:   #948d83;
  --rule:    #e7e0d5;
  --accent:  #8a5a3c;
  --ring:    rgba(138, 90, 60, 0.35);
  --shadow:  0 1px 2px rgba(43, 41, 38, 0.04),
             0 8px 28px rgba(43, 41, 38, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #1a1917;
    --surface: #211f1c;
    --ink:     #ece7df;
    --muted:   #a09a90;
    --faint:   #837c72;
    --rule:    #332f2b;
    --accent:  #d99b6c;
    --ring:    rgba(217, 155, 108, 0.35);
    --shadow:  none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Layout ---------------------------------------------------- */

.page {
  width: min(100% - 2.5rem, 33rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 12vh, 6.5rem) 3rem;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* --- Intro ----------------------------------------------------- */

.portrait {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule), var(--shadow);
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 9vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 1.5rem 0 0;
}

.role {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 26rem;
}

/* --- About ----------------------------------------------------- */

.about {
  margin-top: 2.25rem;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.about p { margin: 0 0 0.9rem; }
.about p:last-child { margin-bottom: 0; }

/* --- Links ----------------------------------------------------- */

.links {
  margin-top: 2.75rem;
  border-top: 1px solid var(--rule);
}

.links a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0.25rem 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.link-name {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  /* Side by side, the name holds one line and the note yields instead. */
  flex: none;
  white-space: nowrap;
}

/* The arrow sits outside the flow so nothing shifts on hover. */
.link-name::after {
  content: "\2192";
  position: absolute;
  margin-left: 0.4em;
  opacity: 0;
  transform: translateX(-0.25rem);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.link-note {
  margin-left: auto;
  color: var(--faint);
  font-size: 0.875rem;
  text-align: right;
}

@media (hover: hover) {
  .links a:hover { color: var(--accent); padding-left: 0.35rem; }
  .links a:hover .link-name::after { opacity: 1; transform: none; }
  .links a:hover .link-note { color: var(--muted); }
}

/* --- Footer ---------------------------------------------------- */

.foot {
  margin-top: 2.5rem;
  color: var(--faint);
  font-size: 0.875rem;
}

.foot p { margin: 0; }

.foot a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.foot a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* --- Focus & motion -------------------------------------------- */

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- Narrow screens -------------------------------------------- */

/* The column caps at 33rem, so above ~36rem the widest row is known to fit
   on one line. Below that, stack rather than let both columns wrap. */
@media (max-width: 36rem) {
  .links a { flex-direction: column; gap: 0.15rem; align-items: flex-start; }
  .link-name { white-space: normal; }
  .link-note { margin-left: 0; text-align: left; }
}
