@font-face {
  font-family: "Roobert";
  src: url("Roobert-Font/RoobertTRIAL-Regular-BF67243fd53fdf2.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roobert";
  src: url("Roobert-Font/RoobertTRIAL-Bold-BF67243fd540abb.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ahganirya";
  src: url("Roobert-Font/Ahganirya.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RoobertVF";
  src: url("Roobert-Font/RoobertTRIALVF-BF67243fd545701.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e1dfdd;
  --ink: #1a1c20;
  --muted: #6a6762;
  --line: #c7c2bc;
  --accent: #222;
  --card: #f4f1ed;
}

body.dark {
  --paper: #212121;
  --ink: #f2f2f2;
  --muted: #b3b0ab;
  --line: #3c3c3c;
  --accent: #f2f2f2;
  --card: #2a2a2a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roobert", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: -0.01em;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

#grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

#theme-transition {
  position: fixed;
  inset: 0;
  display: grid;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

#theme-transition.active {
  opacity: 1;
}

#theme-transition .pixel {
  background: var(--pixel-color, #e1dfdd);
  opacity: 1;
  transform: scale(1);
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

#theme-transition.reveal .pixel {
  opacity: 0;
  transform: scale(0.6);
}

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

.page {
  max-width: none;
  margin: 0 auto;
  padding: 0 70px;
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.nav strong {
  text-transform: none;
  letter-spacing: 0;
  font-size: 22px;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  text-align: center;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.7;
  width: 100%;
}

.nav-links a {
  display: inline-block;
  color: var(--ink);
  transition: color 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: center;
}

body.dark .nav-links a {
  color: var(--muted);
}

.nav-links.nav-hover a {
  color: #e2e0de;
  transform: rotateX(360deg);
}

.nav-bg {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 100vw;
  height: 110px;
  background: #191919;
  border-radius: 2px;
  transform: translate(-50%, -6px);
  clip-path: inset(50% 0 50% 0);
  transition: clip-path 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.nav-bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: "Ahganirya", "Roobert", sans-serif;
  font-size: clamp(28px, 9vw, 96px);
  letter-spacing: -0.04em;
  color: rgba(230, 230, 230, 0.12);
  text-transform: none;
  pointer-events: none;
  opacity: 0;
  text-align: center;
  transition: opacity 200ms ease-in-out;
}

body.dark .nav-bg-text {
  color: rgba(255, 255, 255, 0.22);
}

.nav.show-about .nav-bg {
  transform: translate(-50%, 0);
  clip-path: inset(0 0 0 0);
}

.nav.show-about .nav-bg-text {
  opacity: 1;
}

.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i) * 40ms);
}

.nav-bg-text .split-char:nth-child(2) {
  margin-right: 6px;
}

.nav.show-about .split-char {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

.hero h1 {
  font-family: "RoobertVF", "Roobert", sans-serif;
  font-size: 124px;
  line-height: 0.95;
  margin: 0 0 18px;
}

.variable-proximity {
  position: relative;
  display: inline-block;
}

.variable-proximity .vp-char {
  display: inline-block;
  font-variation-settings: "wght" 400;
  transition: font-variation-settings 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.portrait {
  width: 450.75px;
  height: 225.61px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-meta {
  display: grid;
  gap: 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-meta strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 4px;
}

.cta-pill {
  justify-self: end;
  margin-top: 14px;
  width: 68px;
  height: 68px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-name {
  font-size: clamp(32px, 5vw, 64px);
  margin: 32px 0 0;
  text-align: right;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}

.theme-switch {
  margin-top: -8px;
  text-align: right;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.theme-switch span {
  display: block;
}

.theme-switch button {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
  cursor: pointer;
}

.theme-switch button[data-theme="light"] {
  color: #1a1c20;
  font-weight: 700;
}

.theme-switch button[data-theme="dark"] {
  color: #5a5a5b;
}

body.dark .theme-switch button[data-theme="light"] {
  font-weight: 400;
  color: #5a5a5b;
}

body.dark .theme-switch button[data-theme="dark"] {
  font-weight: 700;
  color: #e1dfdd;
}

.intro {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.intro strong {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.intro-pill {
  margin-top: 60px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  max-width: 900px;
}

.intro-pill-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
}

.intro-pill-avatar img {
  width: 126px;
  height: 126px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
}

.intro-pill-text {
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.intro-pill-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #54514d;
}

body.dark .intro-pill-text p {
  color: #b3b0ab;
}

.section-label {
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.projects {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
}

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

.project-card {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.project-card h3 {
  margin: 0;
  font-size: clamp(26px, 3.8vw, 40px);
  letter-spacing: -0.02em;
}

.project-card p {
  margin: 6px 0 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.project-image {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px;
  display: grid;
  gap: 18px;
}

.project-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(70%);
  border-radius: 2px;
}

.hobbies {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hobbies h2 {
  font-size: clamp(36px, 5vw, 58px);
  margin: 0 0 14px;
  line-height: 0.95;
}

.hobbies p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.about-card {
  background: #f5f2ef;
  border: 1px solid var(--line);
  padding: 18px;
}

.about-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: grayscale(70%);
}

.about-footer {
  margin-top: 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.contact {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.contact h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  border-bottom: 2px solid var(--ink);
  display: inline-block;
  padding-bottom: 6px;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer {
  margin-top: 60px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.stagger {
  animation: rise 0.8s ease both;
}

.stagger-delay {
  animation-delay: 0.12s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

@media (max-width: 900px) {
  .nav {
    gap: 10px;
  }

  .nav-bg {
    height: 90px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-name {
    text-align: left;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  .intro-pill {
    grid-template-columns: 1fr;
    border-radius: 22px;
    text-align: center;
  }

  .intro-pill-avatar {
    margin: 0 auto;
  }

  .projects,
  .hobbies {
    grid-template-columns: 1fr;
  }

  .cta-pill {
    justify-self: start;
  }
}
