/* Shared typography, navigation, controls, and accessibility. */
@font-face { font-family: FiraGO; src: url("../assets/fonts/FiraGO-Bold.woff") format("woff"), url("../assets/fonts/FiraGO-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: FiraGO; src: url("../assets/fonts/FiraGO-Regular.woff") format("woff"), url("../assets/fonts/FiraGO-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }

/* Base */
:root {
  --font-family: FiraGO, sans-serif;
  --minimum-font-size: 12px;
  font-family: var(--font-family);
  font-size: 16px;
  color-scheme: dark;
  --small-font: 10pt;
  --text: #edeef1;
  --signature-green: #83e7aa;
  --bg: #07090f;
}

* {
  box-sizing: border-box;
}

/* All components inherit the local portfolio typeface, including native controls. */
*, *::before, *::after {
  font-family: inherit;
}

input, textarea, select, option, button {
  font-family: var(--font-family);
  font-size: max(var(--minimum-font-size), 1em);
}

small, sub, sup {
  font-size: max(var(--minimum-font-size), .833333em);
}

body {
  color: var(--text);
  font-family: FiraGO, sans-serif;
  margin: 0px;
  font-weight: 400;
  background: var(--bg);
}

button {
  -webkit-tap-highlight-color: transparent;
  font: inherit;
}

a {
  -webkit-tap-highlight-color: transparent;
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: rgb(255, 255, 255) solid 2px;
  outline-offset: 7px;
}

body::before {
  background: radial-gradient(at 48% 46%, rgba(34, 33, 56, 0.208), transparent 59%);
  inset: 0px;
  content: "";
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

html[lang="ka"] .scene-name {
  letter-spacing: 0px;
  line-height: 1.3;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-transform: uppercase;
}

html[lang="ka"] :is(.scene-name, .scene-name em, h1, h2, h3, h4, h5, h6, .planet-label, .discipline-label, .details article > span) {
  font-feature-settings: "case";
  text-transform: none;
}

html[lang="ka"] .planet-label .explore {
  font-feature-settings: "case" 0;
}

/* Header */
.masthead {
  align-items: center;
  border: 0px;
  gap: 18px;
  display: flex;
  height: auto;
  justify-content: space-between;
  margin: 0px 5%;
  flex-wrap: nowrap;
  min-height: 0px;
  padding: 18px 0px;
  position: relative;
  z-index: 3;
}

.language-switch {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  gap: 3px;
  display: flex;
  padding: 3px;
}

.language-switch button {
  background: transparent;
  border: 0px;
  border-radius: 999px;
  color: rgb(143, 150, 166);
  cursor: pointer;
  font-size: var(--small-font);
  font-weight: 400;
  height: 30px;
  letter-spacing: 0.8px;
  min-width: 38px;
  font-family: FiraGO, sans-serif;
}

.language-switch button[aria-pressed="true"] {
  background: rgb(237, 238, 241);
  box-shadow: rgba(255, 255, 255, 0.14) 0px 0px 16px;
  color: rgb(7, 9, 15);
}

.scene-name {
  font-family: FiraGO, sans-serif;
  font-size: clamp(20px, 2.5vw, 34px);
  font-weight: 700;
  letter-spacing: 0px;
  line-height: 1.25;
  margin: 0px;
  min-width: 0px;
  text-align: left;
  font-style: normal;
  text-transform: uppercase;
}

.scene-name em {
  color: rgb(195, 183, 168);
  font-family: FiraGO, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 34px);
  font-style: normal;
  letter-spacing: 0px;
  line-height: 1.25;
  text-transform: uppercase;
}

.masthead .language-switch {
  flex-shrink: 0;
  margin-left: auto;
}

.header-identity {
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  display: flex;
  min-width: 0px;
}

.social-links {
  align-items: center;
  gap: 6px;
  display: flex;
  flex-shrink: 0;
}

.social-links a {
  place-items: center;
  border-radius: 8px;
  color: rgb(152, 157, 168);
  display: grid;
  height: 32px;
  transition: color 0.2s, background 0.2s;
  width: 30px;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.047);
  color: rgb(237, 238, 241);
}

.social-links svg {
  height: 18px;
  width: 18px;
}

.header-actions {
  align-items: center;
  gap: 12px;
  display: flex;
  flex-shrink: 0;
  margin-left: auto;
}

.downloads {
  position: relative;
}

.downloads-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgb(237, 238, 241);
  gap: 9px;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  min-height: 38px;
  padding: 7px 12px;
}

.downloads-toggle > svg {
  height: 17px;
  width: 17px;
}

.downloads-toggle .download-chevron {
  height: 13px;
  transition: transform 0.2s;
  width: 13px;
}

.downloads-toggle[aria-expanded="true"] .download-chevron {
  transform: rotate(180deg);
}

.download-menu {
  background: rgb(17, 21, 30);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: rgba(0, 0, 0, 0.533) 0px 12px 36px;
  padding: 6px;
  position: absolute;
  right: 0px;
  top: calc(100% + 10px);
  width: 240px;
  z-index: 10;
}

.download-menu button,
.download-menu a {
  background: transparent;
  border: 0px;
  border-radius: 9px;
  color: rgb(237, 238, 241);
  display: block;
  font-family: inherit;
  font-feature-settings: inherit;
  font-kerning: inherit;
  font-language-override: inherit;
  font-optical-sizing: inherit;
  font-size: 13px;
  font-size-adjust: inherit;
  font-stretch: inherit;
  font-style: inherit;
  font-variant: inherit;
  font-variation-settings: inherit;
  font-weight: inherit;
  line-height: inherit;
  padding: 13px 12px;
  text-align: left;
  width: 100%;
}

.download-menu button:disabled {
  color: rgb(161, 166, 178);
  cursor: default;
}

.download-menu a:hover,
.download-menu button:enabled:hover {
  background: rgba(255, 255, 255, 0.047);
}

/* Responsive and reduced motion */

@media (max-width: 1100px) {
  .masthead {
    gap: 12px;
    flex-wrap: wrap;
  }

  .header-identity {
    gap: 8px 16px;
    flex-wrap: wrap;
  }

  .scene-name,
  .scene-name em {
    font-size: clamp(20px, 2.3vw, 28px);
  }
}

@media (max-width: 600px) {
  .masthead {
    gap: 12px;
    padding: 14px 0px;
  }

  .scene-name em {
    display: block;
  }

  .header-identity {
    gap: 8px;
    justify-content: space-between;
    width: 100%;
  }

  .social-links {
    gap: 2px;
  }

  .social-links a {
    height: 30px;
    width: 25px;
  }

  .social-links svg {
    height: 16px;
    width: 16px;
  }

  .header-actions {
    gap: 10px;
  }

  .downloads-toggle {
    font-size:12px;
    min-height: 36px;
  }

  .download-menu {
    right: 0px;
    width: min(240px, -100px + 90vw);
  }
}

@media (max-height: 500px) {
  .masthead {
    padding: 8px 0px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: auto ease 0s 1 normal none running none !important;
    transition: none !important;
  }
}

/* Shared, non-interactive deep-space backdrop across the portfolio. */
body { isolation:isolate; }
body::before { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; background-image:radial-gradient(ellipse at 18% 24%,rgba(43,65,98,.19),transparent 56%),radial-gradient(ellipse at 83% 70%,rgba(53,40,83,.15),transparent 54%); background-size:100% 100%,100% 100%; background-repeat:no-repeat; }

.space-depth { position:fixed; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; }
