:root {
  --bg: #121210;
  --surface: #171715;
  --line: #2a2926;
  --ink: #f5f3ee;
  --body: #b5b0a8;
  --muted: #8f8a82;
  --accent: #7eb2dd;
  --accent-soft: #445e93;
  --tag: #1f1e1b;
  --kyogre: #7eb2dd;
  --pad: clamp(24px, 5vw, 64px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent); color: var(--bg); }

h1, h2, h3, p, ul, dl, dd { margin: 0; }

/* links */

.link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding-bottom: 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}

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

/* links inside running text shouldn't push the line height around */
p .link { display: inline; padding-bottom: 0; }
p .link svg { margin-left: 2px; vertical-align: -1px; }

.link svg,
.hero-hint svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

/* hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr minmax(240px, 340px);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(72px, 10vh, 120px) var(--pad);
}

.hero-name {
  margin-bottom: 22px;
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
}

.hero-text .hero-hello {
  color: var(--ink);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
  font-size: 14px;
}

.hero-photo {
  margin: 0;
  overflow: hidden;
  background: var(--tag);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 85%;
}

.hero-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
  animation: nudge 2s ease-in-out 1.2s 3;
}

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

@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 5px); }
}

/* sections */

section { border-top: 1px solid var(--line); }

.mast {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) var(--pad) 28px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.card { border-top: 1px solid var(--line); }

.inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 60px) var(--pad);
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(48px, 7vw, 80px);
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.25;
  transition: color .3s ease;
}

.hero-text p,
.desc p,
.project-desc {
  max-width: 68ch;
  margin-bottom: 14px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.8;
}

.desc p:last-child { margin-bottom: 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 12px;
  background: color-mix(in srgb, var(--accent-soft) 16%, var(--tag));
  border: 1px solid color-mix(in srgb, var(--accent-soft) 40%, var(--line));
  border-radius: 6px;
  color: var(--body);
  font-size: 12.5px;
}

/* cards */

.card { transition: background .3s ease; }

@media (hover: hover) {
  .card:hover { background: var(--surface); }
  .card:hover h3 { color: var(--accent); }
}

.card-inner {
  display: grid;
  grid-template-columns: .9fr 1fr 1.3fr;
  gap: clamp(24px, 4vw, 56px);
}

.tagline {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.period {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.props {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px 14px;
  align-content: start;
  align-items: baseline;
}

.props dt { color: var(--muted); font-size: 12px; }

.props dd { font-size: 13px; font-weight: 500; line-height: 1.5; }

/* projects */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .3s ease;
}

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-head .tagline { margin-bottom: 0; }

.project-head .link { flex-shrink: 0; font-size: 13px; }

.project-desc { flex: 1; margin-bottom: 0; }

.project .tags { margin-top: 0; }

@media (hover: hover) {
  .project:hover { border-color: var(--accent-soft); }
  .project:hover h3 { color: var(--accent); }
}

/* outside of work */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tile {
  padding: 22px;
  background: color-mix(in srgb, var(--accent-soft) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent-soft) 30%, var(--line));
  border-radius: 14px;
}

.tile h3 { color: var(--accent); font-size: 15px; }

.tile p {
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.7;
}

.footer {
  padding: clamp(48px, 7vw, 80px) 24px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.kyogre {
  width: 112px;
  aspect-ratio: 480 / 316;
  margin: 0 auto 20px;
  background: var(--kyogre);
  -webkit-mask: url(kyogre.png) center / contain no-repeat;
  mask: url(kyogre.png) center / contain no-repeat;
}

.signoff blockquote { margin: 0; }

.signoff blockquote p {
  max-width: 44ch;
  margin: 0 auto 8px;
  color: var(--body);
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.7;
}

.signoff cite { font-style: normal; }

.footer-site { margin-top: clamp(40px, 6vw, 64px); }

@media (max-width: 900px) {
  .card-inner { grid-template-columns: 1fr; gap: 22px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { max-width: 320px; }
  .project-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; }
  .project { padding: 22px; }
}

/* the scroll hint would sit on top of the hero content when space is tight */
@media (max-width: 900px), (max-height: 820px) {
  .hero-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-hint { animation: none; }
}
