/* Cloud Rail Core & Portfolio Theme */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap');

html,body,#root{width:100%;height:100%;margin:0}
:root{
  --cream:#fbf4e4;
  --muted:#d8e0d9;
  --green:#d8edbd;
  --ink:#283e3b;
  --gold:#f4cf8c;
  --accent:#7ebfa8;
  --line:rgba(248,246,230,.2);
  --glass-bg:rgba(26, 42, 45, 0.72);
  --glass-border:rgba(248, 246, 230, 0.18);
  font-family:'DM Sans', sans-serif;
  color:var(--cream);
  font-synthesis:none;
}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#4a6372}
body{overscroll-behavior:none}
button,select{font:inherit}
button{cursor:pointer;-webkit-tap-highlight-color:transparent;border:0}
button:disabled{cursor:default}
button:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:5px}
button,dialog{color:inherit}
button{touch-action:manipulation}
button svg{pointer-events:none}
[hidden]{display:none!important}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.icon-defs{position:absolute;width:0;height:0;overflow:hidden}

#world{position:fixed;inset:0;touch-action:none}
#world canvas{display:block;width:100%;height:100%}
.shade{position:fixed;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(28,41,64,.28),transparent 29%,transparent 61%,rgba(19,42,46,.1) 73%,rgba(17,38,44,.5));z-index:1}
.vignette{position:fixed;inset:0;pointer-events:none;box-shadow:inset 0 0 150px #2a2f401f;z-index:1}

.hud{position:fixed;inset:0;z-index:4;pointer-events:none;transition:opacity .5s}
.hud button,.hud select{pointer-events:auto}
.topbar{position:absolute;left:38px;right:38px;top:26px;display:flex;justify-content:space-between;align-items:center;z-index:10}
.brand{display:flex;gap:13px;align-items:center}
.brand-mark{width:42px;height:47px;stroke-width:1.1;color:var(--green)}
.brand-name{font-family:'Fraunces',Georgia,serif;font-size:31px;letter-spacing:-1.3px;line-height:1.08;color:var(--cream)}
.brand-tagline{font-size:8px;letter-spacing:2.4px;margin-top:6px;font-weight:600;opacity:.78;color:var(--gold)}

/* Topbar Portfolio Navigation */
.portfolio-nav{
  display:flex;
  align-items:center;
  gap:6px;
  background:rgba(23, 38, 41, 0.65);
  border:1px solid rgba(248, 246, 230, 0.16);
  padding:5px 8px;
  border-radius:24px;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  pointer-events:auto;
}
.nav-pill{
  background:transparent;
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  padding:6px 13px;
  border-radius:18px;
  transition:all .2s ease;
  letter-spacing:.3px;
}
.nav-pill:hover{
  background:rgba(248, 246, 230, 0.12);
  color:var(--cream);
  transform:translateY(-1px);
}
.nav-pill.active{
  background:var(--green);
  color:#1b3329;
  font-weight:600;
}

/* Mode Switch Pill */
.mode-switch-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:rgba(32, 54, 56, 0.85);
  border:1px solid rgba(216, 237, 189, 0.4);
  padding:8px 14px;
  border-radius:20px;
  font-size:11px;
  font-weight:600;
  color:var(--green);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  transition:all .25s ease;
  pointer-events:auto;
}
.mode-switch-pill svg{width:15px;height:15px}
.mode-switch-pill:hover{
  background:rgba(42, 70, 72, 0.95);
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(0,0,0,.25);
}
.mode-switch-pill.drive-mode{
  background:rgba(44, 62, 55, 0.85);
  border-color:var(--gold);
  color:var(--gold);
}

/* Theme Switch Pill (Day / Night) */
button.theme-switch-pill,
.theme-switch-pill{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  background:rgba(32, 48, 54, 0.88) !important;
  border:1px solid rgba(244, 207, 140, 0.45) !important;
  padding:8px 14px !important;
  border-radius:20px !important;
  font-size:11px !important;
  font-weight:600 !important;
  color:var(--gold) !important;
  backdrop-filter:blur(16px) !important;
  -webkit-backdrop-filter:blur(16px) !important;
  transition:all .3s ease !important;
  pointer-events:auto !important;
  cursor:pointer !important;
  outline:none !important;
  box-shadow:0 4px 14px rgba(0,0,0,.25) !important;
  line-height:1 !important;
  font-family:inherit !important;
  -webkit-appearance:none !important;
  appearance:none !important;
}
button.theme-switch-pill svg,
.theme-switch-pill svg{
  width:15px !important;
  height:15px !important;
  stroke:currentColor !important;
  fill:none !important;
  display:inline-block !important;
  vertical-align:middle !important;
  transition:transform .4s ease !important;
}
button.theme-switch-pill:hover,
.theme-switch-pill:hover{
  background:rgba(42, 62, 70, 0.95) !important;
  border-color:rgba(244, 207, 140, 0.75) !important;
  transform:translateY(-1px) scale(1.02) !important;
  box-shadow:0 6px 16px rgba(244, 207, 140, 0.2) !important;
}
button.theme-switch-pill.is-night,
.theme-switch-pill.is-night{
  background:rgba(22, 34, 52, 0.92) !important;
  border-color:rgba(164, 214, 255, 0.45) !important;
  color:#c7e1ff !important;
  box-shadow:0 0 15px rgba(130, 180, 255, 0.25) !important;
}
button.theme-switch-pill.is-night:hover,
.theme-switch-pill.is-night:hover{
  background:rgba(30, 46, 70, 0.96) !important;
  border-color:rgba(164, 214, 255, 0.75) !important;
  box-shadow:0 6px 20px rgba(130, 180, 255, 0.35) !important;
}

/* Night Mode Butter-Smooth Background and Theme Transitions */
body{
  transition:background 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.night-mode{
  background:#09121e !important;
}

body.night-mode .story-card{
  background:rgba(10, 18, 28, 0.38);
  border-color:rgba(164, 214, 255, 0.22);
  box-shadow:0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 30px rgba(70, 110, 160, 0.12);
}
body.night-mode .project-item{
  background:rgba(8, 14, 24, 0.35);
  border-color:rgba(164, 214, 255, 0.18);
}
body.night-mode .skill-group,
body.night-mode .contact-box{
  background:rgba(8, 14, 24, 0.32);
  border-color:rgba(164, 214, 255, 0.15);
}
body.night-mode .primary-pill{
  background:#86c5ff;
  color:#0b1d33;
}
body.night-mode .primary-pill:hover{
  background:#b4dcff;
}

.top-actions{display:flex;align-items:center;gap:16px}
.fund,.streak{display:flex;align-items:center;gap:10px}
.fund>svg{color:var(--gold);width:22px;height:22px}
.streak>svg{color:var(--green);width:21px;height:23px}
.counter-value{font-size:18px;line-height:1.2;font-weight:550;font-variant-numeric:tabular-nums}
.counter-label{font-size:8px;letter-spacing:1.65px;opacity:.65;margin-top:5px}
.counter-divider{height:30px;width:1px;background:var(--line)}
.utility-buttons{display:flex;gap:8px;margin-left:4px}
.icon-button{
  width:39px;height:39px;
  border:1px solid rgba(249,245,231,.24);
  background:#2b3a4635;
  border-radius:50%;
  display:grid;place-items:center;
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  transition:background .2s,transform .2s;
}
.icon-button:hover{background:#f8f6e62b;transform:translateY(-2px)}
.icon-button svg{width:17px;height:17px}

/* Hidden elements: remove destination text design, world-note, and power/brake buttons */
.destination,
.world-note,
.controls-section,
.drive-buttons {
  display: none !important;
}

#driving-hud.story-active .lower-ui,
#driving-hud.story-active .footer {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(24px);
  transition: opacity .4s ease, transform .4s ease;
}

.eyebrow{font-size:9px;font-weight:550;letter-spacing:2.4px;display:flex;align-items:center;gap:8px}
.live-dot{width:5px;height:5px;border-radius:50%;background:var(--green);box-shadow:0 0 12px #d8edbd40}
.destination .next-label{font-size:12px;margin:20px 0 3px;opacity:.75}
.destination h1{font-family:'Fraunces',Georgia,serif;font-size:38px;letter-spacing:-1.2px;line-height:1.15;font-weight:400;margin:0}
.distance-row{display:flex;gap:7px;align-items:center;margin-top:12px;font-size:10px;letter-spacing:.4px;opacity:.75}
.distance-row svg{width:13px;height:13px}
.destination-rule{width:31px;height:1px;background:#fff9e573;margin-top:18px}
.world-note{position:absolute;right:41px;top:130px;text-align:right;font-size:10px;letter-spacing:.6px;opacity:.82}
.world-note span{display:block;font-family:'Fraunces',Georgia,serif;font-size:19px;letter-spacing:0;margin-bottom:6px}
.world-note small{font-size:8px;letter-spacing:2px;opacity:.7}

.lower-ui{position:absolute;bottom:42px;left:38px;right:38px;max-width:1400px;margin:auto;transition:transform .4s ease,opacity .4s ease}
.above-dash{display:flex;align-items:flex-end;justify-content:space-between;margin:0 2px 16px;min-height:44px;gap:20px}
.workshop-link,.view-button{
  display:flex;align-items:center;gap:11px;background:#23383b4a;
  border:1px solid rgba(244,246,228,.24);padding:11px 15px;border-radius:9px;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);font-size:11px;
  transition:background .2s,transform .2s;white-space:nowrap
}
.workshop-link:hover,.view-button:hover{background:#23383b8c;transform:translateY(-2px)}
.workshop-link>svg{width:17px;height:17px}
.workshop-link span{display:block;text-align:left}
.workshop-link small{font-size:7px;letter-spacing:1.6px;opacity:.65;display:block;margin-bottom:3px}
.workshop-link .link-arrow{width:13px;height:13px;margin-left:14px;opacity:.7}
.view-button{padding:11px 13px;gap:9px}
.view-button svg{width:16px;height:16px}
.keycap{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border:1px solid rgba(248,245,224,.3);border-radius:4px;font-size:10px;font-weight:500;line-height:1}
.view-button .keycap{margin-left:8px}

#subtitle{align-self:center;max-width:510px;font-size:12px;text-align:center;line-height:1.7;letter-spacing:.15px;text-shadow:0 2px 12px #253e49;transition:opacity .5s,transform .5s;opacity:0;transform:translateY(5px)}
#subtitle.visible{opacity:1;transform:none}
#subtitle small{display:block;font-size:9px;opacity:.75;margin-top:2px}

.dashboard{
  display:grid;grid-template-columns:164px minmax(250px,1fr);gap:32px;align-items:center;
  padding:21px 28px;background:#203739cc;border:1px solid rgba(221,235,215,.22);
  border-radius:15px;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);box-shadow:0 12px 40px #1c2d311f;
  max-width:760px;margin:0 auto;
}
.speed-section{border-right:1px solid var(--line);padding-right:26px}
.speed-main{display:flex;align-items:baseline;gap:9px}
.speed-value{font-size:48px;font-weight:400;letter-spacing:-2.5px;line-height:1;font-variant-numeric:tabular-nums}
.speed-unit{font-size:10px;opacity:.65}
.speed-meter{height:2px;width:108px;background:#e1eed921;margin-top:11px;overflow:hidden}
.speed-meter>span{display:block;height:100%;width:0;background:var(--green);transition:width .15s}
.occupancy{display:flex;align-items:center;gap:6px;font-size:10px;opacity:.8;margin-top:12px}
.occupancy svg{width:13px;height:13px}
.occupancy b{font-weight:500;color:var(--cream)}

.journey-section{align-self:center}
.journey-stations{display:flex;align-items:center;justify-content:space-between;font-size:10px;gap:14px}
.journey-stations span:first-child{opacity:.7}
.journey-stations span:last-child{color:var(--cream)}
.route-track{position:relative;height:3px;background:#eaefdb2b;margin:19px 5px 24px;border-radius:4px}
.route-track:before,.route-track:after{content:"";position:absolute;width:7px;height:7px;top:-2px;border-radius:50%;border:1.5px solid #cbdfb6;background:#395653;z-index:1}
.route-track:before{left:-4px}
.route-track:after{right:-4px;border-color:#8a9e8c}
.route-progress{height:100%;width:38%;background:var(--green);border-radius:4px;transition:width .15s linear}
.route-tram{position:absolute;left:38%;top:50%;width:26px;height:21px;transform:translate(-50%,-50%);color:var(--green);background:#36514d;padding:2px 4px;transition:left .15s linear;stroke-width:1.7}
.comfort-row{display:flex;align-items:center;gap:7px;font-size:10px;white-space:nowrap}
.comfort-row>svg{width:13px;height:13px;color:var(--green)}
.comfort-label{opacity:.75}
.comfort-meter{width:66px;height:3px;background:#f3f7e72b;margin-left:3px;border-radius:3px;overflow:hidden}
.comfort-meter>span{display:block;background:var(--green);height:100%;width:96%;transition:width .25s,background .5s}
.comfort-percent{font-size:9px;color:var(--green);font-variant-numeric:tabular-nums}
.arrival-bonus{margin-left:auto;color:var(--gold);font-size:9px}
.arrival-bonus b{font-weight:500}

.controls-section{border-left:1px solid var(--line);padding-left:28px}
.controls-heading{display:flex;justify-content:space-between;align-items:center;font-size:8px;letter-spacing:1.6px;margin-bottom:10px;opacity:.65}
.road-condition{display:flex;align-items:center;gap:5px;font-size:9px;letter-spacing:0;color:var(--green);opacity:1}
.road-condition svg{width:12px;height:12px}
.drive-buttons{display:flex;gap:9px}
.drive-button{
  height:49px;display:flex;align-items:center;justify-content:center;gap:9px;flex:1;
  font-size:12px;font-weight:550;border-radius:7px;border:1px solid rgba(231,235,212,.27);
  transition:transform .12s,background .15s,box-shadow .15s;user-select:none;touch-action:none
}
.drive-button .keycap{width:22px;height:23px;font-size:10px}
.brake-button{background:#ffffec0b;color:var(--cream)}
.power-button{background:var(--green);color:#2e473d;border-color:var(--green)}
.power-button .keycap{border-color:#2346303d}
.brake-button:hover{background:#ffffec1f}
.power-button:hover{background:#e6f5d3}
.drive-button.is-held{transform:translateY(2px);box-shadow:inset 0 2px 9px #10221c3b}
.power-button.is-held{background:#bada9b}
.brake-button.is-held{background:#f7cd9333;border-color:var(--gold)}
.drive-button:disabled{opacity:.45}
.control-hint{font-size:8px;letter-spacing:.4px;opacity:.45;text-align:center;margin-top:9px}

.footer{position:absolute;bottom:15px;left:42px;right:42px;display:flex;justify-content:space-between;font-size:8px;letter-spacing:1.6px;opacity:.57;z-index:2}
.footer-right{display:flex;gap:19px}
.footer-right span{letter-spacing:.5px}
.footer-right b{font-weight:500;letter-spacing:1px;margin-right:5px}

/* ============================================================
   PORTFOLIO STORY OVERLAY (SCROLLING EXPERIENCE)
   ============================================================ */
.portfolio-story-container{
  position:fixed;
  inset:0;
  z-index:3;
  overflow-y:auto;
  overflow-x:hidden;
  scroll-behavior:smooth;
  pointer-events:auto;
  transition:opacity .5s cubic-bezier(0.16, 1, 0.3, 1), visibility .5s;
}

/* Custom Sleek Scrollbar */
.portfolio-story-container::-webkit-scrollbar{
  width:6px;
}
.portfolio-story-container::-webkit-scrollbar-track{
  background:rgba(0, 0, 0, 0.15);
}
.portfolio-story-container::-webkit-scrollbar-thumb{
  background:rgba(216, 237, 189, 0.35);
  border-radius:10px;
}
.portfolio-story-container::-webkit-scrollbar-thumb:hover{
  background:rgba(216, 237, 189, 0.6);
}

/* Hidden state in Free Drive mode */
.portfolio-story-container.drive-mode-active{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.story-scroll-track{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:120px 42px 180px;
  gap:240px;
  max-width:1440px;
  margin:0 auto;
  min-height:650vh;
}

.story-section{
  width:100%;
  max-width:580px;
  min-height:85vh;
  display:flex;
  align-items:center;
}
.story-section#story-projects{
  max-width:820px;
}

.story-card{
  width:100%;
  background:rgba(18, 32, 36, 0.28);
  border:1px solid rgba(248, 246, 230, 0.16);
  border-radius:20px;
  padding:34px 38px;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 16px 45px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.12);
  transition:transform .4s ease, border-color .3s ease, background .3s ease;
}
.story-card:hover{
  background:rgba(18, 32, 36, 0.36);
  border-color:rgba(216, 237, 189, 0.45);
}

.card-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:9px;
  font-weight:600;
  letter-spacing:2px;
  color:var(--green);
  margin-bottom:14px;
}
.card-eyebrow svg{width:13px;height:13px}
.badge-dot{
  width:6px;height:6px;border-radius:50%;background:var(--green);
  box-shadow:0 0 10px #d8edbd;
}

.story-title{
  font-family:'Fraunces',Georgia,serif;
  font-size:46px;
  font-weight:400;
  letter-spacing:-1.8px;
  line-height:1.05;
  margin:0 0 10px;
  color:var(--cream);
}
.story-subtitle{
  font-size:13px;
  font-weight:500;
  color:var(--gold);
  letter-spacing:.3px;
  margin:0 0 18px;
}
.story-text{
  font-size:13px;
  line-height:1.75;
  color:var(--muted);
  margin:0 0 24px;
}

.hero-stats-row{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  padding:16px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  margin-bottom:24px;
}
.hero-stat .stat-num{
  font-size:24px;
  font-weight:600;
  color:var(--green);
  letter-spacing:-.5px;
}
.hero-stat .stat-txt{
  font-size:9px;
  letter-spacing:1px;
  color:var(--muted);
  opacity:.8;
  margin-top:2px;
}

.card-actions{
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:10px;
}
.primary-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--green);
  color:#1e382d;
  font-size:12px;
  font-weight:600;
  padding:12px 22px;
  border-radius:24px;
  transition:all .2s ease;
}
.primary-pill:hover{
  background:#ebf8dc;
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,.25);
}
.inline-arrow{width:14px;height:14px}
.secondary-pill{
  display:inline-flex;
  align-items:center;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.2);
  color:var(--cream);
  font-size:12px;
  font-weight:500;
  padding:12px 20px;
  border-radius:24px;
  transition:all .2s ease;
}
.secondary-pill:hover{
  background:rgba(255,255,255,.16);
  transform:translateY(-2px);
}

.scroll-prompt{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:28px;
  font-size:10px;
  letter-spacing:1px;
  color:var(--muted);
  opacity:.75;
}
.mouse-icon{
  width:16px;height:24px;
  border:1.5px solid var(--muted);
  border-radius:10px;
  display:flex;justify-content:center;padding-top:4px;
}
.wheel-dot{
  width:3px;height:5px;
  background:var(--green);
  border-radius:2px;
  animation:breathe 1.8s infinite;
}

.card-heading{
  font-family:'Fraunces',Georgia,serif;
  font-size:32px;
  font-weight:400;
  letter-spacing:-.8px;
  line-height:1.2;
  margin:0 0 8px;
}
.card-lead{
  font-size:13px;
  font-weight:500;
  color:var(--gold);
  margin:0 0 16px;
}
.card-body{
  font-size:12px;
  line-height:1.8;
  color:var(--muted);
  margin:0 0 20px;
}

.highlights-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:20px;
  border-top:1px solid var(--line);
  padding-top:18px;
}
.highlight-item h4{
  font-size:12px;
  font-weight:600;
  color:var(--cream);
  margin:0 0 4px;
}
.highlight-item p{
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
  margin:0;
}

/* Projects List */
.projects-list{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:16px;
  margin-top:16px;
}
.project-item{
  background:rgba(12, 24, 28, 0.28);
  border:1px solid rgba(248, 246, 230, 0.12);
  border-radius:14px;
  padding:20px;
  display:flex;
  flex-direction:column;
  transition:all .25s ease;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.project-item:hover{
  background:rgba(16, 32, 36, 0.42);
  border-color:rgba(216, 237, 189, 0.35);
  transform:translateY(-2px);
}
.project-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}
.project-badge{
  font-size:8px;
  font-weight:700;
  letter-spacing:1px;
  text-transform:uppercase;
  padding:3px 8px;
  border-radius:12px;
  background:rgba(216, 237, 189, 0.18);
  color:var(--green);
}
.project-category{
  font-size:9px;
  color:var(--muted);
  opacity:.75;
}
.project-title{
  font-family:'Fraunces',Georgia,serif;
  font-size:20px;
  letter-spacing:-.4px;
  margin:0 0 6px;
  color:var(--cream);
  text-shadow:0 1px 6px rgba(0,0,0,0.5);
}
.project-desc{
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
  margin:0 0 14px;
  flex:1;
  text-shadow:0 1px 4px rgba(0,0,0,0.4);
}
.tag-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tech-tag{
  font-size:9px;
  padding:3px 8px;
  border-radius:6px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.1);
  color:var(--muted);
}

/* Skills Column */
.skills-columns{
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  margin-top:18px;
}
.skill-group{
  background:rgba(12, 24, 28, 0.25);
  border:1px solid rgba(248, 246, 230, 0.1);
  border-radius:12px;
  padding:16px;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.skill-group-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:600;
  color:var(--gold);
  margin-bottom:12px;
}
.skill-group-title svg{width:16px;height:16px}
.skill-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.skill-pills .pill{
  font-size:11px;
  padding:6px 12px;
  border-radius:8px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  color:var(--cream);
  font-weight:500;
}

/* Timeline */
.timeline{
  display:flex;
  flex-direction:column;
  gap:18px;
  margin-top:20px;
  border-left:1.5px solid rgba(216, 237, 189, 0.3);
  padding-left:18px;
  margin-left:8px;
}
.timeline-stop{
  position:relative;
}
.stop-dot{
  position:absolute;
  left:-24px;
  top:4px;
  width:10px;height:10px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 8px #d8edbd;
}
.stop-header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
}
.stop-role{
  font-size:13px;
  font-weight:600;
  color:var(--cream);
}
.stop-date{
  font-size:9px;
  color:var(--gold);
  font-weight:500;
}
.stop-place{
  font-size:10px;
  color:var(--muted);
  opacity:.8;
  margin:2px 0 6px;
}
.stop-desc{
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
  margin:0;
  text-shadow:0 1px 4px rgba(0,0,0,0.4);
}

/* Contact Box */
.contact-box{
  background:rgba(12, 24, 28, 0.28);
  border:1px solid rgba(248, 246, 230, 0.12);
  border-radius:14px;
  padding:22px;
  margin-top:20px;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.contact-email{
  display:flex;
  flex-direction:column;
  margin-bottom:16px;
}
.email-label{
  font-size:8px;
  letter-spacing:1.5px;
  color:var(--gold);
  margin-bottom:4px;
}
.email-link{
  font-size:20px;
  font-weight:600;
  color:var(--green);
  text-decoration:none;
  transition:color .2s ease;
}
.email-link:hover{
  color:#ebf8dc;
  text-decoration:underline;
}
.social-links-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.social-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:500;
  color:var(--cream);
  text-decoration:none;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.15);
  padding:8px 14px;
  border-radius:20px;
  transition:all .2s ease;
}
.social-pill svg{width:13px;height:13px}
.social-pill:hover{
  background:rgba(255,255,255,.18);
  transform:translateY(-1px);
}
.terminal-note{
  margin-top:24px;
  border-top:1px solid var(--line);
  padding-top:18px;
}
.terminal-note p{
  font-size:11px;
  line-height:1.7;
  color:var(--muted);
  margin:0 0 14px;
}

/* Workshop, Dialog, Toast and System styles */
#toast{position:fixed;top:100px;left:50%;z-index:40;transform:translate(-50%,-12px);background:#233735e6;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(229,239,213,.24);border-radius:9px;padding:13px 20px;max-width:min(520px,90vw);font-size:12px;text-align:center;line-height:1.6;opacity:0;pointer-events:none;transition:opacity .35s,transform .35s}
#toast.show{opacity:1;transform:translate(-50%)}
#toast.warning{color:#f5d3a3;border-color:#f3c47d59}
#toast small{display:block;font-size:10px;opacity:.7}

#loading{position:fixed;inset:0;background:#3c555f;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;transition:opacity 1s,visibility 1s;padding:30px}
#loading.finished{opacity:0;visibility:hidden;pointer-events:none}
.loading-mark{width:65px;height:75px;animation:drift 3s ease-in-out infinite;stroke-width:1;color:var(--green)}
.loading-title{font-family:'Fraunces',Georgia,serif;font-size:53px;letter-spacing:-2px;margin:23px 0 8px;color:var(--cream)}
.loading-tag{font-size:11px;letter-spacing:1px;opacity:.7;color:var(--gold)}
.loading-line{width:130px;height:2px;background:#f9f2e126;margin:34px 0 15px;overflow:hidden}
.loading-line span{display:block;width:20%;height:100%;background:var(--green);transition:width .5s}
#loading-status{font-size:10px;letter-spacing:.6px;opacity:.65;max-width:390px;line-height:1.8}
.retry-button{background:var(--green);color:var(--ink);border-radius:6px;padding:12px 25px;margin-top:23px;font-size:12px}

#transition{position:fixed;inset:0;background:#344c50;z-index:35;opacity:0;pointer-events:none;transition:opacity .55s}
#transition.active{opacity:1;pointer-events:auto}

dialog{border:1px solid rgba(243,240,217,.22);background:#f4f0e4;color:#33473f;border-radius:16px;padding:34px;max-width:440px;width:calc(100% - 32px);box-shadow:0 25px 100px #1c303866;z-index:45}
dialog::backdrop{background:#172b3475;-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
.dialog-top{display:flex;align-items:center;justify-content:space-between}
.dialog-top .eyebrow{color:#7a8c78;font-size:8px}
.dialog-close{display:grid;place-items:center;background:transparent;color:#617265;width:28px;height:28px;border-radius:50%}
.dialog-close:hover{background:#e6e8d9}
dialog h2{font-family:'Fraunces',Georgia,serif;font-size:33px;line-height:1.2;letter-spacing:-1px;font-weight:400;margin:18px 0 10px}
dialog p{font-size:12px;line-height:1.8;color:#7a8376;margin:0 0 22px}
.guide-row{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid #d8ddce;font-size:11px}
.guide-row .keycap{border-color:#c4cfb8;color:#4f6650;padding:0 5px;margin-left:4px}
.settings-row{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin:20px 0}
.settings-row select{border:1px solid #cdd5c3;padding:7px 10px;border-radius:5px;background:transparent;color:#52684e;font-size:10px}
.primary-button{background:#395b4c;color:#f8f4e6;border-radius:7px;padding:13px 20px;font-size:12px;font-weight:500;width:100%;transition:background .2s}
.primary-button:hover{background:#4c715a}
.text-button{background:transparent;color:#738471;font-size:10px;padding:14px 5px 0;width:100%}
.text-button:hover{color:#2f4e3e}

.workshop-hud{position:fixed;inset:0;z-index:30;pointer-events:none;opacity:0;transition:opacity .6s}
.workshop-hud.visible{opacity:1}
.workshop-hud button{pointer-events:auto}
.workshop-top{position:absolute;top:34px;left:40px;right:40px;display:flex;justify-content:space-between;align-items:flex-start}
.workshop-brand h2{font-family:'Fraunces',Georgia,serif;font-size:37px;font-weight:400;letter-spacing:-1.4px;margin:8px 0}
.workshop-brand .eyebrow{font-size:8px;opacity:.75}
.workshop-brand p{font-size:11px;opacity:.7;margin:0}
.back-button{display:flex;align-items:center;gap:9px;background:#23342e40;border:1px solid var(--line);padding:11px 15px;border-radius:7px;font-size:11px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.back-button svg{width:15px;height:15px}
.back-button:disabled{opacity:.4}
.workbench-panel{position:absolute;width:310px;right:40px;top:50%;transform:translateY(-43%);color:#35473c;background:#f8f5e8f2;border:1px solid rgba(255,255,244,.6);border-radius:13px;padding:25px;box-shadow:0 20px 70px #1f373529;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);pointer-events:auto}
.workbench-panel .eyebrow{font-size:8px;color:#83917b}
.workbench-panel h3{font-family:'Fraunces',Georgia,serif;font-size:29px;font-weight:400;line-height:1.18;letter-spacing:-.7px;margin:13px 0 9px}
.workbench-panel>p{font-size:10px;line-height:1.8;color:#87917f;margin:0 0 24px}
.upgrade-option{border-top:1px solid #dbe0cf;padding:18px 0}
.upgrade-heading{display:flex;gap:11px;align-items:center}
.upgrade-heading svg{width:25px;height:25px;color:#64875b;stroke-width:1.4}
.upgrade-heading h4{font-size:12px;font-weight:550;margin:0 0 4px}
.upgrade-heading p{font-size:9px;color:#8a9382;margin:0;line-height:1.5}
.fit-button{width:100%;display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:10px 12px;border:1px solid #cbd5ba;border-radius:5px;background:#e3ebd6;color:#536a48;font-size:10px}
.fit-button:hover:not(:disabled){background:#d4e4be}
.fit-button>span{display:flex;gap:5px;align-items:center}
.fit-button svg{width:12px;height:12px}
.fit-button:disabled{opacity:.55}
.workshop-fund{display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#87907d;border-top:1px solid #dbe0cf;padding-top:16px}
.workshop-fund b{font-weight:500;color:#596f4e}
.workshop-fund svg{width:12px;height:12px}
.workshop-fund span{display:flex;align-items:center;gap:5px}
.workshop-bottom{position:absolute;left:40px;bottom:34px}
.workshop-bottom .eyebrow{font-size:8px;opacity:.55}
.workshop-bottom p{font-family:'Fraunces',Georgia,serif;font-size:19px;margin:8px 0 0}
.fitting-progress{padding:9px 0 21px}
.fitting-symbol{width:49px;height:49px;margin:13px auto 22px;display:block;color:#7f9d66;animation:drift 3s ease-in-out infinite}
.fitting-progress h4{font-family:'Fraunces',Georgia,serif;font-size:24px;font-weight:400;margin:0 0 8px}
.fitting-progress p{font-size:11px;color:#869178}
.fitting-line{height:4px;background:#dce3d0;border-radius:4px;overflow:hidden;margin:23px 0 10px}
.fitting-line>span{height:100%;width:0;background:#91ad71;display:block;transition:width .1s linear}
.fitting-label{display:flex;justify-content:space-between;font-size:9px;color:#8d977e}
.fitting-footer{font-size:10px;color:#8a957e;text-align:center;margin-top:27px;line-height:1.8}

.autopilot-button{display:flex;align-items:center;gap:10px;min-height:46px;padding:8px 13px;border:1px solid rgba(244,246,228,.3);border-radius:9px;background:#23383b80;color:var(--cream);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition:background .2s,border-color .2s}
.autopilot-button>svg{width:19px;height:23px}
.autopilot-button>span{text-align:left}
.autopilot-button b{display:block;font-size:11px;font-weight:500;white-space:nowrap}
.autopilot-button small{display:block;font-size:8px;opacity:.65;margin-top:3px}
.autopilot-button:hover{background:#23383bcc}
.autopilot-button.is-active{border-color:var(--green);background:#2f4c38e0;color:var(--green)}
.auto-switch{width:26px;height:15px;border-radius:12px;background:#ffffff24;position:relative;margin-left:4px}
.auto-switch:after{content:"";position:absolute;width:9px;height:9px;top:3px;left:3px;background:#f4f0e4;border-radius:50%;transition:transform .2s,background .2s}
.is-active .auto-switch{background:#d8edbd38}
.is-active .auto-switch:after{transform:translate(11px);background:var(--green)}
.autopilot-button:disabled{opacity:.5}

.ride-actions{display:flex;align-items:center;gap:10px;pointer-events:auto;flex-shrink:0}

@keyframes arrive{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes drift{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes breathe{0%,to{opacity:.4}50%{opacity:1}}
.intro-in{animation:arrive 1.4s cubic-bezier(.2,.7,.2,1) both}

/* Responsive Media Queries */
@media(max-width:1150px){
  .portfolio-nav{display:none}
  .story-scroll-track{padding-left:24px;padding-right:24px}
  .projects-list{grid-template-columns:1fr}
}

@media(max-width:850px){
  .dashboard{grid-template-columns:120px 1fr 200px;gap:18px;padding:16px}
  .story-title{font-size:36px}
  .story-card{padding:26px}
  .topbar{left:20px;right:20px;top:18px}
  .destination{left:22px;top:100px}
  .lower-ui{left:18px;right:18px;bottom:24px}
}

@media(max-width:580px){
  .streak,.counter-divider,.world-note{display:none}
  .brand-name{font-size:24px}
  .brand-tagline{display:none}
  .destination h1{font-size:28px}
  .dashboard{grid-template-columns:80px 1fr;gap:12px;padding:14px}
  .controls-section{grid-column:1 / -1;border-left:0;border-top:1px solid var(--line);padding:10px 0 0}
  .story-scroll-track{padding:80px 14px 100px}
  .story-title{font-size:30px}
}
