: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:
    radial-gradient(circle at top left, var(--color-border), transparent 34rem),
    linear-gradient(
      135deg,
      var(--color-bg-deep),
      var(--color-bg) 45%,
      var(--color-bg-soft)
    );
  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;
  justify-content: right;
  margin-bottom: 3rem;
}

.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: center;
}

h1 > span {
  white-space: nowrap;
}

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

.role {
  margin: 1rem 0 0;
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  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;
  flex-wrap: wrap;
  align-items: center;
  margin: 2rem auto 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(39, 42, 52, 0.55);
  color: var(--color-text);
  font-weight: 600;
  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);
}

.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-color: var(--color-warm);
}

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

@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);
  }

  h1 > span {
    white-space: nowrap;
  }
}

@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;
}

.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;
}

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