:root {
  --display: "Sagata Normal Sans", "Instrument Serif", Georgia, serif;
}
:root {
  --bg: #e6e6e4;
  --surface: #dcdcda;
  --text: #111;
  --muted: #5f5f5d;
  --line: #c4c4c2;
  --btn: #111;
  --btn-t: #f2f2f0;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --surface: #161616;
  --text: #f2f2f0;
  --muted: #9a9a98;
  --line: #2a2a2a;
  --btn: #f2f2f0;
  --btn-t: #111;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    300 18px/1.75 "DM Sans",
    system-ui,
    sans-serif;
  transition:
    background 0.25s,
    color 0.25s;
}
h1,
h2,
h3 {
  font-family: Arial, sans-serif;
  font-weight: 400;

  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.01em;
}
h1,
h2 {
  font-family: var(--display);
}
h1 {
  font-size: clamp(40px, 5.8vw, 84px);
  line-height: 1.1;
}
.nowrap {
  white-space: nowrap;
}
.hero > div {
  min-width: 0;
}
h2 {
  font-size: clamp(38px, 5.4vw, 72px);
  margin-bottom: 36px;
}
h3 {
  font-size: 34px;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.wrap {
  max-width: 1160px;
  margin: auto;
  padding: 0 28px;
}
header {
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  flex-wrap: wrap;
}
.logo {
  font:
    400 30px "Instrument Serif",
    serif;
  text-decoration: none;
}
nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 16px;
}
nav a:hover,
nav a.active {
  color: var(--text);
}
nav a.active {
  text-decoration: underline;
  text-underline-offset: 8px;
}
#theme {
  border: 1px solid var(--text);
  background: none;
  color: var(--text);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
}
.page {
  padding-top: 72px;
  padding-bottom: 96px;
  min-height: 70vh;
}
.btn {
  display: inline-block;
  background: var(--btn);
  color: var(--btn-t);
  border: 1px solid var(--btn);
  padding: 14px 30px;
  border-radius: 99px;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn.ghost {
  background: none;
  color: var(--text);
  border-color: var(--text);
}
.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 72px;
  align-items: start;
}
.hero .role {
  font-size: 22px;
  color: var(--muted);
  margin: 26px 0 0;
}
.hero .intro {
  max-width: 50ch;
  margin: 18px 0 0;
}
.portrait {
  position: relative;
  max-width: 440px;
  width: 100%;
  margin: 0 0 0 auto;
}
.portrait::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--text);
  border-radius: 50%;
  transform: translate(16px, 16px);
  z-index: 0;
}
.portrait img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  filter: grayscale(1);
  transition: filter 0.6s;
}
.portrait:hover img {
  filter: grayscale(0);
}
.portrait figcaption {
  margin-top: 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
}
.about {
  max-width: none;
}
.about p {
  margin: 0 0 18px;
}
.edu {
  margin: 34px 0;
  padding-left: 24px;
  border-left: 1px solid var(--text);
}
.edu p {
  margin: 2px 0;
  color: var(--muted);
}
.skillgroup {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.skillgroup h3 {
  font-size: 30px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips span {
  border: 1px solid var(--text);
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 16px;
}
.chips span:hover {
  background: var(--text);
  color: var(--bg);
}
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card h3 {
  font-size: 25px;
}
.card small {
  color: var(--muted);
  font-size: 13.5px;
}
.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.card a {
  margin-top: auto;
  padding-top: 6px;
  font-size: 14.5px;
  font-weight: 500;
}
footer {
  border-top: 1px solid var(--line);
  padding: 14px 0 18px;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .hero .portrait {
    order: -1;
    margin: 0 auto 16px;
    max-width: 340px;
  }
  .skillgroup {
    grid-template-columns: 1fr;
  }
  .page {
    padding-top: 48px;
    padding-bottom: 72px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.contact {
  max-width: 640px;
  margin: 0 auto;
}
.contact-wrap h2 {
  text-align: center;
}
.info {
  display: grid;
  grid-template-columns: 34px auto 1fr;
  gap: 6px 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
}
.info svg {
  width: 24px;
  height: 24px;
}
.info .val {
  text-align: right;
  color: var(--muted);
}
.info a.val {
  text-decoration: none;
}
.info a.val:hover {
  color: var(--text);
}
.circles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
  justify-content: center;
}
.circles a {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-t);
  display: grid;
  place-items: center;
  transition: transform 0.15s;
}
.circles a:hover {
  transform: translateY(-3px);
}
.circles svg {
  width: 22px;
  height: 22px;
}
@media (max-width: 980px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .projects {
    grid-template-columns: 1fr;
  }
  .info {
    grid-template-columns: 30px 1fr;
    font-size: 17px;
  }
  .info .val {
    grid-column: 2;
    text-align: left;
  }
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.page-in {
  animation: enter 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.page,
footer {
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
body.leaving .page,
body.leaving footer {
  opacity: 0;
  transform: translateY(-8px);
}
@media (prefers-reduced-motion: reduce) {
  .page-in {
    animation: none;
  }
}
.about-section {
  margin-top: 30px;
  padding-top: 82px;
  scroll-margin-top: 16px;
}
@media (max-width: 860px) {
  .about-section {
    margin-top: 80px;
    padding-top: 48px;
  }
}