:root {
  /* Base colors */
  --color-bg: #232530;
  --color-bg-deep: #1d1f28;
  --color-bg-soft: #21232d;
  --color-surface: #272a34;
  --color-surface-muted: #1f212b;
  --color-border: #2a2d37;

  /* Text colors */
  --color-text: #cdd6e3;
  --color-text-bright: #e6edf7;
  --color-text-soft: #a7b4c2;
  --color-text-muted: #74839a;

  /* Accent colors */
  --color-accent: #729bb3;
  --color-accent-hover: #84a9bf;
  --color-warm: #b8a58a;
  --color-warm-hover: #c4a46b;

  /* Layout */
  --content-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

::selection {
  background: var(--color-accent);
  color: var(--color-bg-deep);
}

a {
  color: inherit;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.25em;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 0.35rem;
  border-radius: 0.5rem;
}

.page {
  container-type: inline-size;
  width: min(100% - 2rem, var(--content-width));
  margin: 0 auto;
  padding: 2rem 0 6rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.brand-link {
  display: inline-grid;
  width: 3.15rem;
  height: 3.15rem;
  place-items: center;
  border-radius: 999px;
  text-decoration: none;
}

.brand-link:hover {
  transform: translateY(-1px);
}

.brand-logo {
  display: block;
  width: 3.15rem;
  height: 3.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-pill {
  display: inline-flex;
  min-height: 3.15rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(39, 42, 52, 0.55);
  color: var(--color-text-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.nav-pill[aria-current='page'] {
  border-color: rgba(114, 155, 179, 0.45);
  color: var(--color-accent-hover);
}

.nav-pill-icon {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-links a {
  display: grid;
  width: 3.15rem;
  height: 3.15rem;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(39, 42, 52, 0.55);
  color: var(--color-text-soft);
}

.social-links a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.social-links svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.hero {
  margin-bottom: 4rem;
}

h1,
h2 {
  margin: 0;
  color: var(--color-text);
  line-height: 1.1;
}

h1 {
  width: 100%;
  max-width: none;
  font-size: clamp(3.4rem, 12.4cqw, 5.9rem);
  letter-spacing: -0.06em;
  line-height: 1.16;
  text-align: left;
}

h1 > span {
  white-space: nowrap;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
}

.role {
  margin: 1rem 0 0;
  padding-left: clamp(1rem, 3vw, 2.4rem);
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.section-label {
  margin: 0 0 1rem;
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro {
  margin: 1.6rem 0 0;
  color: var(--color-text-soft);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.35;
}

.description {
  margin: 1.5rem 0 0;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.cta {
  display: flex;
  width: fit-content;
  min-height: 2.45rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 2rem auto 0;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(39, 42, 52, 0.55);
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.cta:hover {
  border-color: var(--color-accent);
  background: rgba(39, 42, 52, 0.85);
  transform: translateY(-1px);
}

.cta > .cta-content {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-accent-hover);
  line-height: 1.25;
}

.cta-label,
.cta-email {
  font-weight: 600;
}

.cta-separator {
  color: var(--color-text-muted);
}

.project {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  background: linear-gradient(
    145deg,
    var(--color-surface),
    var(--color-surface-muted)
  );
  box-shadow: 0 1.5rem 4rem rgba(29, 31, 40, 0.42);
}

.project p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.project-link {
  display: inline-block;
  color: var(--color-warm);
  font-weight: 600;
  text-decoration: none;
}

.project-link:hover {
  color: var(--color-warm-hover);
  text-decoration: none;
}

@media (max-width: 520px) {
  .page {
    padding: 1.25rem 0 4rem;
  }

  .site-header {
    margin-bottom: 4rem;
  }

  .project {
    padding: 1.5rem;
  }

  h1 {
    font-size: clamp(2.35rem, 11.2cqw, 3.3rem);
    text-align: left;
  }

  h1 > span {
    white-space: nowrap;
  }

  .role {
    padding-left: 1rem;
    text-align: left;
  }

  .cta {
    margin: 2rem auto 0;
  }

  .nav-pill {
    padding: 0 0.85rem;
  }

  .nav-pill span {
    display: none;
  }

  .project-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .project-actions .project-link {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(115%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ctaReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  overflow: hidden;
  padding-block: 0.12em;
}

.reveal > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(115%);
  animation: revealUp 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-icon {
  opacity: 0;
  overflow: hidden;
  animation: iconReveal 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-icon > span {
  display: grid;
  opacity: 0;
  transform: translateY(115%);
  animation: revealUp 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-card {
  opacity: 0;
  transform: translateY(18px);
  animation: cardReveal 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-logo {
  opacity: 0;
  overflow: hidden;
  animation: iconReveal 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 40ms;
}

.reveal-logo > .brand-logo {
  opacity: 0;
  transform: translateY(115%);
  animation: revealUp 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 140ms;
}

.cta.reveal {
  opacity: 0;
  animation: ctaReveal 1400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 840ms;
}

.cta > .cta-content {
  animation-delay: 980ms;
}

.social-links a:nth-child(1) {
  animation-delay: 80ms;
}

.social-links a:nth-child(1) span {
  animation-delay: 180ms;
}

.social-links a:nth-child(2) {
  animation-delay: 140ms;
}

.social-links a:nth-child(2) span {
  animation-delay: 240ms;
}

.hero h1 span {
  animation-delay: 280ms;
}

.role span {
  animation-delay: 420ms;
}

.intro span {
  animation-delay: 560ms;
}

.description span {
  animation-delay: 700ms;
}

.project {
  animation-delay: 980ms;
}

.project .section-label span {
  animation-delay: 1120ms;
}

.project h2 span {
  animation-delay: 1260ms;
}

.project p span {
  animation-delay: 1400ms;
}

.project-actions a:nth-child(1) span {
  animation-delay: 1540ms;
}

.project-actions a:nth-child(2) span {
  animation-delay: 1660ms;
}

.project-actions a:nth-child(3) span {
  animation-delay: 1780ms;
}

.project-actions a:nth-child(4) span {
  animation-delay: 1900ms;
}

@media (prefers-reduced-motion: reduce) {
  .reveal > span,
  .reveal-icon,
  .reveal-icon > span,
  .reveal-logo,
  .reveal-logo > .brand-logo,
  .reveal-card,
  .cta.reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
