:root {
  color-scheme: dark;
  --ink: #f0f0ef;
  --muted: #a2a3a5;
  --muted-strong: #c8c9ca;
  --surface: #111214;
  --surface-soft: #151618;
  --line: #323438;
  --line-bright: #56595e;
  --accent: #dedfdf;
  --focus: #ffffff;
  --signal: #9bb8ca;
  --signal-strong: #c3d5df;
  --signal-wash: rgba(155, 184, 202, 0.055);
  --display: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

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

html {
  min-width: 320px;
  background: #1a1b1d;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 47% 40%, rgba(255, 255, 255, 0.025), transparent 38%),
    linear-gradient(145deg, #1c1d1f 0%, #141517 52%, #191a1c 100%);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

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

.site-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.017), transparent 40%),
    linear-gradient(150deg, #141517, #0f1012);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.technical-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42));
}

.technical-lines {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.construction-lines,
.cross-marks {
  fill: none;
  stroke: var(--line-bright);
  stroke-width: 0.8;
  opacity: 0.3;
  vector-effect: non-scaling-stroke;
}

.cross-marks {
  opacity: 0.4;
}

.dot-field {
  fill: var(--accent);
  opacity: 0.34;
}

.light-halo {
  fill: url("#ambient-light");
  opacity: 0.62;
  animation: ambient-breathe 4.8s ease-in-out infinite alternate;
}

.moving-light:nth-child(2) .light-halo {
  animation-delay: -2.6s;
}

.light-core {
  fill: #f4f2ec;
  opacity: 0.88;
}

@keyframes ambient-breathe {
  from {
    opacity: 0.38;
  }

  to {
    opacity: 0.64;
  }
}

.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 28px 48px;
}

.monogram {
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.08em;
}

.login-button,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 25px;
  gap: 13px;
  color: var(--muted-strong);
  background: rgba(19, 20, 22, 0.58);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.login-button:hover,
.back-link:hover {
  color: var(--signal-strong);
  background: var(--signal-wash);
  border-color: #617987;
}

.login-button svg,
.back-link svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-main {
  display: grid;
  align-items: center;
  min-height: 620px;
  padding: 40px 32px 64px;
}

.hero {
  width: min(100%, 650px);
  margin: 0 auto;
  text-align: center;
}

.hero-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4rem, 6.2vw, 6rem);
  font-weight: 350;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 26px 0 35px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.intro::before {
  width: 45px;
  height: 1px;
  content: "";
  background: var(--muted-strong);
  opacity: 0.8;
}

.contact-list {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 42px;
  font-style: normal;
}

.contact-item {
  display: flex;
  align-items: center;
  min-width: 245px;
  gap: 18px;
  text-align: left;
}

.contact-item:hover .contact-value {
  color: var(--ink);
}

.contact-item:hover .icon-ring {
  color: var(--signal-strong);
  border-color: #596f7c;
}

.contact-item.is-copied .icon-ring {
  color: var(--ink);
  border-color: var(--muted-strong);
}

.icon-ring,
.project-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
}

.icon-ring {
  width: 54px;
  height: 54px;
  color: var(--accent);
}

.icon-ring svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-copy,
.project-copy {
  display: flex;
  flex-direction: column;
}

.contact-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-value {
  padding: 1px 0 3px;
  color: var(--muted-strong);
  border-bottom: 1px solid var(--line-bright);
  font-size: 1rem;
  white-space: nowrap;
  transition: color 160ms ease;
}

.contact-divider {
  width: 1px;
  height: 46px;
  margin: 0 35px;
  background: var(--line-bright);
  opacity: 0.7;
}

.project-card {
  overflow: hidden;
  background: rgba(16, 17, 19, 0.62);
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
}

.project-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 86px;
  margin: 0;
  padding: 13px 24px;
  gap: 20px;
  transition: background-color 150ms ease;
}

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

.project-link:hover {
  background: var(--signal-wash);
}

.project-link:hover .project-icon {
  color: var(--signal-strong);
  border-color: #526873;
}

.project-link:hover .arrow {
  stroke: var(--signal-strong);
  opacity: 1;
}

.project-link:focus-visible {
  z-index: 1;
  outline: 0;
  background: var(--signal-wash);
  box-shadow: inset 0 0 0 1px #617987;
}

.project-icon {
  width: 48px;
  height: 48px;
  color: var(--muted-strong);
  background: rgba(35, 36, 39, 0.68);
  transition: color 160ms ease, border-color 160ms ease;
}

.project-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-icon .github-mark {
  fill: currentColor;
  stroke: none;
}

.project-copy strong {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 500;
}

.project-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.arrow {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.82;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 20px 48px;
  color: var(--muted-strong);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

.footer-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-identity > span,
.footer-location {
  color: var(--muted);
}

.footer-identity > span {
  opacity: 0.48;
}

.footer-location {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0.68;
}

.site-footer nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-footer nav span {
  width: 1px;
  height: 24px;
  background: var(--line-bright);
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--ink);
}

.legal-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.legal-main {
  width: 100%;
  padding: 55px 32px 95px;
}

.legal-card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 58px);
  background: rgba(17, 18, 20, 0.78);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.legal-card h1 {
  margin: 0 0 34px;
  font-family: var(--display);
  font-size: clamp(2.7rem, 6vw, 4.5rem);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.05em;
}

.legal-lead {
  margin: -8px 0 40px;
  color: var(--muted-strong);
  font-size: 1.08rem;
}

.legal-card section + section {
  margin-top: 30px;
}

.legal-card h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.legal-card p {
  color: var(--muted);
}

.legal-card section p {
  margin: 0;
}

.legal-card section a {
  color: var(--muted-strong);
  border-bottom: 1px solid var(--line-bright);
}

.legal-date {
  margin: 42px 0 0;
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  body {
    padding: 0;
  }

  .site-shell,
  .legal-shell {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .site-header {
    min-height: 88px;
    padding: 20px 24px;
  }

  .monogram {
    font-size: 2.15rem;
  }

  .login-button,
  .back-link {
    min-height: 44px;
    padding: 0 18px;
  }

  .landing-main {
    min-height: 0;
    padding: 75px 22px 88px;
  }

  .hero-heading h1 {
    font-size: clamp(3.15rem, 15vw, 4.25rem);
  }

  .intro {
    margin: 26px 0 34px;
    font-size: 0.98rem;
  }

  .contact-list {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 330px);
    margin: 0 auto 38px;
  }

  .contact-item {
    min-width: 0;
    width: 100%;
  }

  .contact-divider {
    width: 100%;
    height: 1px;
    margin: 18px 0;
    opacity: 0.42;
  }

  .project-link {
    min-height: 92px;
    margin: 0;
    padding: 13px 17px;
    gap: 14px;
  }

  .project-copy span {
    padding-right: 6px;
    line-height: 1.35;
  }

  .site-footer {
    flex-direction: column;
    justify-content: center;
    gap: 13px;
    min-height: 110px;
    padding: 22px 20px;
  }

  .site-footer nav {
    gap: 18px;
  }

  .site-footer nav span {
    height: 18px;
  }

  .technical-lines {
    width: 120%;
    margin-left: -10%;
    opacity: 0.58;
  }

  .legal-main {
    padding: 42px 16px 70px;
  }

  .legal-card {
    padding: 28px 24px;
  }
}

@media (max-width: 390px) {
  .login-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .login-button {
    width: 44px;
    padding: 0;
  }

  .back-link {
    gap: 8px;
    padding: 0 14px;
  }

  .landing-main {
    padding-inline: 16px;
  }

  .hero-heading h1 {
    font-size: 3.15rem;
  }

  .contact-item {
    gap: 14px;
  }

  .icon-ring {
    width: 49px;
    height: 49px;
  }

  .contact-value {
    font-size: 0.92rem;
  }

  .project-icon {
    width: 44px;
    height: 44px;
  }

  .project-link {
    margin: 0 14px;
    gap: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .light-halo {
    animation: none;
    opacity: 0.46;
  }
}
