/* Homepage layout and orbit scene. Load after shared.css. */

/* Base */
body { height:100dvh; overflow:hidden; }

.orbit-screen {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0px, 1fr) auto;
  row-gap: clamp(8px, 2dvh, 22px);
}

html {
  height: 100%;
  overflow: hidden;
}

/* Orbit scene */
.hero {
  margin: auto;
  max-width: 1500px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0px;
}

.universe {
  height: auto;
  isolation: isolate;
  margin: 0px auto;
  position: relative;
  width: 94%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  container-type: size;
  flex: 1 1 0%;
  min-height: 0px;
}

.starfield {
  inset: -10% -5%;
  pointer-events: none;
  position: absolute;
}

.star {
  background: rgb(190, 201, 227);
  border-radius: 50%;
  box-shadow: rgba(172, 191, 236, 0.314) 0px 0px 5px;
  height: 2px;
  opacity: var(--opacity);
  position: absolute;
  width: 2px;
}

.system {
  aspect-ratio: 1 / 1;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(calc(-50% + var(--px,0px)),calc(-50% + var(--py,0px)));
  width: min(100%, 145cqh);
  will-change: transform;
  isolation: isolate;
  --portrait-size: clamp(100px,min(36.8vw,60cqh),426px);
}

.orbit-paths {
  inset: 0px;
  fill: none;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  stroke-width: 1;
  width: 100%;
  z-index: 0;
}

.orbit-back {
  stroke: rgba(141, 150, 178, 0.11);
}

.orbit-front {
  stroke: rgba(165, 180, 210, 0.22);
}

.orbit-paths path {
  vector-effect: non-scaling-stroke;
}

.sun {
  left: 50%;
  pointer-events: none;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translateX(-50%);
  margin-top: calc(var(--portrait-size) / -2);
  z-index: 1000;
}

.portrait {
  aspect-ratio: 1 / 1;
  background: none;
  border: 0px;
  border-radius: 0px;
  box-shadow: none;
  margin: auto;
  padding: 0px;
  width: var(--portrait-size);
  opacity: var(--portrait-opacity,.9);
  pointer-events: none;
  position: relative;
  transition: opacity 0.3s;
  animation: 6s ease-in-out 0s infinite normal none running portrait-levitate;
  transform-origin: 50% 65%;
  -webkit-mask-image: linear-gradient(rgb(0, 0, 0) 48%, rgba(0, 0, 0, 0.733) 68%, rgba(0, 0, 0, 0.267) 85%, transparent 100%);
  mask-image: linear-gradient(rgb(0, 0, 0) 48%, rgba(0, 0, 0, 0.733) 68%, rgba(0, 0, 0, 0.267) 85%, transparent 100%);
}

.portrait img {
  border-radius: 0px;
  height: 100%;
  object-fit: cover;
  width: 100%;
  background: none;
  border: 0px;
  box-shadow: none;
  padding: 0px;
}

.details {
  margin: 0px auto;
  max-width: 700px;
  min-height: 0px;
  padding: 4px 24px 8px;
  text-align: center;
  display: grid;
  flex-shrink: 0;
  width: 100%;
  font-weight: 400;
}

.details article {
  animation: 0.3s ease 0s 1 normal none running reveal;
  align-self: center;
  grid-area: 1 / 1;
}

.details article > span {
  color: rgb(255, 255, 255);
  font-size: calc(var(--small-font) * 2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.details p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11pt;
  line-height: 1.4;
  margin: 8px 0px 0px;
}

.portrait * {
  pointer-events: none;
}

main {
  min-height: 0px;
}

.details article[hidden] {
  animation: auto ease 0s 1 normal none running none;
  display: block;
  pointer-events: none;
  visibility: hidden;
}

/* Planets */
.traveler {
  height: 0px;
  left: 50%;
  position: absolute;
  top: 50%;
  width: 0px;
  z-index: 3;
  --color: #ff665c;
  --size: 48px;
  transform-origin: 0px 0px;
  will-change: transform;
}

.motion {
  --color: #ff665c;
  --size: 78px;
}

.graphic {
  --color: var(--signature-green);
  --size: 68px;
}

.web {
  --color: #61aaff;
  --size: 82px;
}

.ai {
  --color: #f3d075;
  --size: 62px;
}

.planet {
  align-items: center;
  background: transparent;
  border: 0px;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  height: var(--size);
  justify-content: center;
  left: 0px;
  padding: 0px;
  position: absolute;
  top: 0px;
  transform: translate(-50%, -50%);
  width: var(--size);
}

.sphere {
  background: none;
  border: 0px;
  inset: 0px;
  box-shadow: none;
  pointer-events: none;
  position: absolute;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: brightness(var(--depth-light,1));
}

.planet-label {
  font-size: 11pt;
  font-weight: 400;
  left: calc(50% + var(--label-shift,0px));
  position: absolute;
  text-align: center;
  white-space: normal;
  top: calc(100% + 20px);
  transform: translateX(-50%) scale(var(--label-scale,1));
  transition: transform 0.4s;
  transform-origin: 50% 0px;
  width: 176px;
  line-height: 1.5;
  pointer-events: none;
  text-transform: uppercase;
}

.explore {
  color: var(--color);
  display: block;
  font-size: var(--small-font);
  letter-spacing: 0.5px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: 400;
}

.portal {
  place-items: center;
  border-radius: 0px;
  inset: 12%;
  display: grid;
  opacity: 0;
  overflow: visible;
  position: absolute;
  transition: opacity 0.4s;
  background: none;
  z-index: 2;
}

.portal::before {
  border-radius: 50%;
  inset: -8%;
  box-shadow: none;
  content: none;
  position: absolute;
  transform: rotate(-30deg) scaleX(0.8);
  border: 0px;
  filter: blur(5px);
  background: radial-gradient(ellipse at 30% 40%,color-mix(in srgb,var(--color),transparent 60%),transparent 60%);
}

.browser-art {
  border-radius: 3px;
  text-align: left;
  transform: rotate(-9deg);
  width: 29px;
  border: 1px solid var(--color);
}

.browser-art b {
  display: block;
  font-size:12px;
  padding: 2px;
  border-bottom: 1px solid var(--color);
}

.browser-art > span {
  color: var(--color);
  display: block;
  font-size: 12px;
  padding: 3px 0px;
  text-align: center;
}

.ai-art {
  color: var(--color);
  font-size: 32px;
  text-shadow: 0 0 7px var(--color);
}

.portal > span {
  filter: drop-shadow(0 0 5px var(--color));
  position: relative;
  z-index: 1;
}

.wisp {
  inset: 0px;
  pointer-events: none;
  position: absolute;
}

.wisp-core {
  border: 0px;
  inset: -14%;
  filter: none;
  position: absolute;
  background: radial-gradient(circle,var(--color) 0%,color-mix(in srgb,var(--color),transparent 8%) 7%,color-mix(in srgb,var(--color),transparent 35%) 18%,color-mix(in srgb,var(--color),transparent 69%) 34%,color-mix(in srgb,var(--color),transparent 90%) 52%,transparent 72%);
}

.spark {
  background: rgb(255, 255, 255);
  border-radius: 50%;
  box-shadow: 0 0 4px var(--color),0 0 8px var(--color);
  height: 2px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  width: 2px;
}

.satellite {
  color: var(--color);
  filter: drop-shadow(0 0 3px var(--color));
  height: 13px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  width: 13px;
}

.satellite svg,
.design-icon svg,
.motion-icon svg {
  display: block;
  height: 100%;
  width: 100%;
}

.satellite-secondary {
  height: 10px;
  opacity: 0.55;
  width: 10px;
}

.motion .satellite svg {
  display: none;
}

.motion .satellite {
  position: absolute;
}

.motion .satellite::before,
.motion .satellite::after {
  content: "";
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.motion .satellite:not(.satellite-secondary)::before {
  border: 1.4px solid;
  border-radius: 50%;
  box-shadow: 0 0 8px color-mix(in srgb,var(--color),transparent 25%);
  height: 17px;
  width: 17px;
  background: color-mix(in srgb,var(--color),transparent 88%);
}

.motion .satellite:not(.satellite-secondary)::after {
  border-bottom: 4px solid transparent;
  border-left: 6px solid;
  border-top: 4px solid transparent;
  margin-left: 1px;
}

.motion .satellite-secondary {
  height: 12px;
  opacity: 0.82;
  width: 15px;
}

.motion .satellite-secondary::before {
  border: 1.2px solid;
  border-radius: 2px;
  box-shadow: 0 0 7px color-mix(in srgb,var(--color),transparent 30%);
  height: 10px;
  transform: translate(-50%, -50%) rotate(-6deg);
  width: 15px;
  background: linear-gradient(135deg,currentColor 0 12%,transparent 12% 24%,currentColor 24% 36%,transparent 36% 48%,currentColor 48% 60%,transparent 60%),linear-gradient(180deg,transparent 0 4px,currentColor 4px 5px,transparent 5px),color-mix(in srgb,var(--color),transparent 91%);
}

.motion .satellite-secondary::after {
  border-color: currentcolor;
  border-radius: 0px 0px 2px 2px;
  border-style: none solid solid;
  border-width: 0px 1.2px 1.2px;
  border-image: none;
  height: 6px;
  margin-top: 3px;
  opacity: 0.95;
  width: 15px;
  background: color-mix(in srgb,var(--color),transparent 92%);
}

.design-icon {
  color: var(--color);
  filter: drop-shadow(0 0 7px color-mix(in srgb,var(--color),transparent 22%));
  height: 34px;
  position: relative;
  width: 34px;
}

.design-icon::before,
.design-icon::after {
  content: none;
}

.motion-icon {
  color: var(--color);
  filter: drop-shadow(0 0 7px color-mix(in srgb,var(--color),transparent 26%));
  height: 38px;
  position: relative;
  width: 48px;
}

.motion-icon::before,
.motion-icon::after {
  content: none;
}

.planet-label .explore {
  text-transform: none;
}

/* Interactions */
.traveler.active {
  z-index: 5;
}

.active .sphere {
  transform: scale(var(--hover-scale,1.25));
}

.active .planet-label {
  transform: translate(-50%,var(--hover-label-travel,8px)) scale(var(--label-scale,1));
}

.active .explore,
.active .portal {
  opacity: 1;
}

.universe.dragging,
.universe.dragging .planet {
  cursor: grabbing;
}

/* Keep keyboard focus visible without framing the entire composition. */
.universe { outline:none; }
.universe:focus-visible::after {
  content:"\2190 / \2192  \00b7  \2191 / \2193";
  position:absolute;left:50%;bottom:8px;transform:translateX(-50%);
  color:var(--signature-green);background:var(--bg);border-radius:999px;
  outline:2px solid var(--signature-green);outline-offset:3px;
  padding:5px 12px;font-size:12px;pointer-events:none;z-index:2000;
}
@media(forced-colors:active){.universe:focus-visible::after{outline-color:Highlight;}}

.planet::before {
  background: transparent;
  content: "";
  height: var(--hit-height,100%);
  left: var(--hit-left,0px);
  pointer-events: auto;
  position: absolute;
  top: var(--hit-top,0px);
  width: var(--hit-width,100%);
}

/* Footer */
.discipline-footer {
  gap: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0px, 1fr));
  margin: 0px auto;
  max-width: 1000px;
  padding: 8px 24px 36px;
  width: min(100%, 1000px);
}

.discipline-button {
  align-items: center;
  background: transparent;
  border: 0px;
  border-radius: 20px;
  color: color-mix(in srgb,var(--color),#9297a3 55%);
  gap: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  justify-content: center;
  min-height: 0px;
  padding: 10px 8px;
  position: relative;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s;
}

.discipline-button::before {
  border-radius: inherit;
  inset: 0px;
  content: "";
  opacity: 0.2;
  position: absolute;
  transition: opacity 0.35s;
  z-index: -1;
  background: radial-gradient(ellipse,color-mix(in srgb,var(--color),transparent 78%),transparent 72%);
}

.discipline-icon {
  place-items: center;
  display: grid;
  filter: drop-shadow(0 0 3px var(--color));
  height: 42px;
  opacity: 0.4;
  transition: opacity 0.35s, filter 0.35s;
  width: 52px;
}

.discipline-icon > span {
  display: block;
}

.discipline-label {
  font-size: 11pt;
  line-height: 1.5;
  text-align: center;
  transition: text-shadow 0.35s;
  font-weight: 400;
  text-transform: uppercase;
}

.discipline-button:hover,
.discipline-button:focus-visible,
.discipline-button[aria-expanded="true"] {
  box-shadow: 0 0 32px color-mix(in srgb,var(--color),transparent 91%);
  color: var(--color);
  transform: translateY(-3px);
  background: color-mix(in srgb,var(--color),transparent 97%);
}

.discipline-button:hover::before,
.discipline-button:focus-visible::before,
.discipline-button[aria-expanded="true"]::before {
  opacity: 1;
}

.discipline-button:hover .discipline-icon,
.discipline-button:focus-visible .discipline-icon,
.discipline-button[aria-expanded="true"] .discipline-icon {
  filter: drop-shadow(0 0 9px var(--color));
  opacity: 1;
}

.discipline-button:hover .discipline-label,
.discipline-button:focus-visible .discipline-label,
.discipline-button[aria-expanded="true"] .discipline-label {
  text-shadow: 0 0 16px color-mix(in srgb,var(--color),transparent 45%);
}

/* Animation keyframes */
@keyframes reveal { 
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0px); }
}
@keyframes portrait-levitate { 
  0%, 100% { transform: translate(0px, 2px) rotate(-0.4deg); }
  25% { transform: translate(2px, -3px) rotate(0.3deg); }
  50% { transform: translate(0px, -6px) rotate(0.6deg); }
  75% { transform: translate(-2px, -2px) rotate(-0.2deg); }
}

/* Responsive */

@media (max-width: 600px) {
  .system {
    width: min(100%, 125cqh);
    --portrait-size: clamp(100px,min(53vw,60cqh),228px);
  }

  .sun {
    transform: translateX(-50%);
  }

  .traveler {
    --size: 40px;
  }

  .motion {
    --size: 44px;
  }

  .web {
    --size: 46px;
  }

  .ai {
    --size: 38px;
  }

  .planet-label {
    width: 144px;
  }

  .details {
    padding-left: 16px;
    padding-right: 16px;
  }

  .discipline-footer {
    gap: 6px;
    padding: 6px 12px 28px;
  }

  .discipline-button {
    border-radius: 12px;
    gap: 6px;
    padding: 8px 3px;
  }

  .discipline-label {
    font-size: 10pt;
    overflow-wrap: anywhere;
  }

  .discipline-icon {
    height: 34px;
    transform: scale(0.8);
  }
}

@media (max-height: 500px) {
  .discipline-footer {
    padding-bottom: 14px;
    padding-top: 0px;
  }

  .discipline-button {
    gap: 6px;
    flex-direction: row;
    padding: 6px;
  }

  .discipline-icon {
    height: 28px;
    transform: scale(0.65);
    width: 34px;
  }
}

@media (min-width: 1200px) and (min-height: 701px) {
  .hero {
    max-width: 1800px;
    width: 100%;
  }

  .universe {
    width: 90%;
  }

  .system {
    width: min(100%, 165cqh);
    --portrait-size: clamp(100px,min(40vw,68cqh),490px);
  }

  .traveler.motion {
    --size: clamp(78px,min(5.7vw,12cqh),94px);
  }

  .traveler.graphic {
    --size: clamp(68px,min(5vw,10.5cqh),82px);
  }

  .traveler.web {
    --size: clamp(82px,min(6vw,12.6cqh),98px);
  }

  .traveler.ai {
    --size: clamp(62px,min(4.5vw,9.5cqh),74px);
  }

  .planet-label {
    font-size: clamp(14.67px, 1vw, 17px);
    width: clamp(176px, 12vw, 208px);
  }
}

@media (max-width: 1000px), (max-height: 700px) {
  .planet-label {
    font-size: clamp(12px, 1.4vw, 13px);
    line-height: 1.35;
    transition: transform 0.4s, opacity 0.2s;
    width: clamp(96px, 15vw, 144px);
  }

  .explore {
    font-size:12px;
    line-height: 1.3;
    margin-top: 5px;
  }

  .system:has(.traveler.active) .traveler:not(.active) .planet-label {
    opacity: 0;
  }

  .details article > span {
    font-size: clamp(14px, 2.4vw, 20px);
  }

  .details p {
    font-size: clamp(12px, 1.6vw, 14px);
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::before,
  ::after {
    animation: auto ease 0s 1 normal none running none !important;
    transition: none !important;
  }

  .system {
    will-change: auto;
  }
}

/* Personal wordmark follows the existing portrait without affecting orbit geometry. */
.orbit-wordmark { position:absolute; bottom:calc(100% - clamp(12px, 2.5vh, 24px)); left:50%; transform:translateX(-50%); margin:0 0 12px; color:var(--text,#f0f0e9); font-size:clamp(44px,8vw,116px); font-weight:700; line-height:.9; letter-spacing:-.065em; white-space:nowrap; pointer-events:none; }
@media(max-height:500px) { .orbit-wordmark { font-size:clamp(30px,8vh,48px); margin-bottom:6px; } }

/* The shared full-viewport star layer replaces the old scene-only stars. */
.starfield { display:none; }

/* Keep the Graphic focus cue on the cube, not its overflowing label/hit area. */
.traveler.graphic > .planet { outline:none; }
.traveler.graphic > .planet:focus-visible::after {
  content:"";
  position:absolute;
  inset:-7px;
  border:2px solid #8DE8AC;
  border-radius:50%;
  pointer-events:none;
}
@media(forced-colors:active) {
  .traveler.graphic > .planet:focus-visible::after { border-color:Highlight; }
}

/* Initial orbit projection matches renderer.js before deferred initialization. */
.traveler.motion{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.1220760),calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.0333991)) scale(0.8875952);--label-scale:1.1266397;z-index:920;}
.traveler.graphic{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.1873866),calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.0341420)) scale(0.8850950);--label-scale:1.1298223;z-index:918;}
.traveler.web{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.3116874),calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.0852754)) scale(1.2869948);--label-scale:0.7770039;z-index:1140;}
.traveler.ai{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.4040650),calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.0986549)) scale(1.3320232);--label-scale:0.7507376;z-index:1157;}
@media(max-width:600px){
.traveler.motion{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.1085295),calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.0296929)) scale(0.9000684);--label-scale:1.1110266;z-index:930;}
.traveler.graphic{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.1666449),calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.0303628)) scale(0.8978137);--label-scale:1.1138168;z-index:928;}
.traveler.web{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * -0.2639218),calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.0722071)) scale(1.2430134);--label-scale:0.8044966;z-index:1123;}
.traveler.ai{transform:translate(calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.3403181),calc(var(--initial-scene-width,min(100cqw,145cqh)) * 0.0830907)) scale(1.2796419);--label-scale:0.7814686;z-index:1138;}
}

@media(min-width:1200px) and (min-height:701px){.system{--initial-scene-width:min(100cqw,165cqh);}}

/* AI controls remain real links when scripts are delayed or unavailable. */
a.planet,a.discipline-button{text-decoration:none;color:inherit}

/* Quiet contact details beneath the homepage wordmark. */
.orbit-contact { display:flex; flex-direction:column; align-items:center; gap:4px; margin-top:12px; font-size:clamp(12px,1.3vw,16px); font-weight:400; letter-spacing:.02em; line-height:1.35; color:#9297a3; }
.orbit-contact a { pointer-events:auto; }
.orbit-contact a:hover,.orbit-contact a:focus-visible { color:var(--text); }
@media(max-height:500px) { .orbit-contact { margin-top:6px; gap:2px; font-size:12px; } }
