:root {
  --bg: hsl(0 0% 90%);
  --text: #111418;
  --muted: #667085;
  --accent: #0f172a;
  --card: rgba(255,255,255,0.75);
  --card-border: rgba(15,23,42,0.08);
  --shadow: 0 8px 24px rgba(0,0,0,0.06);
  --side-gap-total: 36px;
  --align-dx: 0px; 
  --rail-top: 64px;
  --content-margin-top: 0px; 
  --content-margin-base: 48px; 
  --content-align-adjust: 16px; 
  --content-default-h: 600px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Alegreya Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
  text-align: left;
}

.center-links { display: block; }
.center-links .contact-list { display: flex; justify-content: center; gap: 36px; padding: 0; margin: 8px 0 4px; }
.center-links .contact-item { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.center-links .contact-item a { color: var(--accent); text-decoration: none; }
.center-links .contact-item a:hover { text-decoration: underline; }


#hexCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0; 
  display: block;
  pointer-events: none; 
}


.left-rail {
  position: fixed;
  top: var(--rail-top);
  left: max(24px, calc(50vw - 720px)); 
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 3;
}

.floating-card {
  width: 260px;
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 16px 18px;
}

.contact-card {
  transform: translateX(var(--contact-dx, 0px));
  width: var(--contact-w, 260px);
}
.floating-card h2 {
  margin: 0 0 8px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.floating-card ul,
.floating-card ol { margin: 0; padding-left: 16px; }
.floating-card li { margin: 6px 0; }
.floating-card a { color: var(--accent); text-decoration: none; }
.floating-card a:hover { text-decoration: underline; }
.content {
  position: fixed;
  top: calc(var(--rail-top) + var(--stacked-offset, 0px));
  left: 50%;
  transform: translateX(calc(-50% + var(--align-dx, 0px)));
  margin: 0;
  
  width: var(--content-w, min(720px, calc(100vw - var(--side-gap-total))));
  width: var(--content-w, min(720px, calc(100vi - var(--side-gap-total))));
  width: var(--content-w, min(720px, calc(100dvw - var(--side-gap-total))));
  max-width: none;
  padding: 56px 32px 114px; /* increased bottom padding by ~30 to clear carousel */
  z-index: 2;
  background: var(--bg);
  border: 1px dashed #bfc3c8; 
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Keep last section close to carousel */
.content > .section:last-of-type { margin-bottom: 8px; }

/* Increase paragraph readability */
.content p { font-size: 18px; line-height: 1.7; }

.spacer { flex: 1 0 auto; }

.hero { text-align: left; margin-bottom: 24px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -0.01em; margin: 0 0 6px; font-weight: 500; color: color-mix(in oklab, var(--text) 70%, white 30%); }
.tagline { color: color-mix(in oklab, var(--muted) 85%, white 15%); margin: 0; font-size: 15px; font-weight: 400; }

.section { margin: 28px 0; }
.section:last-of-type { margin-bottom: 8px; }
.section h2 { font-size: 18px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 16px 0; border-bottom: 1px dashed #e5e7eb; }
.timeline h3 { margin: 0 0 6px; font-size: 18px; }
.timeline p { margin: 0; color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.card { border: 1px solid var(--card-border); border-radius: 12px; padding: 16px; background: rgba(255,255,255,0.6); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; }

.links { padding-left: 18px; }
.links a { color: var(--accent); }
  
  .content ul, .content ol { list-style: none; padding: 0; margin: 0; }
  /* Make non-timeline lists in the center canvas horizontal */
  .content ul:not(.timeline),
  .content ol:not(.timeline) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
  }
  .card { display: none; }
  .links { padding-left: 0; }


.icon-carousel { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 0; border-top: 1px dashed #bfc3c8; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.6)); }
.icon-carousel__mask { overflow: hidden; width: 100%; }
.icon-carousel__track { display: flex; gap: 28px; align-items: center; padding: 10px 0; will-change: transform; }
.icon-carousel__item { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; opacity: 0.9; }
.icon-carousel__item img, .icon-carousel__item svg { width: 28px; height: 28px; object-fit: contain; filter: grayscale(15%); }
.icon-carousel__tooltip { position: absolute; padding: 6px 8px; background: var(--card); border: 1px solid var(--card-border); border-radius: 8px; font-size: 12px; color: var(--text); box-shadow: var(--shadow); pointer-events: none; opacity: 0; transition: opacity 120ms ease; transform: translate(-50%, calc(-100% - 8px)) rotate(-45deg); transform-origin: bottom center; z-index: 4; }
.icon-carousel__tooltip-text { display: inline-block; transform: none; }


@media (max-width: 1100px) {
  .left-rail { left: 24px; }
}
@media (max-width: 1250px) {
  .left-rail { position: static; display: block; padding: 16px 24px 0; }
  .floating-card { width: auto; }
  .contact-card {
    width: var(--content-w, min(720px, calc(100dvw - var(--side-gap-total))));
    transform: translateX(var(--align-dx, 0px));
    margin: 0 auto 24px;
  }
  :root { --stacked-offset: 96px; }
  body { overflow-y: auto; }
  .content {
    position: relative;
    margin: var(--stacked-offset) auto 0;
    width: min(720px, calc(100dvw - var(--side-gap-total)));
    left: auto;
    transform: none;
    min-height: var(--content-default-h);
    overflow: hidden;
    padding: 32px 20px 86px; /* bottom padding to clear carousel on small screens */
    display: block;
  }
}
@media (max-width: 700px) {
  .floating-card { width: auto; }
  .contact-card { width: var(--content-w, min(720px, calc(100dvw - var(--side-gap-total)))); transform: translateX(var(--align-dx, 0px)); }
  .content { padding: 48px 16px 12px; min-height: var(--content-default-h); overflow: visible; }
  .content p { font-size: 17px; line-height: 1.7; }
}
