:root {
  --black: #050505;
  --ink: #141414;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e4e4e4;
  --gray-400: #9a9a9a;
  --gray-600: #3f3f3f;
  --sidebar: 292px;
  --font-body: "Raleway", "Inter", Arial, sans-serif;
  --font-display: "Raleway", "Inter", Arial, sans-serif;
  --font-brand: "Raleway", "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  background: var(--black);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -3;
  background: url("assets/bg-wa.png") center / cover no-repeat fixed;
  filter: blur(2.5px) saturate(1) contrast(1) brightness(1);
  transform: scale(1.035);
}

body::after {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.42)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 12px),
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.12), transparent 30%),
    rgba(0, 0, 0, 0.32);
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  gap: 46px;
  padding: 40px 34px;
  color: var(--ink);
  background: var(--white);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 16px 0 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  gap: 20px;
  align-content: start;
}

.brand-symbol {
  width: 100%;
  height: auto;
}

.brand-text {
  display: grid;
  gap: 4px;
  justify-items: center;
  line-height: 1.08;
  text-align: center;
}

.brand-text strong {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: 1.36rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-text small {
  color: var(--black);
  display: inline-block;
  font-family: var(--font-brand);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
  white-space: nowrap;
}

.side-nav {
  display: grid;
  gap: 2px;
  margin-top: 16px;
}

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  transition: color 180ms ease, padding-left 180ms ease;
}

.side-nav a::before {
  content: "";
  width: 0;
  height: 2px;
  margin-right: 0;
  background: var(--black);
  transition: width 180ms ease, margin-right 180ms ease;
}

.side-nav a:hover,
.side-nav a:focus-visible,
.side-nav a.is-active {
  color: var(--black);
  padding-left: 4px;
}

.side-nav a:hover::before,
.side-nav a:focus-visible::before,
.side-nav a.is-active::before {
  width: 28px;
  margin-right: 10px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.content {
  margin-left: var(--sidebar);
}

.section {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 72px clamp(28px, 6vw, 92px);
  scroll-margin-top: 0;
}

.section-inner {
  width: min(900px, 100%);
  padding: clamp(28px, 4vw, 48px);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--white);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.home-section .section-inner {
  color: var(--ink);
  background: var(--white);
  border-color: var(--white);
}

.hero-panel {
  max-width: 880px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
}

.home-section .kicker {
  color: var(--black);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  max-width: 780px;
  font-size: clamp(3rem, 7vw, 6.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.hero-panel p:not(.kicker) {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.section-heading {
  margin-bottom: 32px;
}

.project-list {
  display: grid;
  gap: 18px;
}

.project-item {
  position: relative;
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.project-thumb {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 25%, transparent 25% 50%, rgba(255, 255, 255, 0.2) 50% 75%, transparent 75%),
    #171717;
  background-size: 26px 26px;
  font-weight: 400;
}

.project-thumb:not(:has(img)) {
  aspect-ratio: 1;
}

.project-thumb:has(img) {
  display: block;
  background: transparent;
}

.project-thumb img {
  width: 100%;
  height: auto;
  border: 1px solid var(--gray-200);
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.project-thumb:has(img)::after {
  display: none;
}

.project-copy p,
.bio-text p {
  margin: 12px 0 0;
  color: var(--ink);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--black);
}

.project-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

.project-tags {
  position: absolute;
  right: 16px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: min(52%, 360px);
}

.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  color: var(--black);
  background: var(--gray-200);
  font-size: 0.72rem;
  line-height: 1;
}

.skills {
  display: grid;
  gap: 18px;
}

.skill {
  display: grid;
  gap: 9px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-weight: 400;
}

.skill-info span {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.skill-info strong {
  color: var(--black);
}

.skill-bar {
  height: 12px;
  overflow: hidden;
  background: var(--gray-200);
}

.skill-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--black);
  transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.skill.is-animated .skill-bar span {
  width: var(--value);
}

.skill.undefined .skill-bar span {
  background: repeating-linear-gradient(90deg, var(--black) 0 12px, var(--gray-600) 12px 18px);
}

.contact-grid {
  display: block;
}

.about-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--white);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.03) brightness(1.1);
  opacity: 0.78;
}

.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.24) 44%, rgba(255, 255, 255, 0.92) 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.88) 0%, transparent 42%, rgba(255, 255, 255, 0.7) 100%);
}

.bio-text {
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}

.contact-section {
  min-height: 80vh;
}

.contact-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--gray-200);
}

.contact-list li > div {
  display: grid;
  gap: 4px;
}

.contact-list li:last-child {
  border-bottom: 1px solid var(--gray-200);
}

.contact-list span {
  color: var(--black);
  font-weight: 400;
}

.contact-list svg {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  fill: currentColor;
}

.contact-list a {
  font-family: var(--font-display);
  font-weight: 400;
}

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

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

@media (max-width: 920px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    inset: 0 0 auto 0;
    width: auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
  }

  .brand {
    width: 100%;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .brand-symbol {
    width: 82px;
  }

  .brand-text {
    justify-self: end;
    justify-items: end;
    text-align: right;
  }

  .brand-text strong {
    font-size: 1.02rem;
  }

  .brand-text small {
    font-size: 0.76rem;
  }

  .menu-toggle {
    display: none;
  }

  .side-nav {
    display: none;
  }

  .content {
    margin-left: 0;
  }

  .section {
    min-height: auto;
    padding: 106px 20px 54px;
  }

  .section + .section {
    padding-top: 54px;
  }
}

@media (max-width: 640px) {
  body::before {
    background-attachment: scroll;
  }

  .section-inner {
    padding: 24px;
  }

  h1 {
    font-size: clamp(2.15rem, 10.8vw, 3.4rem);
  }

  .project-item {
    grid-template-columns: 1fr;
  }

  .project-tags {
    position: static;
    justify-content: flex-start;
    max-width: 100%;
    margin-top: 12px;
  }

  .project-thumb,
  .about-photo {
    width: min(100%, 240px);
  }
}
