/* Shared styles for suheylakdeniz.com. Tokens come from packages/ui/src/theme.ts. */

:root {
  --bg: #f6f7fc;
  --surface: #ffffff;
  --border: #d7dcec;
  --text: #131828;
  --muted: #4f587a;
  --accent: #3f4cbe;
  --on-accent: #ffffff;
  --success: #1e6b4b;
  --warning: #8a5b00;
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 960px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --surface: #151c33;
    --border: #2e3a58;
    --text: #e8eaf4;
    --muted: #a7afc8;
    --accent: #9aa6f5;
    --on-accent: #0b1020;
    --success: #86d8b2;
    --warning: #e8c882;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #151c33;
  --border: #2e3a58;
  --text: #e8eaf4;
  --muted: #a7afc8;
  --accent: #9aa6f5;
  --on-accent: #0b1020;
  --success: #86d8b2;
  --warning: #e8c882;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The fight scene on the home page: a canvas behind everything, a veil for readability. */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  background: var(--bg);
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgb(7 7 11 / 55%) 0%,
    rgb(7 7 11 / 15%) 35%,
    rgb(7 7 11 / 0%) 60%,
    rgb(7 7 11 / 35%) 100%
  );
}

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

.credit {
  font-size: 12px;
  opacity: 0.8;
}

/* Temporary: choose style, stage and sound while deciding. */

.fx-panel {
  position: fixed;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgb(5 8 16 / 80%);
  border: 1px solid rgb(255 255 255 / 14%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 13px;
  color: #f2f3f7;
}

.fx-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9aa3bd;
}

.fx-hint {
  margin: 0;
  font-size: 12px;
  color: #9aa3bd;
}

.fx-btn {
  font: inherit;
  font-size: 13px;
  text-align: left;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 14%);
  background: transparent;
  color: #f2f3f7;
  cursor: pointer;
}

.fx-btn:hover {
  border-color: var(--accent);
}

.fx-panel kbd {
  display: inline-block;
  padding: 0 5px;
  margin-right: 6px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-bottom-width: 2px;
  border-radius: 5px;
  font: inherit;
  font-size: 11px;
}

@media (max-width: 640px) {
  .fx-panel {
    top: auto;
    bottom: 16px;
    transform: none;
    left: var(--gutter);
    right: var(--gutter);
    grid-template-columns: 1fr 1fr 1fr;
  }

  .fx-title,
  .fx-hint {
    grid-column: 1 / -1;
  }
}

/* Header */

.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

/* Hero */

.hero {
  padding: 56px 0 32px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 600;
}

.hero p {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

/* Project grid */

.section {
  padding: 24px 0 56px;
}

.section h2 {
  font-size: 22px;
  margin: 0 0 16px;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 120ms ease,
    transform 120ms ease;
}

a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex: none;
}

.card-icon.placeholder {
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 20px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

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

.badge {
  display: inline-block;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  width: fit-content;
}

.badge.live {
  color: var(--success);
  border-color: currentColor;
}

.badge.soon {
  color: var(--warning);
  border-color: currentColor;
}

/* Project page */

.project-hero {
  padding: 48px 0 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.project-hero img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex: none;
}

.project-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  font-weight: 600;
}

.project-hero .lede {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 60ch;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: 20px;
  margin: 32px 0 8px;
  font-weight: 600;
}

.prose p,
.prose li {
  color: var(--text);
}

.prose ul {
  padding-left: 20px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 600;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--muted);
  max-width: 68ch;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* With the scene behind them, cards and header go translucent. */

body:has(.scene) .card {
  background: rgb(21 28 51 / 78%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body:has(.scene) .site-header {
  border-bottom-color: rgb(255 255 255 / 10%);
}

/* The hub content sits in a narrow column on the left, so the scene stays in view. */

@media (min-width: 900px) {
  body:has(.scene) main .wrap,
  body:has(.scene) main.wrap {
    max-width: 440px;
    margin: 0;
    padding-left: 32px;
  }

  body:has(.scene) .hero {
    padding: 36px 0 12px;
  }

  body:has(.scene) .hero h1 {
    font-size: 30px;
  }

  body:has(.scene) .hero p {
    font-size: 15px;
  }

  body:has(.scene) .section {
    padding: 8px 0 40px;
  }

  body:has(.scene) .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body:has(.scene) .card {
    padding: 14px 16px;
    gap: 8px;
  }

  body:has(.scene) .card p {
    font-size: 14px;
  }

  body:has(.scene) .veil {
    background:
      linear-gradient(
        to right,
        rgb(7 7 11 / 60%) 0%,
        rgb(7 7 11 / 35%) 420px,
        rgb(7 7 11 / 0%) 560px
      ),
      linear-gradient(to bottom, rgb(7 7 11 / 35%) 0%, rgb(7 7 11 / 0%) 30%, rgb(7 7 11 / 30%) 100%);
  }
}

/* Skip link: off-screen until focused. */

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 30;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
}

.skip:focus {
  left: 8px;
}

/* ---------- The tomb (home page) ---------- */

.tomb-page {
  overflow: hidden;
  height: 100dvh;
  background: #06050a;
  color: #f2f3f7;
  /* The cursor is an ankh; its hotspot is the loop's centre. */
  cursor:
    url("/assets/cursor/ankh.svg") 17 13,
    auto;
}

.tomb-page a,
.tomb-page button,
.tomb-page.tomb-pointer {
  cursor:
    url("/assets/cursor/ankh-red.svg") 17 13,
    pointer;
}

.tomb-page.tomb-hover {
  cursor:
    url("/assets/cursor/ankh-red.svg") 17 13,
    pointer;
}

.tomb {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.tomb-labels {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.tomb-label {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: inherit;
  color: #0a0806;
  background: transparent;
  border: 0;
  padding: 6px 10px;
  text-shadow: 0 1px 10px rgb(255 220 160 / 55%);
  transition: opacity 200ms ease;
}

.tomb-label-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tomb-label-note {
  font-size: 12px;
  color: #2a2218;
}

.tomb-label.is-hover .tomb-label-name {
  color: #e0101c;
}

.tomb-label.is-locked {
  opacity: 0.55;
}

.tomb-label[hidden] {
  display: none;
}

.tomb-top,
.tomb-foot {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  pointer-events: none;
}

.tomb-top {
  top: 0;
  padding-top: 22px;
  background: linear-gradient(to bottom, rgb(4 3 10 / 90%), rgb(4 3 10 / 0%));
}

.tomb-foot {
  bottom: 0;
  font-size: 13px;
  color: #9aa3bd;
  background: linear-gradient(to top, rgb(4 3 10 / 90%), rgb(4 3 10 / 0%));
}

.tomb-top a,
.tomb-foot a {
  pointer-events: auto;
}

.tomb-brand {
  color: #f2f3f7;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
}

.tomb-nav {
  display: flex;
  gap: 18px;
}

.tomb-nav a {
  color: #c9c4b8;
  text-decoration: none;
  font-size: 14px;
}

.tomb-nav a:hover {
  color: #ffd27a;
}

.tomb-hint {
  position: fixed;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  z-index: 5;
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgb(5 4 8 / 70%);
  border: 1px solid rgb(255 210 122 / 30%);
  color: #e9e2d2;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.tomb-hint.is-hidden {
  opacity: 0;
}

.tomb-ankh {
  color: #ffd27a;
  font-size: 20px;
  animation: ankh-pulse 1.6s ease-in-out infinite;
}

@keyframes ankh-pulse {
  0%,
  100% {
    text-shadow: 0 0 6px rgb(255 210 122 / 40%);
  }

  50% {
    text-shadow: 0 0 18px rgb(255 210 122 / 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tomb-ankh {
    animation: none;
  }
}

/* The plain list: hidden while the scene works, shown for keyboard focus and when WebGL fails. */

.projects-list {
  position: fixed;
  left: 24px;
  bottom: 64px;
  z-index: 6;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgb(5 4 8 / 85%);
  border: 1px solid rgb(255 255 255 / 12%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.projects-list:focus-within,
.tomb-failed .projects-list {
  opacity: 1;
  pointer-events: auto;
}

.projects-list h2 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9aa3bd;
}

.projects-list ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

.tomb-leaving .tomb,
.tomb-leaving .tomb-labels {
  transition: opacity 260ms ease;
  opacity: 0;
}

.tomb-failed .tomb-hint {
  display: none;
}

/* Temporary: sound choices for the tomb. */

.sound-panel {
  gap: 10px;
  max-height: 80vh;
  overflow: auto;
}

.sound-row {
  display: grid;
  gap: 6px;
}

.sound-panel .fx-btn[aria-pressed="true"] {
  border-color: #ffd27a;
  color: #ffd27a;
}

/* The about sheet. */

.sheet {
  width: min(520px, calc(100vw - 32px));
  margin: auto;
  padding: 22px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 20px;
  background: rgb(10 8 14 / 96%);
  color: #f2f3f7;
}

.sheet::backdrop {
  background: rgb(0 0 0 / 55%);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet h2 {
  margin: 0;
  font-size: 20px;
}

.sheet p {
  margin: 0 0 14px;
  color: #c9c4b8;
}

.chip {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 14%);
  background: transparent;
  color: #f2f3f7;
}

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.socials a,
.social-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 14%);
  color: #f2f3f7;
  text-decoration: none;
}

.socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.socials a:hover {
  border-color: #ffd27a;
  color: #ffd27a;
}

.social-soon {
  opacity: 0.45;
  cursor: default;
}
