:root {
  --bg: #f7f8fa;
  --surface: #fff;
  --ink: #16191f;
  --muted: #5a6370;
  --line: #e2e5ea;
  --accent: #3856d6;
  --accent-soft: #eceffc;
  --font:
    "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
  scroll-behavior: smooth;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 10;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  z-index: 20;
}
.skip:focus {
  top: 1rem;
}

header.site {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 11;
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}
nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition:
    color 0.2s,
    background 0.2s;
}
nav a:hover {
  color: var(--ink);
  background: #eceef2;
}
.icons {
  display: flex;
  gap: 0.25rem;
}
.icons a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--muted);
  transition:
    color 0.2s,
    background 0.2s;
}
.icons a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
svg.i {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.i.f {
  fill: currentColor;
  stroke: none;
}

section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
section + section {
  border-top: 1px solid var(--line);
}
h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0;
  max-width: 14ch;
}
h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
  font-weight: 700;
}
.lead {
  max-width: 34rem;
  color: var(--muted);
  margin: 1.5rem 0 0;
  font-size: 1.1875rem;
}
.hero {
  padding-top: clamp(3.5rem, 10vw, 7rem);
}
.skills {
  display: grid;
  gap: 1rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 3rem 0 0;
  padding: 0;
}
.skills div {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.skills dt {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.skills dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  line-height: 1.5;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skills dd.techs {
  gap: 0.5rem;
}
.tech {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  cursor: default;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.tech:hover,
.tech:focus-visible {
  border-color: #c5cdf3;
  color: var(--accent);
}
.tech::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.2s var(--ease);
  z-index: 5;
}
.tech:hover::after,
.tech:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.projects {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.card.open {
  border-color: #c5cdf3;
  box-shadow: 0 8px 28px -16px rgba(56, 86, 214, 0.35);
}
.card-btn {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  align-items: center;
  width: 100%;
  padding: 1.5rem 1.5rem;
  cursor: pointer;
  border-radius: 14px;
}
.card-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.card-btn h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}
.card-btn p {
  margin: 0;
  color: var(--muted);
  grid-column: 1;
}
.chev {
  grid-row: 1/3;
  grid-column: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  transition: transform 0.35s var(--ease);
}
.card.open .chev {
  transform: rotate(180deg);
}
.panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.card.open .panel {
  grid-template-rows: 1fr;
}
.panel > div {
  overflow: hidden;
  min-height: 0;
}
.panel-in {
  padding: 0 1.5rem 1.5rem;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.3s ease,
    transform 0.4s var(--ease);
}
.card.open .panel-in {
  opacity: 1;
  transform: none;
  transition-delay: 0.06s;
}
.panel ul.points {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
}
.panel li {
  margin-bottom: 0.35rem;
}
.panel .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.visit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0;
}
.visit:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.job {
  display: grid;
  gap: 1.25rem 3rem;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
}
.job .when {
  color: var(--muted);
  font-size: 0.95rem;
}
.job h3 {
  margin: 0 0 0.15rem;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}
.job .role {
  margin: 0 0 1.25rem;
  color: var(--muted);
}
.job dl {
  margin: 0;
  display: grid;
  gap: 1rem;
}
.job dt {
  font-weight: 600;
}
.job dd {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 720px) {
  nav {
    display: none;
  }
  .job {
    grid-template-columns: 1fr;
  }
  .card-btn {
    padding: 1.25rem;
  }
  .panel-in {
    padding: 0 1.25rem 1.25rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation: none !important;
  }
}
