:root {
  --edge: color-mix(in srgb, var(--accent) 17%, var(--line));
  --surface: linear-gradient(145deg, #202729, var(--panel) 72%);
}

body {
  background: radial-gradient(ellipse 60rem 32rem at 75% 11rem, #48cae413, transparent), var(--bg);
}

header {
  background: #121415ee;
}

.bar {
  min-height: 5rem;
}

header .header-logo img {
  width: clamp(10rem, 15vw, 12rem);
}

nav {
  gap: .35rem clamp(.4rem, 2vw, 1.5rem);
}

nav a {
  padding: .45rem .3rem;
  font-weight: 650;
}

.hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: clamp(2rem, 6vw, 6rem);
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.25rem, 5.3vw, 5.5rem);
  line-height: 1.03;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.hero-role {
  margin-top: .12em;
}

.intro {
  max-width: 52ch;
  line-height: 1.75;
}

.button {
  min-height: 2.75rem;
  border-radius: .65rem;
}

.button.primary {
  box-shadow: 0 6px 24px #48cae426;
}

.portrait {
  padding: .55rem;
  border-color: var(--edge);
  background: linear-gradient(145deg, #48cae457, var(--panel) 55%);
  box-shadow: 0 24px 72px #0006;
}

.section h2 {
  letter-spacing: -.055em;
}

.card {
  background: var(--surface);
  border-color: var(--edge);
  border-radius: 1rem;
}

#services .card {
  border-top: 2px solid var(--accent);
}

.card h3 {
  text-wrap: balance;
}

.split {
  gap: clamp(1.5rem, 5vw, 5rem);
}

.timeline article {
  padding-block: 1.45rem;
}

.timeline li + li {
  margin-top: .45rem;
}

.work {
  align-items: start;
}

.project-card {
  min-width: 0;
}

.project-cover {
  aspect-ratio: 2.25;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: .65rem;
  margin-bottom: 1.25rem;
  background: var(--bg);
}

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

.work summary {
  padding-block: .35rem;
}

.course-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-gallery img {
  aspect-ratio: 2;
  object-fit: cover;
  object-position: center top;
}

.course-gallery a:hover img {
  border-color: var(--accent);
}

.contact-grid {
  gap: clamp(1.5rem, 6vw, 5rem);
}

.inquiry-card {
  background: radial-gradient(ellipse at top right, #48cae41a, transparent 65%), var(--surface);
  box-shadow: 0 16px 42px #0003;
}

footer {
  background: #101213;
}

@media (max-width: 840px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, .75fr);
    gap: 1.5rem;
  }
}

@media (max-width: 650px) {
  .hero, .work {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    font-size: clamp(2.25rem, 8vw, 3.6rem);
  }

  .portrait {
    justify-self: start;
    max-width: 22rem;
  }

  header .bar {
    gap: .5rem;
  }
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .is-revealing {
    animation: section-reveal 500ms ease-out;
  }

  .button, .work summary, .course-gallery img {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  }

  .button:hover {
    transform: translateY(-2px);
  }

  .button:active, .work summary:active, .course-gallery a:active img {
    transform: scale(.96);
    box-shadow: 0 0 0 3px #48cae44d;
  }
}

body {
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 85% 28%, #48cae416, transparent 54%),
    radial-gradient(ellipse at 8% 82%, #48cae40e, transparent 45%),
    repeating-linear-gradient(90deg, #48cae408 0 1px, transparent 1px 72px);
}

.cursor-glow {
  display: none;
}

@media (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor-glow {
    display: block;
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 8;
    pointer-events: none;
    opacity: 0;
    transition: opacity 220ms ease;
  }

  .cursor-glow::before {
    content: "";
    position: absolute;
    width: 15rem;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #48cae42c, #48cae411 38%, transparent 70%);
  }

  .cursor-glow.is-visible {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .is-revealing {
    animation: portfolio-rise 650ms cubic-bezier(.2, .7, .25, 1);
  }

  .grid > .is-revealing:nth-child(2) {
    animation-delay: 65ms;
    animation-fill-mode: backwards;
  }

  .grid > .is-revealing:nth-child(3) {
    animation-delay: 130ms;
    animation-fill-mode: backwards;
  }

  @keyframes portfolio-rise {
    from { opacity: .55; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.hero h1 {
  max-width: 100%;
  font-size: clamp(2.8rem, 6.5vw, 6rem);
  text-wrap: initial;
}

.hero-name {
  display: block;
  color: var(--accent);
}

@supports (background-clip: text) {
  .hero-name {
    background-image: linear-gradient(105deg, var(--text), var(--accent) 65%);
    background-clip: text;
    color: transparent;
  }
}

.hero-role {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 700;
}
