/* Design tokens: see docs/DESIGN.md */
:root {
  --bg: #ffffff;
  --gray-50: #f9f9f9;
  --gray-100: #f4f4f4;
  --gray-200: #ededed;
  --gray-300: #d4d4d4;
  --heading: #2e2e2e;
  --btn-text: #343434;
  --body: #707070;
  --secondary: #505050;
  --muted: #a0a0a0;

  --col: 480px;
  --label-w: 100px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 14px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--heading); outline-offset: 2px; border-radius: 6px; }

.mono {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 22px;
  letter-spacing: 0.26px;
  color: var(--muted);
}
.icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

.page { padding: 0 20px; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--col);
  margin: 0 auto;
  padding: 60px 0 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero > * { animation: fadeUp 0.6s var(--ease) both; }
.hero > :nth-child(2) { animation: avatarSettle 0.7s var(--ease) 0.05s both; }
.hero > :nth-child(3) { animation-delay: 0.1s; }
.hero > :nth-child(4) { animation-delay: 0.15s; }
.hero > :nth-child(5) { animation-delay: 0.2s; }
.hero > :nth-child(6) { animation-delay: 0.25s; }
.hero > :nth-child(7) { animation-delay: 0.3s; }

.clock { text-transform: uppercase; margin-bottom: 20px; font-variant-numeric: tabular-nums; }

.avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
}
.avatar--placeholder {
  display: grid; place-items: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--muted);
  font: 500 20px/1 var(--mono);
  letter-spacing: 0.5px;
}

.name {
  margin: 0;
  font-size: 20px; line-height: 34px; font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--heading);
}
.tagline { font-size: 16px; line-height: 24px; margin-top: 4px; }

.socials { display: flex; gap: 4px; margin-top: 20px; }
.socials a {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--body);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  animation: iconPop 0.5s var(--ease) both;
}
.socials a:nth-child(1) { animation-delay: 0.3s; }
.socials a:nth-child(2) { animation-delay: 0.36s; }
.socials a:nth-child(3) { animation-delay: 0.42s; }
.socials a:nth-child(4) { animation-delay: 0.48s; }
.socials a:nth-child(5) { animation-delay: 0.54s; }
.socials a:nth-child(6) { animation-delay: 0.6s; }
.socials a:hover { background: var(--gray-100); color: var(--heading); }

.contact { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.contact__or { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--bg);
  color: var(--btn-text);
  font-size: 14px; line-height: 20px; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn--primary { background: var(--gray-50); }
.btn:hover { border-color: var(--gray-300); background: var(--gray-50); transform: translateY(-1px); }
.btn__icon { width: 14px; height: 14px; color: var(--muted); }

.location { margin-top: 24px; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section {
  max-width: var(--col);
  margin: 0 auto;
  padding: 45px 0;
  animation: sectionFadeUp 0.7s var(--ease) 0.35s both;
}
.section__label {
  margin: 0 0 16px;
  font-size: 14px; line-height: 24px; font-weight: 400;
  color: var(--muted);
}

/* Desktop: label sits in the gutter to the left of the 480 column */
@media (min-width: 810px) {
  .section {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr minmax(0, var(--col)) 1fr;
  }
  .section__label {
    grid-column: 1;
    justify-self: end;
    width: var(--label-w);
    margin: 0;
    padding-right: 24px;
  }
  .section__body { grid-column: 2; }
}

.prose p + p { margin-top: 14px; }
.prose a { color: var(--secondary); font-weight: 500; transition: color 0.2s var(--ease); }
.prose a:hover { color: var(--heading); }

.stack-list { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Cards ---------- */
.card {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--bg);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
@media (hover: hover) {
  a.card:hover { background: var(--gray-50); border-color: var(--gray-300); transform: translateY(-2px); }
  .media:hover .media__thumb { filter: none; opacity: 1; }
}
.card__title { color: var(--heading); font-weight: 500; line-height: 19.6px; }
.card__desc { margin-top: 4px; line-height: 22px; }

/* Media */
.media { padding: 14px; gap: 16px; align-items: center; }
.media__thumb {
  flex: 0 0 108px; width: 108px; height: 61px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-100);
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.media__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media__thumb--empty { display: grid; place-items: center; color: var(--muted); }
.media__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.meta { font-size: 12px; line-height: 18px; text-transform: uppercase; }
.meta--count { display: flex; align-items: center; gap: 6px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gray-300); }

/* Work */
.work { padding: 20px; gap: 16px; align-items: flex-start; }
.work__tile {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--secondary);
}
.work__tile.mono { font-size: 12px; color: var(--muted); }

/* Stack */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool {
  flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 20px 12px;
  text-align: center;
  color: var(--secondary);
  font-size: 13px; line-height: 18px; font-weight: 500;
}
.tool .icon { width: 22px; height: 22px; }
/* Monogram for tools with no official simple-icons logo */
.tool__mono { display: grid; place-items: center; font-size: 11px; line-height: 1; color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--col);
  margin: 0 auto;
  padding: 45px 0 60px;
  border-top: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--muted);
  display: flex; flex-direction: column; gap: 4px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--bg);
  color: var(--btn-text);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Phone ---------- */
@media (max-width: 809px) {
  .hero { padding-top: 48px; }
  .section { padding: 32px 0; }
  .tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) {
  .media { flex-direction: column; align-items: flex-start; }
  .media__thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; flex-basis: auto; }
}

/* ---------- Motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes avatarSettle { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes iconPop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes sectionFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  a.card:hover, .btn:hover { transform: none; }
}
