* { box-sizing: border-box; }

:root {
  --bg: #050604;
  --panel: rgba(8, 11, 10, 0.70);
  --panel-strong: rgba(8, 11, 10, 0.88);
  --paper: #f8f1dc;
  --soft: rgba(248, 241, 220, 0.78);
  --muted: rgba(248, 241, 220, 0.56);
  --faint: rgba(248, 241, 220, 0.13);
  --aqua: #67ffd7;
  --gold: #f3c35a;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100vh;
  padding: 38px;
  background:
    radial-gradient(circle at 78% 12%, rgba(243,195,90,.15), transparent 34%),
    radial-gradient(circle at 18% 86%, rgba(103,255,215,.10), transparent 34%),
    linear-gradient(135deg, #050604 0%, #090b08 52%, #151007 100%);
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(255,255,255,.012), transparent);
  background-size: 100% 8px;
}

.shell {
  position: relative;
  z-index: 2;
  max-width: 1460px;
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 46px;
}

.hero {
  border-right: 1px solid var(--faint);
  padding-right: 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(103,255,215,.42);
  color: var(--aqua);
  font-weight: 900;
  background: rgba(103,255,215,.04);
  box-shadow: 0 0 32px rgba(103,255,215,.12);
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(50px, 3vw, 84px);
  line-height: .94;
  font-weight: 880;
  letter-spacing: -0.025em;
}

h1 span {
  display: block;
  color: rgba(248,241,220,.46);
}

.summary {
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.62;
}

.radar-card {
  /*margin-top: 26px;*/
  padding: 18px 16px 16px;
  border: 1px solid rgba(248,241,220,.13);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.065), transparent 42%),
    rgba(8,11,10,.42);
  backdrop-filter: blur(18px);
}

.radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.radar-title {
  margin: 0;
  color: rgba(248,241,220,.78);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.radar-score {
  color: var(--aqua);
  font-size: 12px;
  font-weight: 850;
}

.radar {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.ring-line {
  fill: none;
  stroke: rgba(248,241,220,.13);
  stroke-width: 1;
}

.axis-line {
  stroke: rgba(248,241,220,.16);
  stroke-width: 1;
}

.skill-area {
  fill: rgba(103,255,215,.14);
  stroke: var(--aqua);
  stroke-width: 2.6;
  filter: drop-shadow(0 0 10px rgba(103,255,215,.25));
}

.skill-point {
  fill: var(--aqua);
  stroke: #07100e;
  stroke-width: 1.4;
}

.radar-label {
  fill: rgba(248,241,220,.76);
  font-size: 10.5px;
  font-weight: 720;
}

.radar-value {
  fill: rgba(243,195,90,.92);
  font-size: 10px;
  font-weight: 820;
}

.radar-note {
  margin: 8px 0 0;
  color: rgba(248,241,220,.55);
  font-size: 11px;
  line-height: 1.4;
}

.hero-bottom {
  margin-top: 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.52;
}

.hero-bottom strong {
  display: block;
  color: rgba(248,241,220,.9);
  margin-bottom: 7px;
}

.work {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 26px;
  min-height: calc(100vh - 76px);
}

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: center;
}

.panel {
  position: relative;
  min-height: 560px;
  padding: 40px;
  overflow: hidden;
  border-radius: 18px;
  color: var(--paper);
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), transparent 42%),
    var(--panel);
  border: 1px solid rgba(248,241,220,.16);
  box-shadow:
    0 30px 80px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(22px) saturate(1.25);
  transition: opacity .22s ease, transform .22s ease;
}

.panel.changing {
  opacity: 0;
  transform: translateY(10px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--aqua), var(--gold), transparent);
}

.panel-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.period {
  margin: 0;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tag {
  flex: 0 0 auto;
  border: 1px solid rgba(103,255,215,.24);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(103,255,215,.9);
  background: rgba(103,255,215,.06);
  font-size: 11px;
  font-weight: 700;
}

.role {
  margin: 0;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.company {
  margin: 9px 0 26px;
  color: var(--gold);
  font-size: 16px;
  font-weight: 720;
}

.bodycopy {
  max-width: 820px;
  margin: 0 0 28px;
  color: rgba(248,241,220,.82);
  font-size: 15px;
  line-height: 1.65;
}

.bullets {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullets li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  color: rgba(248,241,220,.86);
  font-size: 14px;
  line-height: 1.5;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
  margin-top: 8px;
  box-shadow: 0 0 14px rgba(103,255,215,.8);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(248,241,220,.11);
}

.stack span {
  border: 1px solid rgba(248,241,220,.13);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(248,241,220,.84);
  font-size: 12px;
  background: rgba(255,255,255,.035);
}

.project-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 18px;
  border: 1px solid rgba(248,241,220,.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.035);
}

.project-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: rgba(8,11,10,.78);
  border-right: 1px solid rgba(248,241,220,.12);
}

.project-thumb:last-child { border-right: 0; }

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .72;
  transition: transform .25s ease, opacity .25s ease;
}

.project-thumb:hover img {
  transform: scale(1.06);
  opacity: .95;
}

.project-thumb::after {
  content: attr(data-title);
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0,0,0,.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-link-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: rgba(248,241,220,.58);
  font-size: 12px;
}

.project-link-line button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--aqua);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.visual {
  position: relative;
  height: 340px;
  display: grid;
  place-items: center;
  opacity: .72;
}

.core {
  width: 145px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,.58), transparent 14%),
    radial-gradient(circle at 42% 38%, #f3c35a 0%, #a46525 42%, #2a1505 80%, #050604 100%);
  box-shadow:
    inset -12px -12px 32px rgba(0,0,0,.78),
    0 0 90px rgba(243,195,90,.18);
  animation: breathe 6s ease-in-out infinite;
}

.core::before {
  content: "SYSTEMS";
  color: rgba(248,241,220,.52);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}

.ring {
  position: absolute;
  width: 245px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(248,241,220,.09);
  animation: spin 42s linear infinite;
}

.ring.two {
  width: 315px;
  animation-duration: 58s;
  animation-direction: reverse;
}

.mini {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  left: 50%;
  top: -4px;
  background: var(--aqua);
  box-shadow: 0 0 18px var(--aqua);
}

.mini.gold {
  left: auto;
  right: 15%;
  top: 15%;
  background: var(--gold);
  box-shadow: 0 0 18px var(--gold);
}

.timeline { width: 100%; }

.ticks {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.tick {
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(248,241,220,.09);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  color: rgba(248,241,220,.66);
  background: rgba(8,11,10,.38);
  backdrop-filter: blur(10px);
  transition: .18s ease;
}

.tick:hover {
  transform: translateY(-3px);
  border-color: rgba(103,255,215,.28);
  color: rgba(248,241,220,.9);
}

.tick.active {
  color: var(--paper);
  border-color: rgba(103,255,215,.52);
  background:
    linear-gradient(145deg, rgba(103,255,215,.10), rgba(243,195,90,.055)),
    var(--panel-strong);
  box-shadow:
    0 14px 36px rgba(0,0,0,.32),
    0 0 30px rgba(103,255,215,.10);
}

.pin {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-bottom: 13px;
  background: rgba(248,241,220,.22);
}

.tick.active .pin {
  background: var(--aqua);
  box-shadow: 0 0 15px var(--aqua);
}

.year {
  display: block;
  color: rgba(248,241,220,.95);
  font-size: 12px;
  font-weight: 800;
}

.label {
  display: block;
  margin-top: 5px;
  color: rgba(248,241,220,.57);
  font-size: 12px;
  line-height: 1.3;
}

.tick.active .label { color: rgba(248,241,220,.82); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(16px);
}

.modal.open { display: flex; }

.modal-card {
  width: min(1160px, 100%);
  max-height: min(820px, 90vh);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(248,241,220,.16);
  background:
    linear-gradient(145deg, rgba(255,255,255,.08), transparent 38%),
    rgba(8,11,10,.93);
  color: var(--paper);
  box-shadow: 0 40px 120px rgba(0,0,0,.62);
  display: flex;
  flex-direction: column;
}

.modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
  background: rgba(8,11,10,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(248,241,220,.12);
}

.modal-kicker {
  margin: 0 0 8px;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.modal-title {
  margin: 0;
  font-size: clamp(27px, 4vw, 44px);
  line-height: 1.05;
}

.modal-meta {
  margin: 9px 0 0;
  color: rgba(248,241,220,.68);
  font-size: 13px;
  line-height: 1.45;
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(248,241,220,.18);
  background: rgba(255,255,255,.04);
  color: var(--paper);
  cursor: pointer;
  font-size: 22px;
}

.modal-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 24px 26px 28px;
}

.popup-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}

.project-tabs {
  display: grid;
  gap: 10px;
  align-content: start;
}

.project-tab {
  text-align: left;
  border: 1px solid rgba(248,241,220,.12);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  color: rgba(248,241,220,.68);
  background: rgba(255,255,255,.035);
  transition: .18s ease;
}

.project-tab:hover {
  color: var(--paper);
  border-color: rgba(103,255,215,.32);
}

.project-tab.active {
  color: var(--paper);
  border-color: rgba(103,255,215,.56);
  background: linear-gradient(145deg, rgba(103,255,215,.11), rgba(243,195,90,.05)), rgba(255,255,255,.04);
}

.project-tab strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.project-tab span {
  display: block;
  margin-top: 6px;
  color: rgba(248,241,220,.52);
  font-size: 11px;
  line-height: 1.35;
}

.gallery-shell {
  display: grid;
  gap: 16px;
}

.big-image-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(248,241,220,.13);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}

.big-image {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
  display: block;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(248,241,220,.18);
  background: rgba(0,0,0,.45);
  color: var(--paper);
  cursor: pointer;
  font-size: 24px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}

.arrow.left { left: 14px; }
.arrow.right { right: 14px; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.gallery-thumb {
  flex: 0 0 112px;
  border: 1px solid rgba(248,241,220,.12);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  opacity: .62;
  transition: .18s ease;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: rgba(103,255,215,.62);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.project-content {
  display: grid;
  gap: 14px;
}

.content-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.content-copy {
  margin: 0;
  color: rgba(248,241,220,.8);
  line-height: 1.65;
}

.modal-list {
  display: grid;
  gap: 11px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.modal-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  color: rgba(248,241,220,.82);
  line-height: 1.5;
}

.modal-link {
  display: inline-flex;
  width: fit-content;
  color: var(--aqua);
  font-weight: 850;
  text-decoration: none;
}

.modal-link:hover { text-decoration: underline; }

.error-box {
  position: relative;
  z-index: 3;
  max-width: 780px;
  margin: 40px auto;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(248,241,220,.14);
  background: rgba(8,11,10,.84);
  color: var(--paper);
}

@keyframes enterLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@media (max-width: 1120px) {
  .stage { padding: 26px; }
  .shell { grid-template-columns: 1fr; min-height: auto; }
  .hero {
    border-right: 0;
    border-bottom: 1px solid var(--faint);
    padding: 0 0 24px;
  }
  .hero-bottom { display: none; }
  .work { min-height: auto; }
  .viewer { grid-template-columns: 1fr; }
  .visual { order: -1; height: 280px; }
  .radar-card { max-width: 520px; }
  .ticks {
    overflow-x: auto;
    grid-template-columns: repeat(7, 158px);
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
  }
  .tick { scroll-snap-align: start; }
  .popup-layout { grid-template-columns: 1fr; }
  .project-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .project-tab { flex: 0 0 220px; }
}

@media (max-width: 640px) {
  .stage {
    padding: 16px;
    padding-bottom: max(30px, env(safe-area-inset-bottom));
  }

  .shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .brand {
    width: 42px;
    height: 42px;
    margin-bottom: 17px;
  }

  .eyebrow {
    font-size: 10px;
    margin-bottom: 10px;
  }

  h1 {
    font-size: clamp(44px, 15vw, 62px);
    line-height: .9;
  }

  .summary {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.55;
  }

  .radar-card {
    margin-top: 18px;
    padding: 14px 12px 12px;
    border-radius: 16px;
  }

  .radar-title,
  .radar-score { font-size: 10px; }

  .radar-label { font-size: 9.5px; }
  .radar-value { font-size: 9px; }
  .radar-note { font-size: 10.5px; }

  .work {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .timeline {
    order: -2;
    position: sticky;
    top: 0;
    z-index: 8;
    margin: 0 -16px;
    padding: 10px 16px 2px;
    background: linear-gradient(180deg, rgba(5,6,4,.96), rgba(5,6,4,.72));
    backdrop-filter: blur(18px);
  }

  .ticks {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: none;
  }

  .ticks::-webkit-scrollbar { display: none; }

  .tick {
    min-width: 118px;
    min-height: auto;
    display: grid;
    grid-template-columns: 10px 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 11px;
    border-radius: 999px;
  }

  .pin {
    width: 10px;
    height: 10px;
    margin: 0;
  }

  .year {
    font-size: 11px;
    line-height: 1.1;
  }

  .label {
    margin-top: 2px;
    font-size: 11px;
    white-space: nowrap;
  }

  .visual { height: 210px; }
  .core { width: min(54vw, 178px); }
  .ring { width: min(74vw, 262px); }
  .ring.two { width: min(88vw, 318px); }
  .core::before { font-size: 9px; }

  .panel {
    min-height: auto;
    padding: 24px 18px 26px;
    border-radius: 16px;
  }

  .panel-top {
    display: block;
    margin-bottom: 10px;
  }

  .tag {
    display: inline-block;
    margin-top: 10px;
  }

  .period {
    font-size: 10px;
    line-height: 1.4;
  }

  .role { font-size: clamp(30px, 11vw, 42px); }

  .company {
    margin: 9px 0 18px;
    font-size: 14px;
  }

  .bodycopy {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
  }

  .bullets { gap: 11px; }

  .bullets li {
    grid-template-columns: 16px 1fr;
    gap: 9px;
    font-size: 13px;
    line-height: 1.48;
  }

  .dot {
    width: 7px;
    height: 7px;
    margin-top: 7px;
  }

  .stack {
    margin-top: 20px;
    padding-top: 16px;
  }

  .stack span {
    padding: 7px 9px;
    font-size: 11px;
  }

  .project-strip {
    margin-top: 14px;
    border-radius: 12px;
  }

  .project-thumb::after {
    font-size: 9px;
    left: 7px;
    right: 7px;
    bottom: 7px;
  }

  .project-link-line {
    display: block;
    font-size: 11px;
  }

  .project-link-line button {
    display: inline-block;
    margin-top: 6px;
  }

  .modal {
    padding: 12px;
    align-items: end;
  }

  .modal-card {
    max-height: 91vh;
    border-radius: 18px;
  }

  .modal-head { padding: 18px; }
  .modal-body { padding: 18px; }
  .project-tab { flex: 0 0 185px; }
  .big-image { aspect-ratio: 16 / 10; }

  .arrow {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .gallery-thumb { flex-basis: 88px; }
}

/* --------------------------------------------------------------------------
   Desktop fixed presentation frame patch
   --------------------------------------------------------------------------
   Keeps the main content card, visual object, and bottom timeline in the same
   location when the browser window becomes taller. Extra height now remains as
   background space below the fixed resume frame. Tablet/mobile layouts remain
   scrollable and responsive.
*/
@media (min-width: 1121px) and (min-height: 963px) {
  .shell {
    min-height: 0 !important;
    height: 886px !important;
    align-items: stretch;
  }

  .hero {
    height: 886px !important;
    min-height: 0 !important;
  }

  .work {
    min-height: 0 !important;
    height: 886px !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  .viewer {
    min-height: 0 !important;
    height: auto !important;
    align-self: stretch;
  }

  .timeline {
    align-self: end;
  }
}

/* v1.6 language switch + avatar */
.lang-switch {
  position: absolute;
  z-index: 20;
  top: 22px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(248,241,220,.14);
  border-radius: 999px;
  background: rgba(5, 8, 7, .58);
  backdrop-filter: blur(16px);
  color: rgba(248,241,220,.62);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: rgba(248,241,220,.62);
  padding: 4px 6px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  letter-spacing: .04em;
}

.lang-switch button.active {
  color: #06100e;
  background: var(--aqua, #67ffd7);
  box-shadow: 0 0 16px rgba(103,255,215,.28);
}

.brand.has-avatar {
  overflow: hidden;
  padding: 0 !important;
  background: rgba(255,255,255,.04);
}

.brand.has-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand.avatar-rounded { border-radius: 16px; }
.brand.avatar-hex { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); border-radius: 0; }

@media (max-width: 640px) {
  .lang-switch {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 6px 8px;
    font-size: 10px;
  }
}


/* v1.6.1 mobile hardening
   - prevent body-level horizontal drag/width drift on phones
   - keep thumbnail images clean without text overlays
   - make project/card content wrap safely inside the viewport
*/
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.stage,
.shell,
.hero,
.work,
.viewer,
.panel,
.radar-card,
.timeline,
.ticks,
.project-strip,
.modal-card {
  min-width: 0;
  max-width: 100%;
}

.project-thumb::after {
  content: none !important;
  display: none !important;
}

.project-thumb img,
.gallery-thumb img,
.big-image {
  -webkit-user-drag: none;
  user-select: none;
}

.bodycopy,
.bullets li span:last-child,
.content-copy,
.project-link-line,
.modal-meta,
.summary,
.radar-note {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 640px) {
  body {
    position: relative;
    touch-action: pan-y pinch-zoom;
  }

  .stage {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .shell,
  .hero,
  .work,
  .viewer,
  .panel,
  .radar-card {
    width: 100%;
  }

  .timeline {
    max-width: 100vw;
    overflow: hidden;
    touch-action: pan-x pan-y pinch-zoom;
  }

  .ticks {
    max-width: 100%;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .panel {
    overflow: hidden;
  }

  .project-strip {
    width: 100%;
  }

  .project-thumb {
    min-width: 0;
  }

  .lang-switch {
    max-width: calc(100vw - 20px);
  }
}

/* v1.6.5 mobile overlap fix
   - radar bottom axis label no longer overlaps the radar note
   - orbit/matrix visual reserves enough height so it does not bleed into timeline/panel
   - mobile timeline/lang switch no longer floats over later content while scrolling
*/
#radarMount {
  position: relative;
  overflow: visible;
}

.radar-card {
  overflow: hidden;
}

.radar-note {
  position: relative;
  z-index: 2;
}

@media (max-width: 640px) {
  .radar-card {
    padding-bottom: 18px !important;
  }

  .radar {
    overflow: visible;
    margin-bottom: 6px;
  }

  .radar-note {
    margin-top: 12px !important;
    padding-top: 6px;
    clear: both;
  }

  .work {
    gap: 20px !important;
  }

  .timeline {
    position: relative !important;
    top: auto !important;
    z-index: 4 !important;
    margin-top: 4px !important;
    margin-bottom: 6px !important;
  }

  .visual {
    height: 330px !important;
    margin: 0 0 18px !important;
    overflow: hidden;
    isolation: isolate;
  }

  .ring {
    width: min(72vw, 250px) !important;
  }

  .ring.two {
    width: min(84vw, 300px) !important;
  }

  .panel {
    margin-top: 0 !important;
    position: relative;
    z-index: 5;
  }

  .lang-switch {
    position: absolute !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
  }
}
.resume-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 16px 0 18px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  backdrop-filter: blur(12px);
}

.resume-pdf-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.14);
}