/* Palette and masthead follow claymasterj.com (photo-showcase, web/src/styles/global.css). */

:root {
  color-scheme: dark;
  --bg: #282828;
  --fg: #ebe5d7;
  --muted: #a39d95;
  --line: rgb(235 229 215 / 0.12);
  --card: #333231;
  --accent: #83a598;
  --radius: 6px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --font: "Inter var", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Mononoki", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f6f3;
    --fg: #1a1917;
    --muted: #625f59;
    --line: rgb(26 25 23 / 0.12);
    --card: #e9e7e2;
    --accent: #55776a;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  max-width: 1440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 72px max(var(--gutter), env(safe-area-inset-left));
  overflow-x: clip;
  color: var(--fg);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* The sun behind the masthead, as a mask so it takes the theme's accent. */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -120px;
  left: -110px;
  width: 420px;
  aspect-ratio: 1;
  background: var(--accent);
  mask: url(sun.svg) center / contain no-repeat;
  opacity: 0.16;
}

.masthead {
  padding: clamp(40px, 6vw, 72px) 0 clamp(34px, 4vw, 48px);
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin-top: 8px;
  font: 0.8125rem/1.5 var(--mono);
}

.links a {
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
}

.links a:hover {
  color: var(--fg);
  text-decoration: underline;
}

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

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
  gap: 18px;
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease;
}

.project:hover {
  border-color: var(--accent);
}

.project img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project__text {
  padding: 18px 20px 20px;
}

h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.tag {
  padding: 1px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.project p {
  max-width: 58ch;
  margin: 6px 0 12px;
  color: var(--muted);
}

.domain {
  color: var(--fg);
  font: 0.8125rem/1.5 var(--mono);
}
