:root {
  color-scheme: dark;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue",
    Arial, sans-serif;
  --background: #0b0b0d;
  --text: #eceeef;
  --muted: #b4bac0;
  --focus: #8ec5ff;
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cinematic: cubic-bezier(0.2, 0.9, 0.2, 1);
}

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

html {
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 20rem;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(3rem, 7vh, 5.5rem) max(1.5rem, 7.5vw);
  padding-top: calc(clamp(3rem, 7vh, 5.5rem) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(clamp(3rem, 7vh, 5.5rem) + env(safe-area-inset-bottom, 0px));
  padding-left: calc(max(1.5rem, 7.5vw) + env(safe-area-inset-left, 0px));
  padding-right: calc(max(1.5rem, 7.5vw) + env(safe-area-inset-right, 0px));
  background: var(--background);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.05rem;
  line-height: 1.55;
  isolation: isolate;
}

::selection {
  background: rgba(255, 255, 255, 0.18);
}

a {
  color: inherit;
  text-decoration-color: rgba(255, 255, 255, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.26s var(--ease-fluid), text-decoration-color 0.26s var(--ease-fluid);
}

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

body.cursor-on,
body.cursor-on * {
  cursor: none !important;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 2147483647;
  opacity: 0;
  will-change: transform;
}

.cursor-dot {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(28, 28, 30, 0.2), 0 4px 14px rgba(28, 28, 30, 0.35);
  transition: width 0.2s ease, height 0.2s ease, margin 0.2s ease, opacity 0.3s ease,
    background-color 0.2s ease;
}

body.cursor-down .cursor-dot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
}

.cursor-ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(28, 28, 30, 0.08), 0 8px 24px rgba(28, 28, 30, 0.18);
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease,
    background-color 0.25s ease, opacity 0.3s ease;
}

body.cursor-hover .cursor-ring {
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  background: rgba(255, 255, 255, 0.24);
}

.cursor-dot.is-visible,
.cursor-ring.is-visible {
  opacity: 1;
}

.site-background {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #08090a;
  contain: strict;
}

.site-photo {
  position: absolute;
  inset: 0;
  display: block;
}

.site-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.site-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(6, 7, 9, 0.95),
      rgba(7, 9, 11, 0.86) 26%,
      rgba(9, 11, 14, 0.52) 48%,
      rgba(9, 11, 14, 0.12) 70%
    ),
    linear-gradient(
      0deg,
      rgba(5, 6, 8, 0.62),
      transparent 34%,
      transparent 76%,
      rgba(5, 6, 8, 0.28)
    );
}

.profile {
  position: relative;
  z-index: 1;
  width: min(100%, 39rem);
  margin: 0;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.45);
}

.intro {
  margin-bottom: 2.6rem;
}

h1,
h2,
p {
  margin-top: 0;
}

.hero-signature-wrap {
  display: block;
  width: fit-content;
  margin: 0 0 0.55rem -0.3rem;
  padding: 0;
  line-height: 0;
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hero-signature {
  display: block;
  width: min(20.5rem, 80vw);
  height: auto;
  overflow: visible;
}

.signature-reveal,
.signature-solid {
  fill: currentColor;
}

.signature-done .signature-reveal {
  display: none;
}

.hero-signature-wrap:active .hero-signature {
  transform: scale(0.985);
}

.handle {
  margin: 0 0 0.4rem;
  font-family: var(--font-text);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.education {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.008em;
  color: var(--muted);
}

.education a,
.contact a {
  color: var(--text);
  text-decoration-color: rgba(255, 255, 255, 0.34);
  transition: color 0.24s var(--ease-fluid), text-decoration-color 0.24s var(--ease-fluid);
}

.summary {
  max-width: 39rem;
  margin-bottom: 2.6rem;
  font-family: var(--font-text);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: -0.008em;
  color: var(--muted);
  text-wrap: pretty;
}

h2 {
  margin-bottom: 0.85rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text);
}

.work,
.music {
  margin-bottom: 2.6rem;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list a {
  position: relative;
  display: grid;
  grid-template-columns: 12.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  min-height: 2.85rem;
  padding: 0.55rem 1.4rem 0.55rem 0;
  text-decoration: none;
}

.project-list a::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 0.48rem;
  height: 0.48rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  color: var(--muted);
  content: "";
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.28s var(--ease-fluid), color 0.28s var(--ease-fluid);
}

.project-name {
  font-family: var(--font-text);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.012em;
  transition: color 0.28s var(--ease-fluid);
}

.project-description {
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.006em;
  transition: color 0.28s var(--ease-fluid);
}

.music-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 34.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.music-list li {
  display: grid;
  grid-template-columns: 3.35rem minmax(0, 1fr) auto;
  gap: 1.05rem;
  align-items: center;
  min-height: 4.1rem;
  padding: 0.5rem 0;
}

.music-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  color: var(--text);
  opacity: 0.9;
  transition: opacity 0.28s var(--ease-fluid);
}

.music-icon svg {
  width: 2.1rem;
  height: 2.1rem;
}

.music-details {
  display: grid;
  gap: 0.02rem;
  min-width: 0;
}

.music-name {
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.012em;
  transition: color 0.28s var(--ease-fluid);
}

.music-gear {
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: -0.004em;
  transition: color 0.28s var(--ease-fluid);
}

.music-duration {
  align-self: center;
  justify-self: end;
  text-align: right;
  font-family: var(--font-text);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: -0.005em;
  transition: color 0.28s var(--ease-fluid);
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  align-items: center;
  margin: 0;
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 400;
  font-style: normal;
  color: var(--muted);
}

.updated-date {
  margin: 0;
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  letter-spacing: -0.004em;
}

.education,
.summary,
.work h2,
.music h2,
.footer {
  animation: enter 0.48s var(--ease-cinematic) both;
}

.education {
  animation-delay: 0.32s;
}

.summary {
  animation-delay: 0.42s;
}

.work h2 {
  animation-delay: 0.52s;
}

.music h2 {
  animation-delay: 0.84s;
}

.footer {
  animation-delay: 1.12s;
}

.project-list li {
  animation: row-enter 0.45s var(--ease-cinematic) both;
}

.project-list li:nth-child(1) {
  animation-delay: 0.6s;
}

.project-list li:nth-child(2) {
  animation-delay: 0.68s;
}

.project-list li:nth-child(3) {
  animation-delay: 0.76s;
}

.music-list li {
  animation: row-enter 0.45s var(--ease-cinematic) both;
}

.music-list li:nth-child(1) {
  animation-delay: 0.94s;
}

.music-list li:nth-child(2) {
  animation-delay: 1.02s;
}

@keyframes enter {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-enter {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .education a:hover,
  .contact a:hover {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, 0.7);
  }

  .project-list a:hover .project-name,
  .project-list a:hover .project-description,
  .project-list a:hover::after {
    color: #ffffff;
  }

  .project-list a:hover::after {
    opacity: 1;
  }

  .music-list li:hover .music-name,
  .music-list li:hover .music-gear,
  .music-list li:hover .music-duration {
    color: #ffffff;
  }

  .music-list li:hover .music-icon {
    opacity: 1;
  }
}

@media (max-width: 68rem) {
  body {
    padding-inline: max(1.5rem, 6vw);
    padding-left: calc(max(1.5rem, 6vw) + env(safe-area-inset-left, 0px));
    padding-right: calc(max(1.5rem, 6vw) + env(safe-area-inset-right, 0px));
  }

  .site-shade {
    background:
      linear-gradient(90deg, rgba(6, 7, 9, 0.92), rgba(7, 9, 11, 0.78) 40%, rgba(9, 11, 14, 0.3)),
      linear-gradient(0deg, rgba(5, 6, 8, 0.55), transparent 70%);
  }
}

@media (max-width: 44rem) {
  body {
    padding-inline: 1.25rem;
    padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
    justify-content: flex-start;
    padding-top: calc(3.5rem + env(safe-area-inset-top, 0px));
  }

  .site-photo img {
    object-position: 62% center;
  }

  .site-shade {
    background:
      linear-gradient(180deg, rgba(6, 7, 9, 0.62), rgba(6, 7, 9, 0.55) 30%, rgba(6, 7, 9, 0.88)),
      linear-gradient(90deg, rgba(6, 7, 9, 0.5), transparent);
  }
}

@media (max-width: 34rem) {
  .hero-signature-wrap {
    margin-left: -0.15rem;
  }

  .hero-signature {
    width: min(17rem, 86vw);
  }

  .intro,
  .work,
  .music {
    margin-bottom: 2.3rem;
  }

  .summary {
    margin-bottom: 2.3rem;
  }

  .project-list a {
    grid-template-columns: 1fr;
    gap: 0.05rem;
    padding-block: 0.72rem;
  }

  .music-list li {
    grid-template-columns: 2.85rem minmax(0, 1fr) auto;
    gap: 0.85rem;
  }

  .music-icon {
    width: 2.85rem;
    height: 2.85rem;
  }

  .music-icon svg {
    width: 1.85rem;
    height: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    filter: none !important;
  }
}
