@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap");

:root {
  --bg: #0c0c0f;
  --raised: #141419;
  --raised-2: #1b1b22;
  --line: #26262e;
  --line-soft: #1d1d24;
  --text: #ededf0;
  --dim: #a0a0aa;
  --faint: #6b6b76;
  --accent: #a58dca;
  --accent-bright: #cbb6f2;
  --accent-dim: #5f5286;
  --accent-wash: rgba(165, 141, 202, 0.12);
  --accent-ink: #1a1428;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --maxw: 900px;
  --edge: 236px;
  --header-top: 29px;
  --header-h: 58px;
  --frame-top: 99px; /* header-top + header-h + 12px gap */
  --footer-bottom: 29px;
  --footer-h: 58px; /* same as the header */
  --frame-bottom: 99px; /* footer-bottom + footer-h + 12px gap */
}

@media (prefers-reduced-motion: reduce) {
  :global(*) {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* some of the above variables were ai genned */

* {
  font-family: "JetBrains Mono", "monospace";
}

html {
  margin: 0;
  padding: 0;
  background-color: #0c0c0f;
}

body {
  margin: 0;
}

/* nothing that animates in is interactive until the intro has finished.
   the .panel rule outweighs .panel.active until body.ready, so sliding
   panels only become clickable once the stage has revealed. */
body:not(.ready) .topbar,
body:not(.ready) .botbar,
body:not(.ready) .stage,
body:not(.ready) .panel {
  pointer-events: none;
}

/* grid lives on its own fixed layer so it stays anchored to the
   viewport and never moves with trackpad overscroll */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-color: #0c0c0f;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, var(--accent-wash) 1px, transparent 1px),
    linear-gradient(to bottom, var(--accent-wash) 1px, transparent 1px);
}

.frame {
  background-color: #0c0c0f;
}

.frame-fill {
  position: fixed;
  z-index: -1;
  top: var(--frame-top);
  bottom: var(--frame-bottom);
  left: 236px;
  right: 236px;
  background-color: var(--bg);
}

.line {
  position: fixed;
  z-index: 40;
  pointer-events: none;
}

.line.top,
.line.bottom {
  height: 1px;
  left: 240px;
  right: 240px;
  background-color: var(--accent-dim);
  transform: scaleX(0);
  transform-origin: left;
}

.line.left,
.line.right {
  width: 1px;
  top: calc(var(--frame-top) + 4px);
  bottom: calc(var(--frame-bottom) + 4px);
  background: var(--accent-dim);
  transform: scaleY(0);
  transform-origin: top;
}

/* the below animations are AI-generated! */
@keyframes wipeX {
  0% {
    transform: scaleX(0);
  } /* invisible, collapsed */
  80% {
    transform: scaleX(1);
    filter: brightness(1);
  } /* line finishes drawing */
  88% {
    filter: brightness(2.8);
  } /* the flash pop */
  100% {
    transform: scaleX(1);
    filter: brightness(1);
  } /* settles */
}

@keyframes wipeY {
  0% {
    transform: scaleY(0);
  } /* invisible, collapsed */
  80% {
    transform: scaleY(1);
    filter: brightness(1);
  } /* line finishes drawing */
  88% {
    filter: brightness(2.8);
  } /* the flash pop */
  100% {
    transform: scaleY(1);
    filter: brightness(1);
  } /* settles */
}

.corner {
  color: var(--text);
  position: fixed;
  z-index: 40;
  pointer-events: none;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  opacity: 0;
  animation: cornerFlash 0.5s ease-out 0.82s forwards;
}
.corner.tl {
  top: var(--frame-top);
  left: 236px;
  border-top: 1px solid;
  border-left: 1px solid;
}
.corner.tr {
  top: var(--frame-top);
  right: 236px;
  border-top: 1px solid;
  border-right: 1px solid;
}
.corner.bl {
  bottom: var(--frame-bottom);
  left: 236px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}
.corner.br {
  bottom: var(--frame-bottom);
  right: 236px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

@keyframes cornerFlash {
  0%,
  55% {
    opacity: 0;
  }
  68% {
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-bright);
  }
  100% {
    opacity: 0.9;
    box-shadow: 0 0 0 transparent;
  }
}

/* human again! */

.line.top {
  top: var(--frame-top);
  animation: wipeX 0.6s var(--ease) 0.1s forwards;
}
.line.right {
  right: 236px;
  animation: wipeY 0.6s var(--ease) 0.28s forwards;
}
.line.bottom {
  bottom: var(--frame-bottom);
  animation: wipeX 0.6s var(--ease) 0.46s forwards;
}
.line.left {
  left: 236px;
  animation: wipeY 0.6s var(--ease) 0.64s forwards;
}

/* header — its own outlined frame above the main frame */
.topbar {
  position: fixed;
  z-index: 40;
  top: var(--header-top);
  left: var(--edge);
  right: var(--edge);
  height: var(--header-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border: 1px solid var(--accent-dim);
  background-color: var(--bg);
  opacity: 0;
  /* wait for the main frame to finish drawing (~1.3s) before revealing */
  animation: headerIn 0.6s var(--ease) 1.4s forwards;
}

@keyframes headerIn {
  0% {
    opacity: 0;
    transform: translateY(-6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* footer — its own outlined frame below the main frame */
.botbar {
  position: fixed;
  z-index: 40;
  bottom: var(--footer-bottom);
  left: var(--edge);
  right: var(--edge);
  height: var(--footer-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border: 1px solid var(--accent-dim);
  background-color: var(--bg);
  color: var(--dim);
  font-size: 13px;
  opacity: 0;
  animation: footerIn 0.6s var(--ease) 1.4s forwards;
}

.botbar a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.botbar a:hover {
  color: var(--accent-bright);
}

.botbar .sep {
  margin: 0 4px;
  color: var(--faint);
}

.botbar .commit {
  color: var(--faint);
}

.botbar .commit:hover {
  color: var(--accent-bright);
}

.tab-nav {
  display: flex;
  gap: 8px;
}

.tab-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--accent-dim);
  background: none;
  color: var(--dim);
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.tab-arrow svg {
  width: 16px;
  height: 16px;
}

.tab-arrow:hover {
  color: var(--accent-bright);
  border-color: var(--accent);
  background-color: var(--accent-wash);
}

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

.brand {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-accent {
  color: var(--accent);
}

.tabs {
  display: flex;
  gap: 30px;
}

.tabs a {
  position: relative;
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
}

.tabs a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}

.tabs a:hover,
.tabs a.active {
  color: var(--accent-bright);
}

.tabs a:hover::after,
.tabs a.active::after {
  transform: scaleX(1);
}

/* content stage — clips the sliding panels inside the main frame */
.stage {
  position: fixed;
  z-index: 10;
  top: var(--frame-top);
  bottom: var(--frame-bottom);
  left: var(--edge);
  right: var(--edge);
  overflow: hidden;
  opacity: 0;
  animation: headerIn 0.6s var(--ease) 1.4s forwards;
}

.panel {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: 56px 64px;
  overflow-y: auto;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s var(--ease),
    opacity 0.5s var(--ease);
}

.panel.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.panel h1 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lead {
  margin: 0;
  max-width: 52ch;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.6;
}

/* home hero — text left, framed square portrait right */
.home-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}

.home-text {
  flex: 1 1 auto;
  min-width: 0;
}

.home-text h1 {
  white-space: nowrap;
}

.pfp {
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  height: 220px;
  margin: 0;
}

.pfp img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pfp-corner {
  position: absolute;
  width: 50px;
  height: 50px;
  pointer-events: none;
}

.pfp-corner.tl {
  top: -14px;
  left: -14px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

/* about section — paragraph left, social links right */
.about {
  display: flex;
  gap: 42px;
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid var(--line-soft);
}

.about-body {
  flex: 0 1 auto;
  min-width: 0;
}

.about-body p:not(.eyebrow) {
  margin: 0;
  max-width: 74ch;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.7;
}

/* inline prose links */
.panel p a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.panel p a:hover {
  color: var(--accent-bright);
  border-color: var(--accent);
}

.socials {
  flex: 0 0 auto;
  width: 210px;
}

.socials ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 14px;
}

.socials li span {
  font-size: 14px;
}

.socials .icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--faint);
  transition: color 0.2s var(--ease);
}

.socials li:has(a:hover) .icon {
  color: var(--accent-bright);
}

.copy-email.copied {
  color: var(--accent);
}

.socials a {
  position: relative;
  color: var(--dim);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.socials a:hover {
  color: var(--accent-bright);
}

.pfp-corner.br {
  bottom: -14px;
  right: -14px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.index-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.index-list li:first-child {
  border-top: 1px solid var(--line-soft);
}

.index-list .idx {
  flex: 0 0 auto;
  min-width: 56px;
  color: var(--faint);
  font-size: 13px;
}

/* the → markers on the links tab read bigger */
[data-tab="links"] .index-list .idx {
  font-size: 17px;
}

.index-list .name {
  flex: 0 0 auto;
  min-width: 180px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

/* linked names (e.g. projects) keep the plain look, accent on hover */
a.name {
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a.name:hover {
  color: var(--accent-bright);
}

/* links tab — 88x31 button wall */
.buttons-eyebrow {
  margin-top: 40px;
}

.buttons-note {
  margin: 0 0 16px;
  color: var(--faint);
  font-size: 13px;
}

.button-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-wall a {
  display: block;
  line-height: 0;
}

.button-wall img {
  display: block;
  width: 88px;
  height: 31px;
}

/* coming-soon placeholder (e.g. blog) */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  text-align: center;
}

.coming-soon-title {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.coming-soon-sub {
  margin: 0;
  color: var(--faint);
  font-size: 14px;
}

/* per-project actions: live demo + source, pushed to the right edge */
.index-list .actions {
  display: flex;
  align-self: center;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  padding-left: 20px;
}

.action {
  display: inline-flex;
  color: var(--faint);
  transition: color 0.2s var(--ease);
}

.action:hover {
  color: var(--accent-bright);
}

.action-icon {
  display: block;
  width: 16px;
  height: 16px;
}

/* a live link with no href yet is hidden until you fill it in */
a.action[href=""] {
  display: none;
}

.index-list .desc {
  color: var(--dim);
  font-size: 14px;
}
