@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Variable.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08090a;
  --bg-elevated: #0c0e0f;
  --bg-hover: #101312;
  --text: #e8eae4;
  --text-soft: #b9bdb6;
  --muted: #858b84;
  --dim: #747b74;
  --line: #1d211e;
  --line-strong: #2a2f2b;
  --accent: #b7f39a;
  --accent-glow: rgba(183, 243, 154, 0.22);
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

* {
  margin: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-strong) var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 560px at 18% -12%, rgba(183, 243, 154, 0.045), transparent 68%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

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

ul,
ol {
  list-style: none;
  padding: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

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

.wrap {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-color: var(--text);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 10, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-path {
  color: var(--accent);
  transition: opacity 0.2s ease;
}

.brand:hover .brand-path {
  opacity: 0.65;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-inline: auto;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link[aria-current="location"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="location"] {
  color: var(--text);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.clock::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent-glow);
  animation: status-pulse 4s ease-in-out infinite;
}

.clock-city {
  color: var(--dim);
}

#local-time {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.menu-wrap {
  position: relative;
  display: none;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text-soft);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.menu-trigger:hover,
.menu-trigger[aria-expanded="true"] {
  border-color: rgba(183, 243, 154, 0.4);
  background: rgba(183, 243, 154, 0.04);
  color: var(--text);
}

.menu-plus {
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s var(--ease);
}

.menu-trigger[aria-expanded="true"] .menu-plus {
  transform: rotate(45deg);
}

.site-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 50;
  width: 220px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--bg-elevated);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.site-menu[hidden] {
  display: none;
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 11px;
  border-radius: 2px;
  color: var(--text-soft);
  font-size: 11.5px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.menu-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.menu-link[aria-current="location"] {
  color: var(--accent);
}

.menu-meta {
  color: var(--dim);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.menu-link[aria-current="location"] .menu-meta {
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(64px, 9vh, 104px) clamp(72px, 9.5vh, 112px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(232, 234, 228, 0.2) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.34;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 32% 8%, #000 8%, transparent 72%);
  mask-image: radial-gradient(ellipse 72% 78% at 32% 8%, #000 8%, transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -8%;
  z-index: -1;
  width: 52vw;
  height: 52vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183, 243, 154, 0.05), transparent 68%);
  pointer-events: none;
}

.prompt {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.005em;
}

.prompt-user {
  color: var(--accent);
}

.prompt-path {
  color: var(--text-soft);
}

.prompt-cmd {
  color: var(--text-soft);
}

.hero-title {
  margin-top: 26px;
  margin-left: -0.055em;
  font-size: clamp(2.8rem, 12.5vw, 9rem);
  font-weight: 450;
  line-height: 0.9;
  letter-spacing: -0.07em;
  color: var(--text);
}

.cursor {
  display: inline-block;
  width: 0.44ch;
  height: 0.68em;
  margin-left: 0.1em;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(183, 243, 154, 0.3);
  transform: translateY(0.015em);
  animation: blink 1.15s steps(1, end) infinite;
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: end;
  margin-top: clamp(44px, 6.5vh, 68px);
}

.hero-id {
  padding-bottom: 2px;
}

.role {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.location {
  margin-top: 7px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.lede {
  max-width: 55ch;
  color: var(--text-soft);
  font-size: clamp(16px, 1.35vw, 18px);
  text-wrap: pretty;
  line-height: 1.7;
  letter-spacing: -0.012em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--accent);
  color: #0a1007;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.005em;
  transition: background-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s var(--ease);
}

.btn:hover {
  background: #c9ffaf;
  box-shadow: 0 10px 34px rgba(183, 243, 154, 0.12);
  transform: translateY(-1px);
}

.btn-arrow {
  font-size: 13px;
  transition: transform 0.2s var(--ease);
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-soft);
  font-size: 11.5px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link span {
  transition: transform 0.2s var(--ease);
}

.text-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.text-link:hover span {
  transform: translateX(3px);
}

/* ---------- sections ---------- */

.section {
  padding-top: clamp(64px, 8vw, 104px);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(36px, 5vw, 54px);
}

.section-index {
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.section-title {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
}

.section-rule {
  flex: 1;
  height: 1px;
  background-image: linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
  background-size: 6px 1px;
  opacity: 0.8;
}

.section-note {
  color: var(--dim);
  font-size: 10.5px;
  white-space: nowrap;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: start;
}

.about-copy {
  max-width: 58ch;
  color: var(--text-soft);
  font-size: clamp(15px, 1.25vw, 16.5px);
  line-height: 1.78;
  text-wrap: pretty;
  letter-spacing: -0.008em;
}

.about-copy p + p {
  margin-top: 1.35em;
  color: var(--muted);
}

.profile-card {
  align-self: start;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #0c0e0f, #0a0c0d);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.015em;
}

.profile-mode {
  color: var(--dim);
}

.profile-list {
  padding: 4px 0;
}

.profile-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid #141714;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row dt {
  color: var(--dim);
  font-size: 11px;
}

.profile-row dd {
  color: var(--text-soft);
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

#utc-offset {
  color: var(--muted);
}

/* ---------- work ---------- */

.work-list {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.work-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(190px, 0.72fr) minmax(0, 1.28fr);
  grid-template-areas: "index company detail";
  gap: 28px;
  padding: clamp(30px, 4vw, 44px) 0;
}

.work-item + .work-item {
  border-top: 1px solid var(--line);
}

.work-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -22px;
  width: 1px;
  background: var(--accent);
  opacity: 0.55;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

.work-item:hover::before {
  transform: scaleY(1);
}

.work-index {
  grid-area: index;
  padding-top: 5px;
  color: var(--dim);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

.work-item:hover .work-index {
  color: var(--accent);
}

.work-company-block {
  grid-area: company;
}

.work-company {
  font-size: clamp(19px, 2.3vw, 24px);
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.work-scope {
  margin-top: 8px;
  color: var(--dim);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

.work-company a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  transition: color 0.2s ease;
}

.work-company a:hover {
  color: var(--accent);
}

.ext {
  color: var(--dim);
  font-size: 0.54em;
  font-weight: 400;
  transform: translateY(-0.42em);
  transition: color 0.2s ease, transform 0.25s var(--ease);
}

.work-company a:hover .ext {
  color: var(--accent);
  transform: translate(2px, -0.55em);
}

.work-detail {
  grid-area: detail;
  padding-top: 2px;
}

.work-summary {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.7;
  letter-spacing: -0.006em;
  text-wrap: pretty;
}

.work-points {
  display: grid;
  gap: 7px;
  max-width: 62ch;
  margin-top: 14px;
}

.work-label {
  color: var(--text);
  font-weight: 500;
}

.work-points li {
  position: relative;
  padding-left: 21px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: -0.006em;
  text-wrap: pretty;
}

.work-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.7;
}

.inline-link {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.inline-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- contact ---------- */

.contact {
  padding-bottom: clamp(88px, 11vw, 132px);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(40px, 8vw, 112px);
  align-items: end;
}

.contact-grid > * {
  min-width: 0;
}

.contact-title {
  max-width: 14ch;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 450;
  line-height: 1.03;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.contact-body {
  padding-bottom: 4px;
}

.contact-copy {
  max-width: 38ch;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--accent);
  color: var(--text);
  font-size: clamp(18px, 2.3vw, 24px);
  font-weight: 450;
  letter-spacing: -0.04em;
  transition: color 0.2s ease;
}

.contact-email span {
  color: var(--accent);
  font-size: 0.72em;
  transition: transform 0.25s var(--ease);
}

.contact-email:hover {
  color: var(--accent);
}

.contact-email:hover span {
  transform: translate(3px, -3px);
}

.contact-meta {
  margin-top: 18px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.01em;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 25px 0 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.015em;
}

.footer-end {
  color: var(--muted);
}

/* ---------- motion ---------- */

@keyframes blink {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
  }

  .hero-intro {
    max-width: 640px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .profile-card {
    width: min(100%, 520px);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
  }

  .contact-title {
    max-width: min(18ch, 100%);
  }

  .contact-body {
    max-width: 520px;
  }
}

@media (max-width: 860px) {
  .work-item {
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-areas:
      "index company"
      "index detail";
    column-gap: 16px;
    row-gap: 12px;
    padding: 30px 0;
  }

  .work-item::before {
    left: -14px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 80px;
  }

  .topbar-inner {
    height: 58px;
    gap: 16px;
  }

  .nav {
    display: none;
  }

  .topbar-tools {
    margin-left: auto;
    gap: 14px;
  }

  .menu-wrap {
    display: block;
  }

  .hero {
    padding-block: 64px 96px;
  }

  .hero::before {
    background-size: 24px 24px;
  }

  .hero-title {
    margin-top: 22px;
  }

  .section-head {
    gap: 10px;
    margin-bottom: 34px;
  }

  .section-note {
    display: none;
  }

  .section {
    padding-top: 64px;
  }

  .contact {
    padding-bottom: 88px;
  }

  .footer-inner {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .footer-middle {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .hero {
    padding-top: 54px;
    padding-bottom: 72px;
  }

  .prompt {
    font-size: 11px;
  }

  .hero-bottom {
    margin-top: 42px;
  }

  .hero-actions {
    gap: 22px;
  }

  .work-points li {
    font-size: 13.5px;
  }

  .contact-email {
    font-size: 17px;
    gap: 8px;
  }

  .contact-title {
    font-size: clamp(2.35rem, 11.5vw, 3.2rem);
  }
}

@media (max-width: 420px) {
  .clock-city {
    display: none;
  }

  .footer-middle {
    display: none;
  }

  .work-company {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .cursor {
    animation: none;
  }
}
