:root {
  --bg: #070707;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);
  --muted2: rgba(255, 255, 255, 0.55);
  --accent: #a855f7; /* purple */
  --side-white: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: radial-gradient(900px 500px at 20% 20%, rgba(168, 85, 247, 0.08), transparent 55%),
              radial-gradient(900px 500px at 80% 70%, rgba(168, 85, 247, 0.06), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: "Didact Gothic", sans-serif;
  padding-top: 70px; /* fixed nav */
}

a { color: inherit; }

/* NAV */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 1000;

  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(255,255,255,0.7);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 60px;
  height: 60px;
  display: inline-block;
  opacity: 0.95;
}

.nav-brand-text {
  font-family: "Cardo", serif;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
}

.buttons {
  display: flex;
  gap: 10px;
}

.buttons button {
  position: relative;
  color: rgba(255,255,255,0.9);
  font-family: "Didact Gothic", sans-serif;
  font-weight: 700;
  background: transparent;
  border: none;
  padding: 10px;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.buttons button:hover {
  border-bottom: 3px solid rgba(255,255,255,0.9);
  margin-top: 3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.38);
  background: rgba(255,255,255,0.08);
}

.btn-ghost {
  background: transparent;
}

/* Sidebars */
.side-social {
  position: fixed;
  left: 28px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 9999;
}

.side-social a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--side-white);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, border-color 160ms ease;
}

.side-social a:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.6);
}

.side-social img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(1) grayscale(1);
  opacity: 0.9;
}

.side-line {
  width: 1px;
  height: 90px;
  background: var(--side-white);
  margin-top: 6px;
}

.side-email-wrap {
  position: fixed;
  right: 28px;
  top: calc(70px + 28px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.side-email {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(-180deg);
  color: var(--side-white);
  text-decoration: none;
  letter-spacing: 0.08em;
  font-size: 12px;
  transition: color 160ms ease, transform 160ms ease;
}

.side-email:hover {
  color: rgba(255,255,255,1);
  transform: rotate(180deg) translateY(-2px);
}

.side-email-line {
  width: 1px;
  height: 90px;
  background: var(--side-white);
  margin-top: 6px;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal-left { transform: translateX(-18px); }
.reveal-right { transform: translateX(18px); }
.reveal-up { transform: translateY(18px); }

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (max-width: 900px) {
  .side-social, .side-email-wrap { display: none; }
  .nav-brand-text { display: none; }
}

/* --------------------
   Mobile responsiveness
----------------------- */

html { -webkit-text-size-adjust: 100%; }

/* Prevent stray overflow from widening the page (common on iOS) */
html, body { overflow-x: clip; }
@supports not (overflow: clip){
  html, body { overflow-x: hidden; }
}
img, svg { max-width: 100%; height: auto; }

/* iOS safe-area (works best with viewport-fit=cover meta) */
:root { --nav-h: 70px; }
body { padding-top: calc(var(--nav-h) + env(safe-area-inset-top)); }
.navbar{
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
}

/* Phones: keep nav height, but allow the button row to scroll instead of overflowing */
@media (max-width: 620px){
  :root { --nav-h: 60px; }

  .navbar{ padding: 0 14px; }

  .nav-logo{
    width: 44px;
    height: 44px;
  }

  .buttons{
    gap: 6px;
    max-width: 70vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .buttons::-webkit-scrollbar{ display: none; }

  .buttons button{
    padding: 8px 8px;
    font-size: 12px;
    letter-spacing: 0.06em;
  }
  .buttons button:hover{
    border-bottom-width: 2px;
  }
}
