:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --body: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #e8e8ed;
  --chip: #f5f5f7;
  --chip-text: #424245;
  --accent: #6e6e73;
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 12px 32px rgba(0, 0, 0, 0.045);
  --hover: #e9e9ee;
  --icon: #1d1d1f;
  --hairline: rgba(0, 0, 0, 0.06);
  --radius: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background: var(--bg);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --card: #1c1c1e;
  --text: #f5f5f7;
  --body: #d2d2d7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --line: rgba(255, 255, 255, 0.12);
  --chip: #2c2c2e;
  --chip-text: #f5f5f7;
  --accent: #a1a1a6;
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
  --hover: #2c2c2e;
  --icon: #f5f5f7;
  --hairline: rgba(255, 255, 255, 0.1);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

button,
a {
  font-family: inherit;
}

::selection {
  background: #d2d2d7;
  color: var(--text);
}

html[data-theme="dark"] ::selection {
  background: #3a3a3c;
  color: #f5f5f7;
}

.page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin: 0 6px 22px;
}

.top-link {
  color: var(--icon);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  text-decoration: none;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.top-link svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .sun {
  display: block;
}

.top-link:hover {
  color: var(--text);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.hero {
  padding: 32px 32px 26px;
}

.hero-top {
  display: grid;
  grid-template-columns: 1fr 186px;
  gap: 28px;
  align-items: center;
  padding-right: 64px;
}

h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15.5px;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.location svg,
.place svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.bio {
  margin: 14px 0 0;
  max-width: 58ch;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.6;
}

.avatar {
  width: 186px;
  height: 206px;
  margin-top: 0;
  border-radius: 10px;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 22px;
  color: var(--faint);
  font-size: 13.5px;
}

.contact-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--icon);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}

.icon-btn:hover {
  background: var(--hover);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.section {
  margin-top: 56px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 6px 10px;
}

.section-head h2 {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hint {
  margin: 0;
  color: var(--faint);
  font-size: 12.5px;
}

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

.exp {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.exp-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.exp-toggle:hover {
  background: var(--hover);
}

.exp.open .exp-toggle {
  padding-bottom: 10px;
}

.glyph {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.glyph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.exp-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exp-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.org {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-text);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.exp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.sep {
  color: var(--faint);
}

.chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex: none;
  color: var(--faint);
  transition: transform 0.55s var(--ease);
}

.exp.open .chevron {
  transform: rotate(180deg);
}

.exp-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}

.exp.open .exp-panel {
  grid-template-rows: 1fr;
}

.exp-panel-inner {
  overflow: hidden;
}

.exp-panel p {
  margin: 0 18px 16px 76px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}

.edu {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px;
}

.edu-copy {
  min-width: 0;
  flex: 1;
}

.edu-degree {
  margin: 3px 0 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.edu-faculty {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.edu .date-pill {
  margin-top: 2px;
  padding: 6px 10px;
  font-size: 12px;
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.lead {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 14px;
  min-height: 100%;
}

.lead-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lead h3 {
  margin: 16px 0 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.role {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.lead-body {
  margin: 12px 0 0;
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.6;
}

.place {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.skills {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.05fr;
  gap: 28px;
  padding: 26px 28px 28px;
}

.skill-col h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span,
.langs li {
  background: var(--chip);
  color: var(--chip-text);
  border-radius: 999px;
  font-size: 13px;
}

.chips span {
  padding: 6px 11px;
}

.langs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.langs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
}

.level {
  color: var(--faint);
  font-size: 12.5px;
  white-space: nowrap;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 8px 8px 12px;
  color: var(--faint);
  font-size: 12.5px;
}

.footer p {
  margin: 0;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.back-to-top:hover {
  color: var(--muted);
}

.back-to-top svg {
  width: 16px;
  height: 16px;
}

.exp-toggle:focus-visible,
.icon-btn:focus-visible,
.top-link:focus-visible,
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .page {
    width: min(840px, calc(100% - 20px));
    padding-top: 20px;
  }

  .hero {
    padding: 22px 18px 18px;
  }

  h1 {
    font-size: 30px;
  }

  .hero-top {
    grid-template-columns: 1fr 134px;
    gap: 14px;
    padding-right: 0;
  }

  .avatar {
    width: 134px;
    height: 148px;
    border-radius: 8px;
  }

  .avatar svg {
    width: 36px;
    height: 36px;
  }

  .lead-grid,
  .skills {
    grid-template-columns: 1fr;
  }

  .edu {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    position: relative;
  }

  .edu .date-pill {
    position: absolute;
    top: 16px;
    right: 14px;
    margin: 0;
  }

  .edu .exp-title {
    padding-right: 112px;
  }

  .exp-panel p {
    margin-left: 18px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .exp-panel,
  .chevron,
  .icon-btn {
    transition: none;
  }
}

html.motion .topbar,
html.motion .hero,
html.motion .section-head,
html.motion .exp,
html.motion .edu,
html.motion .lead,
html.motion .skills,
html.motion .footer {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
}

html.motion .is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

html.motion .hero .avatar img {
  transform: scale(1.04);
}

html.motion .hero.is-in .avatar img {
  transform: scale(1);
  transition: transform 1.25s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html.motion .topbar,
  html.motion .hero,
  html.motion .section-head,
  html.motion .exp,
  html.motion .edu,
  html.motion .lead,
  html.motion .skills,
  html.motion .footer,
  html.motion .hero .avatar img {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
