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

:root {
  --crust: #11111b;
  --mantle: #181825;
  --base: #1e1e2e;
  --surface0: #313244;
  --surface1: #45475a;
  --overlay0: #6c7086;
  --overlay1: #7f849c;
  --subtext0: #a6adc8;
  --subtext1: #bac2de;
  --text: #cdd6f4;
  --mauve: #cba6f7;
  --pink: #f5c2e7;
  --mauve-dim: rgba(203, 166, 247, 0.15);
}

::selection {
  background: rgba(203, 166, 247, 0.2);
  color: var(--text);
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--surface1) var(--crust);
}

body {
  background: var(--crust);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a {
  color: var(--mauve);
  text-decoration: none;
  transition: color 0.2s;
}

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

a:focus-visible {
  outline: 2px solid var(--mauve);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- layout ---- */

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 2rem 0;
}

/* ---- hero ---- */

.hero {
  margin-bottom: 5rem;
}

.name {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
}

.role {
  font-size: 0.95rem;
  color: var(--overlay1);
  margin-top: 0.4rem;
}

.role span {
  color: var(--subtext0);
}

.tagline {
  font-size: 0.9rem;
  color: var(--overlay0);
  margin-top: 1.25rem;
  line-height: 1.7;
  max-width: 480px;
}

.socials {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  list-style: none;
}

.socials a {
  color: var(--overlay0);
  transition: color 0.2s;
}

.socials a:hover {
  color: var(--text);
}

.socials svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ---- sections ---- */

section {
  margin-bottom: 4.5rem;
}

section:last-child {
  margin-bottom: 0;
}

.section-heading {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--overlay0);
  margin-bottom: 1.75rem;
}

/* ---- about ---- */

.about p {
  color: var(--subtext0);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about p:last-child {
  margin-bottom: 0;
}

.hl {
  color: var(--text);
  font-weight: 400;
}

/* ---- experience ---- */

.exp-org {
  border-left: 2px solid var(--surface0);
  padding-left: 1.25rem;
}

.exp-org-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.exp-org-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--mauve);
}

.exp-roles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
}

.exp-role {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  border-left: 2px solid var(--surface0);
  transition: border-color 0.25s, background 0.25s;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.exp-role:hover,
.exp-role.active {
  border-left-color: var(--mauve);
  background: var(--mauve-dim);
}

.exp-role-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.exp-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.exp-date {
  font-size: 0.72rem;
  color: var(--overlay0);
  white-space: nowrap;
}

.exp-desc {
  font-size: 0.84rem;
  color: var(--overlay1);
  line-height: 1.7;
  margin-top: 0.4rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.tag {
  font-size: 0.65rem;
  color: var(--mauve);
  background: var(--mauve-dim);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* ---- contact ---- */

.contact-text {
  font-size: 0.92rem;
  color: var(--subtext0);
  line-height: 1.8;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--mauve);
  margin-top: 1.25rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.email-link:hover {
  border-bottom-color: var(--mauve);
}

.email-link svg {
  width: 14px;
  height: 14px;
}

/* ---- footer ---- */

footer {
  padding-bottom: 2rem;
}

/* ---- reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- responsive ---- */

@media (max-width: 480px) {
  .container {
    padding: 3rem 1.5rem 0;
  }

  .exp-org-header,
  .exp-role-header {
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
