/* Dylan Grant — portfolio. One accent, editorial type, built to read on a phone. */

:root {
  --paper: #fbf9f6;
  --ink: #14161a;
  --muted: #4a4e55;
  --rule: #e4ded3;
  --accent: #b4471f;
  --max: 68rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:hover { color: var(--accent); }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--paper);
  padding: .5rem .75rem;
  z-index: 10;
}

/* ---------------------------------------------------------------- header */

header.site {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 1.2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
}

.mark {
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: .01em;
  text-decoration: none;
}

header.site nav {
  display: flex;
  gap: 1.4rem;
  font-size: .95rem;
}

header.site nav a {
  text-decoration: none;
  color: var(--muted);
}
header.site nav a:hover { color: var(--ink); }
header.site nav a.ext { color: var(--accent); }
header.site nav a.ext:hover { color: var(--ink); }

/* ---------------------------------------------------------------- layout */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3.4rem 0;
  border-top: 1px solid var(--rule);
}

section:first-of-type { border-top: 0; padding-top: 1.2rem; }

h2 {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2rem;
}

/* ---------------------------------------------------------------- hero */

.hero { padding-bottom: 3rem; }

.kicker span { white-space: nowrap; }
.kicker {
  text-wrap: balance;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.hero h1 {
  text-wrap: balance;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin: 0 0 1.4rem;
  max-width: 22ch;
}

.hero h1 .accent {
  color: var(--accent);
}

.lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: #2b2f35;
  max-width: 52ch;
  margin: 0 0 2rem;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin: 0;
}

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: .72rem 1.15rem;
  border-radius: 3px;
  font-size: .95rem;
}
.button:hover { background: var(--accent); color: var(--paper); }

.quiet { color: var(--muted); font-size: .95rem; }
a.quiet:hover { color: var(--accent); }

/* the secondary call to action has to read as a link, not as a caption */
.more {
  color: var(--accent);
  font-size: .95rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.more:hover { color: var(--ink); }

/* ---------------------------------------------------------------- work */

.work {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 2rem;
  padding-top: 1.9rem;
  padding-bottom: 1.9rem;
}

.work li + li { border-top: 1px solid var(--rule); }

.year {
  font-variant-numeric: tabular-nums;
  font-size: .85rem;
  color: var(--muted);
  padding-top: .35rem;
}

.work h3 {
  text-wrap: balance;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 .55rem;
  max-width: 34ch;
}

.work p {
  margin: 0 0 .6rem;
  max-width: 62ch;
  color: #2b2f35;
}

.tags {
  font-size: .85rem;
  letter-spacing: .05em;
  color: var(--muted);
}

/* ---------------------------------------------------------------- about */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.2rem 2.6rem;
}

.about-grid p { margin: 0; max-width: 46ch; color: #2b2f35; }

/* ---------------------------------------------------------------- contact */

.big-link {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .1rem;
}
.big-link:hover { border-color: var(--accent); }

.contact-line { margin: 0 0 1.4rem; }

/* ---------------------------------------------------------------- footer */

footer.site {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 2.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  font-size: .85rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- phone */

@media (max-width: 640px) {
  body { font-size: 1rem; }
  header.site { padding: 1.1rem 1.1rem .9rem; flex-direction: column; align-items: flex-start; gap: .55rem; }
  header.site nav { gap: 1.1rem; font-size: .85rem; width: 100%; }
  main { padding: 0 1.1rem; }
  section { padding: 2.4rem 0; }
  .hero h1 { max-width: none; }
  .work li { grid-template-columns: 1fr; gap: .35rem; padding: 1.5rem 0; }
  .year { padding-top: 0; }
  .work h3 { font-size: 1.25rem; }
  footer.site { padding: 1.2rem 1.1rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  header.site nav, .hero-links, footer.site { display: none; }
  body { background: #fff; color: var(--ink); }
}

/* ---------------------------------------------------------------- new blocks */

.aside {
  margin: 1.8rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .95rem;
  max-width: 64ch;
}

.creds { list-style: none; margin: 0; padding: 0; }
.creds li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 2rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
  border-top: 1px solid var(--rule);
  font-size: .95rem;
  color: #2b2f35;
}
.creds li:first-child { border-top: 0; padding-top: 0; }
.creds li span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }

@media (max-width: 640px) {
  .creds li { grid-template-columns: 1fr; gap: .2rem; padding: .7rem 0; }
}

.aside-small {
  margin: .9rem 0 0;
  color: var(--muted);
  font-size: .85rem;
  max-width: 58ch;
}
