/* awalkley.com — portfolio styles */

:root {
  --bg: #0f1115;
  --bg-alt: #161922;
  --fg: #e8eaed;
  --fg-muted: #9aa3af;
  --accent: #6ea8fe;
  --border: #262b36;
  --measure: 68ch;
  --radius: 10px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f6f7f9;
    --fg: #14171c;
    --fg-muted: #5b6472;
    --accent: #1a5fd0;
    --border: #e2e5ea;
  }
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Header / nav */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav__brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}

.nav__brand span {
  color: var(--fg-muted);
  font-weight: 400;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--fg);
}

/* Hero */

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 1.25rem 4rem;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 20ch;
}

.hero__lede {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  border-color: var(--border);
  color: var(--fg);
}

/* Sections */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.section--alt {
  max-width: none;
  background: var(--bg-alt);
}

.section--alt > * {
  max-width: 1100px;
  margin-inline: auto;
}

.section__title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
}

.prose {
  max-width: var(--measure);
  color: var(--fg-muted);
}

.prose p {
  margin: 0 0 1rem;
}

/* Project cards */

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg-alt);
}

.card__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.card__title a {
  color: var(--fg);
  text-decoration: none;
}

.card__title a:hover,
.card__title a:focus-visible {
  color: var(--accent);
}

.card__meta {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.card__body {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--fg-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-muted);
}

/* Work grid */

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.work {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  background: var(--bg-alt);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.work:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.work__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.work__title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.work__title a {
  color: var(--fg);
  text-decoration: none;
}

/* Stretched link: whole card is clickable, but only the title is a link
   for screen readers and keyboard focus. */
.work__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.work__status {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.work__status--live {
  border-color: var(--accent);
  color: var(--accent);
}

.work__tagline {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.97rem;
  flex: 1;
}

.work__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.work__stack li {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

.work__stats {
  display: flex;
  gap: 1.25rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* Project detail pages */

.project {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.project__crumb {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.project__crumb a {
  color: var(--fg-muted);
  text-decoration: none;
}

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

.project__title {
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.project__tagline {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 55ch;
  margin: 0 0 2rem;
}

.project__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 2.5rem;
}

.project__section {
  margin: 0 0 2.75rem;
  max-width: var(--measure);
}

.project__section h2 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}

.project__section p {
  color: var(--fg-muted);
  margin: 0 0 1rem;
}

.project__section--caveat {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
}

.stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  margin: 0 0 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat__value {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--fg-muted);
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 0.9rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.details {
  display: grid;
  gap: 1rem;
}

.detail {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  background: var(--bg-alt);
}

.detail h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.detail p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--fg-muted);
}

.caveats {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.caveats li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
}

.caveats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.attribution {
  font-size: 0.85rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  max-width: var(--measure);
}

/* Contact */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

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