@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111111;
  --fg: #ffffff;
  --muted: #a3a3a3;
  --hairline: rgba(255, 255, 255, 0.1);
  --glass-fill: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025) 55%, rgba(255, 255, 255, 0.05));
  --glass-blur: blur(28px) saturate(170%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--fg);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Ambient light behind the glass ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform 1.2s var(--ease);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  animation: orb-in 2.4s var(--ease) 0.2s forwards, drift 26s ease-in-out infinite alternate;
}

.orb-1 {
  width: 46vmax;
  height: 46vmax;
  top: -14vmax;
  left: -10vmax;
  background: radial-gradient(circle, rgba(150, 168, 200, 0.5), transparent 65%);
}

.orb-2 {
  width: 38vmax;
  height: 38vmax;
  right: -12vmax;
  bottom: -14vmax;
  background: radial-gradient(circle, rgba(200, 200, 215, 0.36), transparent 65%);
  animation-duration: 2.4s, 32s;
  animation-direction: normal, alternate-reverse;
}

.orb-3 {
  width: 26vmax;
  height: 26vmax;
  top: 46%;
  left: 30%;
  background: radial-gradient(circle, rgba(130, 150, 190, 0.42), transparent 65%);
  animation-duration: 2.4s, 22s;
}

/* ---------- Liquid glass surface ---------- */

.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 24px rgba(255, 255, 255, 0.025),
    0 24px 60px -24px rgba(0, 0, 0, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Specular rim: brighter at the top-left and bottom-right edges */
.glass::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06) 30%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 1;
}

/* Pointer-following light (position set by main.js) */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.11), transparent 60%);
  opacity: var(--glow, 0);
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
  z-index: -1;
}

/* ---------- Header / nav ---------- */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  animation: drop-in 1s var(--ease) 0.5s both;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.nav-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  transition: transform 0.5s var(--spring);
}

.nav-mark img {
  display: block;
  width: 1.125rem;
  height: auto;
}

.nav-mark:hover {
  transform: scale(1.06);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 999px;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

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

.nav .btn-contact {
  color: var(--bg);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  box-shadow: inset 0 1px 0 #ffffff, 0 4px 14px -4px rgba(255, 255, 255, 0.35);
  transition: transform 0.45s var(--spring), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.nav .btn-contact:hover,
.nav .btn-contact[aria-current="page"] {
  color: var(--bg);
  background: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff, 0 6px 22px -4px rgba(255, 255, 255, 0.5);
}

.nav .btn-contact:hover {
  transform: translateY(-1px);
}

/* ---------- Main ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1.25rem 3rem;
  text-align: center;
}

h1 {
  margin: 0;
  line-height: 0;
}

.logo {
  display: block;
  width: min(150px, 46vw);
  height: auto;
  animation: focus-in 1.6s var(--ease) 0.1s both;
}

/* Links card */

.card {
  width: min(360px, 100%);
  margin-top: 3.5rem;
  padding: 0.5rem;
  border-radius: 1.75rem;
  animation: rise 1.2s var(--ease) 0.45s both;
}

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

.card li + li {
  border-top: 1px solid var(--hairline);
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0 1.25rem;
  border-radius: 1.25rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  overflow: hidden;
  animation: rise 1s var(--ease) both;
  transition: background-color 0.4s var(--ease);
}

.card li:nth-child(1) .row { animation-delay: 0.6s; }
.card li:nth-child(2) .row { animation-delay: 0.7s; }
.card li:nth-child(3) .row { animation-delay: 0.8s; }

/* Light sweep across a row on hover */
a.row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.09) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease);
  pointer-events: none;
}

a.row:hover,
a.row:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

a.row:hover::before,
a.row:focus-visible::before {
  transform: translateX(100%);
}

.arrow {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  letter-spacing: 0;
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.5s var(--spring), color 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

a.row:hover .arrow,
a.row:focus-visible .arrow {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
  transform: rotate(45deg);
}

.row.pending {
  color: var(--muted);
}

.tag {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.tag::before {
  content: "";
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: #d4d4d4;
  vertical-align: 0.05em;
  animation: pulse 2.4s ease-in-out infinite;
}

/* Contact */

.contact-card {
  padding: 1.75rem 2.5rem;
  border-radius: 999px;
  animation: rise 1.2s var(--ease) 0.2s both;
}

.email {
  position: relative;
  color: var(--fg);
  font-size: clamp(1rem, 3.5vw, 1.375rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.email::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3em;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform-origin: left;
  transition: opacity 0.4s var(--ease);
}

.email:hover::after {
  opacity: 1;
}

/* ---------- Focus & utilities ---------- */

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

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

/* ---------- Keyframes ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes focus-in {
  from { opacity: 0; filter: blur(14px); transform: scale(0.96); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}

@keyframes orb-in {
  to { opacity: 1; }
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vh) scale(1.08); }
  100% { transform: translate(-4vw, 8vh) scale(0.95); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Responsive ---------- */

@media (max-width: 479px) {
  body {
    font-size: 0.6875rem;
  }

  .row {
    letter-spacing: 0.14em;
    padding: 0 1rem;
  }

  .nav a {
    padding: 0.5rem 0.85rem;
  }

  .contact-card {
    padding: 1.5rem 1.75rem;
  }
}

@media (min-width: 768px) {
  body {
    font-size: 0.8125rem;
  }

  .logo {
    width: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .orb {
    opacity: 1;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: #1c1c1c;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
