/* ==========================================================================
   Meagan Swenson: portfolio
   1. Fonts           5. Floating objects   9. Profile & education
   2. Tokens & base   6. Layout & cards    10. Jobs & skills
   3. Scene layers    7. Lobby console     11. Quotes, log, space & footer
   4. HUD             8. Stats             12. Responsive & motion
   ========================================================================== */

/* 1. Fonts (self-hosted variable fonts, SIL Open Font License) ----------- */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-latin.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-latin-ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/figtree-latin.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* 2. Tokens & base ------------------------------------------------------- */

:root {
  /* --fg and --halo are updated by main.js as the sky darkens */
  --fg: #10233a;
  --halo: rgba(255, 255, 255, 0.55);
  --card: #fffdf8;
  --ink: #10233a;
  --soft: #4a5a6c;
  --line: #e3ddd0;
  --accent: #8ac800;
  --teal: #4a7300;
  --display: "Bricolage Grotesque", sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: clip;
}

body {
  /* relative so the absolutely positioned scene layers are clipped to the
     viewport width instead of widening the page on phones */
  position: relative;
  margin: 0;
  font: 16px/1.6 var(--body);
  color: var(--fg);
  /* main.js paints the live sky on #sky; this is the no-JS fallback and keeps
     the white closing text on a dark background */
  background: #9ed3f0 linear-gradient(#9ed3f0, #4a7fc4 30%, #14286a 60%, #03050e 92%);
}

h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  line-height: 1.05;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  padding: 8px 12px;
  background: #fff;
  color: #000;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* 3. Scene layers -------------------------------------------------------- */

#sky {
  position: fixed;
  inset: 0;
  z-index: -2;
}

#stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}
#stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
}

#moon {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: -1;
  width: 100%;
  aspect-ratio: 1400 / 483;
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%);
  background: center bottom / 100% 100% no-repeat;
}
/* the image is only requested once the visitor gets close to space */
#moon.show {
  background-image: url(../images/moon.webp);
}

/* empty full-width layers that JS fills with decoration */
#objs,
#bounds,
#bgclouds,
#behind,
#frontfx {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  pointer-events: none;
}
#objs,
#frontfx {
  z-index: 4;
}
#bounds,
#bgclouds,
#behind {
  z-index: 0;
}

/* grass ceiling with peeking pets */
#grass {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  aspect-ratio: 1800 / 316;
  overflow: hidden;
  pointer-events: none;
}
#grass .gl {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url(../images/grass.webp) center top / 100% 100% no-repeat;
}
#grass .pet {
  position: absolute;
  z-index: 1;
  height: auto;
  transform-origin: 50% 0;
  animation: peek 5.4s cubic-bezier(0.3, 0.7, 0.4, 1) both;
}
#grass .dog {
  left: 31.028%;
  top: 47.709%;
  width: 11.083%;
}
#grass .cat {
  left: 42.111%;
  top: 52.133%;
  width: 4.556%;
  animation-delay: 0.35s;
}
@keyframes peek {
  0%,
  12% {
    transform: translateY(-135%);
  }
  21% {
    transform: translateY(5%);
  }
  25% {
    transform: translateY(0) rotate(0);
  }
  31% {
    transform: rotate(11deg);
  }
  37% {
    transform: rotate(-11deg);
  }
  43% {
    transform: rotate(9deg);
  }
  49% {
    transform: rotate(-7deg);
  }
  54% {
    transform: rotate(0);
  }
  63%,
  76% {
    transform: translateY(-135%);
  }
  87% {
    transform: translateY(6%);
  }
  93% {
    transform: translateY(-1.5%);
  }
  100% {
    transform: translateY(0);
  }
}

/* meteor shower next to the closing heading */
#meteors {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 600px;
  aspect-ratio: 760 / 531;
  pointer-events: none;
  opacity: 0;
}
/* hidden until main.js has moved it next to the closing heading; otherwise a
   slow page renders it at the top first and its lazy images load early */
#meteors:not(.placed) {
  display: none;
}
#meteors img {
  position: absolute;
  height: auto;
  animation: mfall var(--md) linear infinite;
  animation-delay: var(--mdl);
}
#meteors .m1 {
  left: -6.24%;
  top: 16.86%;
  width: 91.75%;
  aspect-ratio: 697 / 469;
  --md: 4.2s;
  --mdl: -1.1s;
  --sx: 39px;
  --sy: -24px;
  --ex: -39px;
  --ey: 24px;
}
#meteors .m2 {
  left: 29.73%;
  top: 11.6%;
  width: 57.24%;
  aspect-ratio: 435 / 275;
  --md: 3.1s;
  --mdl: -2.3s;
  --sx: 51px;
  --sy: -32px;
  --ex: -51px;
  --ey: 32px;
}
#meteors .m3 {
  left: 43.92%;
  top: 40.71%;
  width: 49.54%;
  aspect-ratio: 376 / 228;
  --md: 3.6s;
  --mdl: -0.4s;
  --sx: 44px;
  --sy: -28px;
  --ex: -44px;
  --ey: 28px;
}
#meteors .m4 {
  left: 59.88%;
  top: 15.53%;
  width: 41.45%;
  aspect-ratio: 315 / 184;
  --md: 2.6s;
  --mdl: -1.7s;
  --sx: 56px;
  --sy: -35px;
  --ex: -56px;
  --ey: 35px;
}
#meteors .m5 {
  left: 61.98%;
  top: 0.94%;
  width: 30.69%;
  aspect-ratio: 233 / 130;
  --md: 3.3s;
  --mdl: -2.9s;
  --sx: 49px;
  --sy: -31px;
  --ex: -49px;
  --ey: 31px;
}
@keyframes mfall {
  0% {
    transform: translate(var(--sx), var(--sy));
    opacity: 0;
  }
  14%,
  78% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--ex), var(--ey));
    opacity: 0;
  }
}

/* atmosphere boundary lines */
.bnd {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px dashed color-mix(in srgb, var(--fg) 50%, transparent);
}
.bnd span {
  position: absolute;
  left: max(16px, calc(50% - 560px));
  top: 6px;
  font: 500 11px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  text-shadow: 0 0 8px var(--halo);
}

/* drifting background clouds */
.bgc {
  position: absolute;
  height: auto;
  animation: bgdrift var(--d) ease-in-out infinite alternate;
  animation-delay: var(--dl);
}
.bgc.far {
  filter: blur(1px);
}
.bgc.flip {
  transform: scaleX(-1);
}
@keyframes bgdrift {
  to {
    translate: var(--dx) 0;
  }
}

/* noctilucent clouds in the mesosphere */
.nlc {
  position: absolute;
  left: 0;
  right: 0;
  height: 300px;
  pointer-events: none;
}
.wisp {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  background: radial-gradient(
    ellipse at center,
    rgba(150, 230, 255, 0.5),
    rgba(90, 175, 255, 0.2) 45%,
    transparent 72%
  );
  animation: nlc 14s ease-in-out infinite alternate;
}
@keyframes nlc {
  0% {
    opacity: 0.45;
    transform: translateX(-12px);
  }
  100% {
    opacity: 0.9;
    transform: translateX(14px);
  }
}

/* 4. HUD ----------------------------------------------------------------- */

#hud {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  pointer-events: none;
}

#read {
  position: fixed;
  /* starts just under the grass (61% of its 316/1800 height); main.js then
     keeps it there while scrolling */
  top: max(16px, calc(10.71vw + 14px));
  right: 76px;
  text-align: right;
  line-height: 1.25;
  font-family: var(--mono);
  font-weight: 400;
  text-shadow: 0 0 8px var(--halo);
  transition: color 0.2s;
}
#read .lbl,
#rows dt {
  opacity: 0.62;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
#alt {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
#alt small {
  margin-left: 6px;
  font-size: 14px;
  opacity: 0.62;
}
#read hr {
  margin: 10px 0 8px;
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.35;
}
#rows {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 14px;
  justify-content: end;
  margin: 0;
  font-size: 12.5px;
}
#rows dt {
  font-size: 10.5px;
  align-self: center;
}
#rows dd {
  margin: 0;
}
#stat::before {
  content: "● ";
  color: var(--accent);
}
#cap {
  max-width: 24ch;
  margin: 10px 0 0 auto;
  font: 500 13px/1.4 var(--body);
  opacity: 0.9;
}

#ruler {
  position: fixed;
  top: 24px;
  bottom: 28px;
  right: 20px;
  z-index: 20;
  width: 24px;
  color: var(--fg);
  border-right: 1.5px solid currentColor;
  opacity: 0.75;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 10%) right top / 20px
      calc(100% + 1px) no-repeat,
    repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 2%) right top / 9px
      calc(100% + 1px) no-repeat;
}
#ruler i {
  position: absolute;
  right: 26px;
  transform: translateY(-50%);
  font: 400 10.5px var(--mono);
  font-style: normal;
}

#ptr {
  position: fixed;
  top: 24px;
  right: 19px;
  z-index: 21;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 13px solid var(--accent);
  transform: translateY(-50%);
  pointer-events: none;
}

/* "back to top" badge that appears once the hero name scrolls away */
#badge {
  position: fixed;
  top: 14px;
  left: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  text-shadow: 0 0 8px var(--halo);
  opacity: 0;
  transform: translateY(-14px) scale(0.85);
  transform-origin: left top;
  transition:
    opacity 0.35s,
    transform 0.35s,
    color 0.2s;
  pointer-events: none;
}
#badge.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
#badge img {
  width: auto;
  height: 88px;
  animation: float 7s ease-in-out infinite;
}
#badge b {
  display: block;
  font: 800 21px/1.02 var(--display);
}
#badge small {
  display: block;
  margin-top: 4px;
  font: 500 12.5px var(--body);
  opacity: 0.8;
}

/* 5. Floating objects ---------------------------------------------------- */

.obj {
  position: absolute;
  left: calc(var(--x) - var(--w) / 2);
  width: var(--w);
  margin: 0;
  will-change: translate;
}
.obj img,
.obj svg {
  display: block;
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}
.obj svg {
  overflow: visible;
}
.obj.skydiver img {
  animation: sdwobble 3.2s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  50% {
    transform: translate(6px, -9px) rotate(-1.5deg);
  }
}
@keyframes sdwobble {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(6deg) translateY(-6px);
  }
}

/* weather balloon that swells and pops as it rises */
.wbx {
  position: relative;
  animation: float 6s ease-in-out infinite;
}
.obj.wballoon img {
  animation: none;
}
.wbt {
  scale: var(--s, 1);
  transform-origin: 50% 100%;
  transition: scale 0.15s;
}
.wbx .burst {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  animation: none;
}
.wballoon .burst {
  display: none;
}
.wballoon.popped .burst {
  display: block;
}
.wballoon.popped .wbt {
  visibility: hidden;
}

/* 6. Layout & cards ------------------------------------------------------ */

main {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

.floor {
  position: relative;
  z-index: 0;
  padding: 40px 0;
  /* keep anchored sections clear of the fixed badge */
  scroll-margin-top: 60px;
}
.tag {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.9;
}
.floor > .tag,
.floor > h2 {
  text-shadow: 0 0 14px var(--halo);
}
.floor > h2 {
  max-width: 18ch;
  margin-bottom: 18px;
  font-size: clamp(32px, 5vw, 50px);
}

.card {
  position: relative;
  z-index: 1;
  padding: 30px;
  border-radius: 18px;
  border-top: 4px solid var(--acc, transparent);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}
.card + .card {
  margin-top: 22px;
}
.card h3.sm {
  margin-bottom: 8px;
  font-size: 22px;
}

/* cards change material with altitude: frosted, then dark glass */
.card.t1 {
  --card: rgba(255, 253, 248, 0.76);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
}
.card.t2,
.card.t3 {
  --ink: #eef3ff;
  --soft: #d9e0f2;
  --line: rgba(255, 255, 255, 0.14);
  --chipbg: rgba(138, 200, 0, 0.18);
  --chipfg: #d6f39a;
  --projbg: rgba(138, 200, 0, 0.11);
  --teal: #d2f08a;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.card.t2 {
  --card: rgba(22, 34, 78, 0.7);
}
.card.t3 {
  --card: rgba(8, 12, 34, 0.68);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.two .card + .card {
  margin-top: 0;
}

/* 7. Lobby console ------------------------------------------------------- */

#lobby {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: min(calc(17.6vw + 24px), 340px) 0 40px;
}
#lobby h1 {
  font-size: clamp(54px, 12vw, 132px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
}
.photo {
  width: auto;
  height: clamp(190px, 24vw, 290px);
  animation: float 7s ease-in-out infinite;
}

/* toy cockpit: screen, contact buttons, switches and launch lever */
.console {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  max-width: none;
  margin-top: 26px;
  padding: 22px;
  border-radius: 26px;
  color: var(--ink);
  --rivet: radial-gradient(circle at 30% 30%, #fff 0 1.5px, #b5bcc7 2.5px 4px, transparent 4.5px);
  background:
    var(--rivet) left 9px top 9px / 16px 16px no-repeat,
    var(--rivet) right 9px top 9px / 16px 16px no-repeat,
    var(--rivet) left 9px bottom 9px / 16px 16px no-repeat,
    var(--rivet) right 9px bottom 9px / 16px 16px no-repeat,
    linear-gradient(#fffdf8 0%, #fffdf8 88%, #eef0f3 100%);
  box-shadow:
    0 8px 0 #b3bac5,
    0 22px 36px rgba(16, 35, 58, 0.25),
    inset 0 2px 0 #fff;
}

.screen {
  position: relative;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(170deg, #eaf7ff, #cfe8fa);
  box-shadow:
    inset 0 0 0 3px #b9d8f0,
    inset 0 6px 14px rgba(255, 255, 255, 0.9),
    inset 0 -6px 14px rgba(70, 130, 190, 0.12);
}
.screen::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 40%;
  top: 8px;
  height: 16px;
  border-radius: 12px;
  background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.brief {
  margin-bottom: 6px;
  font: 500 11px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4c79b0;
}
.screen .role {
  margin: 0;
  font: 800 20px/1.2 var(--display);
  color: #10233a;
}
.screen .lede {
  max-width: none;
  margin: 10px 0 0;
  font: 400 15.5px/1.6 var(--body);
  color: #22384f;
}
.sline {
  min-height: 1.4em;
  margin-top: 12px;
  font: 500 12.5px var(--mono);
  color: #3d6f00;
}
.cur {
  display: inline-block;
  width: 8px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -2px;
  border-radius: 2px;
  background: #6aa300;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.clabel,
.loc span {
  font: 500 10.5px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #687384;
}
.btns {
  display: grid;
  gap: 10px;
}
.cbtn {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  color: #10233a;
  text-decoration: none;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.cbtn:nth-child(1) {
  background: linear-gradient(#c6f25a, #95cf1c);
  box-shadow:
    0 5px 0 #6a9a0c,
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.cbtn:nth-child(2) {
  background: linear-gradient(#9fd8ff, #5fb2ef);
  box-shadow:
    0 5px 0 #3b84bd,
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.cbtn:nth-child(3) {
  background: linear-gradient(#ffc977, #f59b2f);
  box-shadow:
    0 5px 0 #c06e12,
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.cbtn:nth-child(4) {
  background: linear-gradient(#ffffff, #e1e6ec);
  box-shadow:
    0 5px 0 #a7afbb,
    inset 0 2px 0 #fff;
}
.cbtn i {
  grid-row: span 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.45),
    0 0 10px #fff;
}
.cbtn:nth-child(4) i {
  background: var(--accent);
  box-shadow:
    0 0 0 3px rgba(138, 200, 0, 0.25),
    0 0 8px var(--accent);
}
.cbtn b {
  font: 800 15px var(--display);
}
.cbtn small {
  font: 500 12px var(--body);
  color: #1d3149;
  opacity: 0.85;
  word-break: break-all;
}
.cbtn:hover {
  filter: brightness(1.05);
}
.cbtn:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.loc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 12px;
  background: linear-gradient(#eaf7ff, #d6ecfb);
  color: #10233a;
  font: 600 13px var(--body);
  box-shadow: inset 0 0 0 2px #b9d8f0;
}

.deck {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 24px;
  padding-top: 16px;
  border-top: 2px solid #dfe3e9;
}
.sw,
.lever {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: #3b4554;
  font: 500 11.5px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.tog {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 14px;
  background: #cdd3dc;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: background 0.18s;
}
.tog::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e4e8ee);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
  transition: left 0.18s;
}
.sw.on .tog {
  background: linear-gradient(#b6ec3f, #86c414);
}
.sw.on .tog::after {
  left: 23px;
}
.lever {
  margin-left: auto;
}
.track {
  position: relative;
  width: 18px;
  height: 56px;
  border-radius: 10px;
  background: #cdd3dc;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}
.knob {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 34px;
  height: 22px;
  margin-left: -17px;
  border-radius: 11px;
  background: radial-gradient(circle at 35% 30%, #ffb38a, #ef5a2a);
  box-shadow:
    0 4px 0 #a7381a,
    0 6px 10px rgba(0, 0, 0, 0.2);
  transition: top 0.35s cubic-bezier(0.5, 1.6, 0.5, 1);
}
.lever.pulled .knob {
  top: 30px;
}

/* 8. Stats --------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stats .card {
  margin-top: 0;
}
.stat {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 20px;
}
.stat b {
  display: block;
  padding-right: 44px;
  font: 800 clamp(30px, 3.4vw, 42px)/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat span {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-size: 14.5px;
  line-height: 1.4;
}
.gauge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 50px;
  height: 30px;
}
.gauge .trk,
.gauge .val {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}
.gauge .trk {
  stroke: var(--line);
}
.gauge .val {
  stroke: var(--accent);
}
.gauge line {
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* 9. Profile & education ------------------------------------------------- */

.card.profile {
  display: flow-root;
}
.headshot {
  float: right;
  width: 158px;
  height: 158px;
  margin: 0 0 14px 22px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 3px var(--accent),
    0 8px 20px rgba(16, 35, 58, 0.18);
  shape-outside: circle(50%);
  shape-margin: 12px;
}
.gwrap {
  float: right;
  width: 132px;
  height: 158px;
  margin: 0 -30px -30px 18px;
  overflow: hidden;
  border-bottom-right-radius: 18px;
  shape-outside: inset(0 0 0 0);
}
.george {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 300 / 530;
}

#ground .two {
  margin-top: 22px;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border: 0;
}
.row em {
  font-family: var(--mono);
  font-size: 14px;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--soft);
  white-space: nowrap;
}
.row small {
  display: block;
  color: var(--soft);
}
.certs .row > div {
  font-size: 14.5px;
  line-height: 1.4;
}
.certs .row small {
  font-size: 12.5px;
}

.card.langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 34px;
  margin-top: 22px;
  padding: 16px 30px;
}
.langs .lt {
  margin-right: 6px;
  font: 500 11px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.lg {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lg b {
  font-weight: 600;
}
.lg em {
  font: normal 400 12.5px var(--mono);
  color: var(--soft);
}
.sig {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.sig i {
  width: 5px;
  border-radius: 2px;
  background: var(--line);
}
.sig i:nth-child(1) {
  height: 30%;
}
.sig i:nth-child(2) {
  height: 45%;
}
.sig i:nth-child(3) {
  height: 60%;
}
.sig i:nth-child(4) {
  height: 80%;
}
.sig i:nth-child(5) {
  height: 100%;
}
.sig i.on {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(138, 200, 0, 0.5);
}

/* 10. Jobs & skills ------------------------------------------------------ */

.job h3 {
  font-size: 30px;
}
.job .co {
  color: var(--soft);
  font-weight: 500;
}
.job .role2 {
  margin: 6px 0 2px;
  font-weight: 600;
}
.job .when {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal);
}
.job ul {
  margin: 16px 0;
  padding-left: 20px;
}
.job li {
  margin: 5px 0;
}
.job ul.collapsed .extra {
  display: none;
}
.more {
  margin: 2px 0 6px;
  padding: 6px 14px;
  border: 1.5px solid currentColor;
  border-radius: 99px;
  background: none;
  color: var(--teal);
  font: 600 13px var(--mono);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.more:hover {
  background: rgba(138, 200, 0, 0.12);
}

/* project "porthole" capsules */
.proj {
  position: relative;
  margin-top: 14px;
  padding: 14px 20px;
  border: 1.5px solid var(--accent);
  border-radius: 26px;
  background: var(--projbg, #eef6d3);
}
.proj h4 {
  margin: 0 0 2px;
  font: 700 17px/1.6 var(--display);
}
.proj p {
  margin: 0;
}
.plab {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.plab::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.stack span,
.grp span {
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--chipbg, #e4f1b9);
  color: var(--chipfg, #3a5900);
  font-size: 13.5px;
  font-weight: 500;
}

.grp + .grp {
  margin-top: 18px;
}
.grp h3 {
  margin: 0 0 8px;
  font: 600 15px var(--body);
  color: var(--soft);
}
.grp div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.grp.hi {
  padding: 14px 16px;
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  background: rgba(138, 200, 0, 0.08);
}

/* 11. Quotes, log, space & footer ---------------------------------------- */

blockquote {
  margin: 0;
  font-size: 17px;
}
blockquote footer {
  margin-top: 14px;
  font-weight: 600;
}
blockquote footer span {
  display: block;
  color: var(--soft);
  font-size: 14px;
  font-weight: 400;
}

/* mission log: how this site was built */
#build .intro {
  max-width: 52ch;
  margin: -6px 0 22px;
  font-size: 17px;
  text-shadow: 0 0 14px var(--halo);
}
.log {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.log .card {
  margin-top: 0;
  padding: 22px 22px 24px;
}
.log h3 {
  margin: 6px 0 8px;
  font-size: 19px;
  line-height: 1.2;
}
.log p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
.devlink {
  margin: 20px 0 0;
  font-weight: 600;
}
.devlink a {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

#space .card {
  padding: 0;
  background: transparent;
  color: #f2f6ff;
  box-shadow: none;
}
#space h2 {
  max-width: none;
  font-size: clamp(38px, 7vw, 76px);
}
#space p {
  max-width: 48ch;
  margin: 18px 0 10px;
  font-size: 18px;
}
.big {
  display: inline-block;
  margin: 10px 18px 0 0;
  padding: 12px 22px;
  border-radius: 12px;
  background: #f2f6ff;
  color: #0a1226;
  font: 600 20px var(--display);
  text-decoration: none;
}
.big:hover {
  background: var(--accent);
  color: #0a1226;
}

body > footer {
  position: relative;
  z-index: 1;
  padding: 40px 0 60px;
  color: #f4f7ff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 0 10px rgba(0, 0, 0, 0.6);
}

/* 12. Responsive & motion ------------------------------------------------ */

/* the full readout only fits beside the 920px column on wide screens */
@media (max-width: 1439px) {
  #read hr,
  #rows,
  #cap {
    display: none;
  }
  #read {
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(120, 135, 160, 0.16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

@media (max-width: 1279px) {
  #badge span {
    display: none;
  }
}

/* below this the ruler would sit on top of the cards */
@media (max-width: 1100px) {
  #ruler,
  #ptr {
    display: none;
  }
  #read {
    right: 16px;
  }
}

@media (max-width: 820px) {
  #lobby {
    padding-top: calc(17.6vw + 52px);
  }
  #read {
    top: max(12px, calc(10.71vw + 14px));
  }
  #alt {
    font-size: 26px;
  }
  #moon {
    left: -40vw;
    width: 180vw;
  }
  #badge {
    top: 10px;
    left: 12px;
    gap: 8px;
  }
  #badge img {
    height: 54px;
  }
  .obj {
    left: calc(var(--x) - var(--w) * 0.3);
    width: calc(var(--w) * 0.6);
  }
  body > footer {
    padding: 24px 16px 18px;
  }
}

@media (max-width: 900px) {
  .log {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .console {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .lever {
    margin-left: 0;
  }
  .screen .role {
    font-size: 18px;
  }
  .two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .log {
    grid-template-columns: 1fr;
  }
  .headshot {
    width: 112px;
    height: 112px;
  }
  .gwrap {
    width: 84px;
    height: auto;
    margin: 4px 0 6px 12px;
    border-radius: 0;
  }
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

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