@font-face {
  font-family: Kanit;
  font-weight: 100;
  font-display: swap;
  src: url("fonts/kanit-100.woff2") format("woff2");
}

@font-face {
  font-family: Kanit;
  font-weight: 200;
  font-display: swap;
  src: url("fonts/kanit-200.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  --bg: light-dark(#ffffff, #0e1116);
  --text: light-dark(#777777, #a7b0ba);
  --strong: light-dark(#555555, #e6edf3);
  --accent: light-dark(#27ae60, #3fcf8e);

  --font: Kanit, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --space: clamp(1.25rem, 5vw, 3rem);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

body {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--text);
  font: 200 1.125rem/1.7 var(--font);
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

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

::selection {
  background: var(--accent);
  color: light-dark(#ffffff, #0e1116);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--space);
}

.logo {
  font-size: clamp(1.125rem, 5vw, 1.5rem);
  font-weight: 200;
  text-decoration: none;
}

.tools {
  display: flex;
  flex-shrink: 0;
  gap: 0.25rem;
}

.icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

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

main {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2.5rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem var(--space);
  text-align: center;
}

.portrait {
  width: clamp(9rem, min(60vw, 44dvh), 28rem);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid light-dark(#e3e3e3, transparent);
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  margin: 0;
  color: var(--strong);
  font-size: min(5.2vw, 3.5rem, 9dvh);
  font-weight: 100;
  line-height: 1.15;
  white-space: nowrap;
}

.site-footer {
  padding: var(--space);
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.links a {
  display: block;
  color: var(--text);
}

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

.links svg {
  display: block;
  width: 3rem;
  height: 3rem;
}

.legal {
  align-content: start;
  width: 100%;
  max-width: 48rem;
  justify-items: start;
  gap: 0;
  text-align: left;
}

.legal h1 {
  margin-bottom: 1.5rem;
}

.legal h2 {
  margin: 2rem 0 0.5rem;
  color: var(--strong);
  font-size: 1.25rem;
  font-weight: 200;
}

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