/* ProteinSimulationConsulting — glassy dark front page (v6)
   - Uses your provided images in /assets
*/

:root{
  --bg0: #050712;
  --bg1: #0a0f22;

  --glass: rgba(255,255,255,.10);
  --glass2: rgba(255,255,255,.16);
  --stroke: rgba(255,255,255,.18);
  --stroke2: rgba(255,255,255,.12);

  --txt: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);

  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --shadow2: 0 10px 30px rgba(0,0,0,.25);

  --radius2: 22px;

  --focus: rgba(255,255,255,.65);
  --wrap: 1200px;
}

html[data-theme="light"]{
  --bg0:#f6f7fb;
  --bg1:#eef1ff;

  --glass: rgba(10,14,30,.08);
  --glass2: rgba(10,14,30,.12);
  --stroke: rgba(10,14,30,.12);
  --stroke2: rgba(10,14,30,.08);

  --txt: rgba(10,14,30,.88);
  --muted: rgba(10,14,30,.65);

  --shadow: 0 18px 60px rgba(10,14,30,.14);
  --shadow2: 0 10px 30px rgba(10,14,30,.10);
  --focus: rgba(10,14,30,.50);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--txt);
  background: radial-gradient(1200px 900px at 14% 12%, var(--bg1), var(--bg0));
  overflow-x:hidden;
}

a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }
:focus-visible{ outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }

.wrap{
  width:min(var(--wrap), calc(100% - 2rem));
  margin: 0 auto;
}

.bg-blobs{
  position: fixed;
  inset:-30vh -20vw;
  z-index:-3;
  pointer-events:none;
  filter: blur(36px) saturate(1.12);
  opacity:.92;
  background:
    radial-gradient(700px 500px at 20% 20%, rgba(125,211,252,.40), transparent 60%),
    radial-gradient(700px 520px at 70% 30%, rgba(244,114,182,.30), transparent 62%),
    radial-gradient(700px 540px at 60% 85%, rgba(250,204,21,.18), transparent 62%),
    radial-gradient(900px 650px at 85% 75%, rgba(167,139,250,.24), transparent 66%);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift{
  from{ transform: translate3d(-1.2%, -0.7%, 0) scale(1); }
  to  { transform: translate3d( 1.4%,  0.9%, 0) scale(1.03); }
}

.grain{
  position: fixed;
  inset:-20%;
  z-index:-2;
  pointer-events:none;
  opacity: .10;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  transform: rotate(3deg);
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(0,0,0,.34), rgba(0,0,0,.06));
  border-bottom: 1px solid var(--stroke2);
}

.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: .9rem 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: .75rem;
  min-width: 260px;
}

.brand-mark{
  width: 40px;
  height: 40px;
  display:grid;
  place-items:center;
  border-radius: 13px;
  background: var(--glass2);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow2);
  position: relative;
}
.brand-mark::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 13px;
  background: radial-gradient(18px 14px at 26% 22%, rgba(255,255,255,.55), transparent 60%);
  pointer-events:none;
}

.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-title{ font-weight: 820; letter-spacing:.25px; }
.brand-subtitle{ font-size:.85rem; color: var(--muted); }

.nav{
  display:flex;
  align-items:center;
  gap: .65rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.nav-link{
  font-size:.95rem;
  color: var(--muted);
  padding: .35rem .55rem;
  border-radius: 10px;
}
.nav-link:hover{
  background: var(--glass);
  color: var(--txt);
  text-decoration:none;
}

.nav-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .5rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.16);
  box-shadow: var(--shadow2);
  font-weight: 820;
  letter-spacing:.15px;
}
.nav-cta:hover{ background: rgba(255,255,255,.22); text-decoration:none; }

.theme-btn{
  display:flex;
  align-items:center;
  gap: .55rem;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--txt);
  padding: .45rem .65rem;
  border-radius: 999px;
  cursor:pointer;
  box-shadow: var(--shadow2);
}
.theme-btn:hover{ background: var(--glass2); }
.theme-dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.25));
}

/* Panels */
.panel{
  background: linear-gradient(180deg, var(--glass2), var(--glass));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow:hidden;
}

.panel.glow::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(600px 220px at 16% 12%, rgba(125,211,252,.18), transparent 60%),
    radial-gradient(600px 240px at 78% 16%, rgba(244,114,182,.14), transparent 62%),
    radial-gradient(700px 260px at 55% 92%, rgba(167,139,250,.12), transparent 66%);
  filter: blur(18px);
  opacity:.9;
  pointer-events:none;
}

.panel-head{
  padding: 1.1rem 1.1rem .2rem;
  position: relative;
}
.panel-head h2{
  margin:0;
  font-size: 1.05rem;
  letter-spacing:.2px;
}

.muted{ color: var(--muted); }
.footer{ padding: .85rem 1.1rem 1.1rem; }

/* Collabs */
.collab-grid{
  display:grid;
  grid-template-columns: 1.1fr 1.6fr;
  gap: 1rem;
  padding: 0 1.1rem 1.1rem;
  position: relative;
}
.collab-group{
  border: 1px solid var(--stroke2);
  border-radius: 16px;
  background: rgba(0,0,0,.10);
  padding: .9rem;
  position: relative;
  overflow:hidden;
}
.collab-group::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(380px 180px at 18% 16%, rgba(255,255,255,.10), transparent 60%);
  pointer-events:none;
}
html[data-theme="light"] .collab-group{ background: rgba(255,255,255,.40); }

.collab-title{
  font-weight: 820;
  margin-bottom: .75rem;
  letter-spacing:.25px;
}

.chip-row{
  display:flex;
  flex-wrap:wrap;
  gap: .6rem;
}

.chip{
  width: 100%;
  border: 1px solid var(--stroke2);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow2);
  overflow:hidden;
}
html[data-theme="light"] .chip{ background: rgba(10,14,30,.05); }
.chip[open]{ background: rgba(255,255,255,.10); }

.chip summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  display:flex;
  align-items:center;
  gap: .55rem;
  padding: .65rem .75rem;
  font-weight: 720;
}
.chip summary::-webkit-details-marker{ display:none; }

.chip-num{
  display:grid;
  place-items:center;
  min-width: 34px;
  height: 26px;
  padding: 0 .45rem;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  border: 1px solid var(--stroke2);
  font-weight: 900;
  letter-spacing: .6px;
}
html[data-theme="light"] .chip-num{ background: rgba(10,14,30,.08); }

.chip-body{
  padding: 0 .75rem .75rem;
  display:grid;
  gap: .25rem;
}
.chip-line{ font-size:.92rem; }
.chip-note{ margin-top:.35rem; font-size:.9rem; color: var(--muted); }

.pill{
  display:inline-flex;
  align-items:center;
  padding: .12rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.10);
  font-weight: 700;
}

/* Hero + right column */
.hero-grid{
  margin-top: 1rem;
  display:grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: 1rem;
  align-items:start;
}

.hero{
  position:relative;
  min-height: 560px;
  padding: 1.1rem;
}

.hero-cover{
  height: 250px;
  border-radius: 18px;
  border: 1px solid var(--stroke2);
  box-shadow: var(--shadow2);
  position: relative;
  overflow:hidden;

  background:
    linear-gradient(135deg, rgba(10,14,30,.35), rgba(10,14,30,.05)),
    radial-gradient(400px 240px at 18% 18%, rgba(255,255,255,.12), transparent 62%),
    url("assets/mainpagepicture.png");
  background-size: cover;
  background-position: center;
}
html[data-theme="light"] .hero-cover{
  background:
    linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,255,255,.08)),
    radial-gradient(400px 240px at 18% 18%, rgba(10,14,30,.10), transparent 62%),
    url("assets/mainpagepicture.png");
  background-size: cover;
  background-position: center;
}

.hero-cover::after{
  content:"";
  position:absolute;
  inset:-10%;
  background:
    radial-gradient(260px 220px at 18% 20%, rgba(255,255,255,.16), transparent 62%),
    linear-gradient(180deg, transparent, rgba(0,0,0,.25));
  transform: rotate(-2deg);
}

.hero-content{ padding-top: 1rem; position: relative; }
.hero-kicker{
  display:inline-flex;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.08);
  color: var(--muted);
  font-size: .86rem;
  font-weight: 760;
}
.hero h1{
  margin: .85rem 0 .45rem;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  letter-spacing: .2px;
}
.hero-actions{
  display:flex;
  gap:.7rem;
  flex-wrap:wrap;
  margin-top: .95rem;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .65rem .95rem;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.16);
  box-shadow: var(--shadow2);
  font-weight: 860;
  letter-spacing:.15px;
}
.btn:hover{ background: rgba(255,255,255,.22); text-decoration:none; }
.btn.ghost{ background: rgba(255,255,255,.08); }

.hero-foot{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin-top: 1.1rem;
}
.mini{
  font-size:.86rem;
  color: var(--muted);
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  padding: .18rem .5rem;
  border-radius: 999px;
}
.mini.strong{ color: var(--txt); font-weight:720; }

/* Cards */
.stack{ display:grid; gap: 1rem; }

.cards{
  padding: 0 1.1rem 1.1rem;
  display:grid;
  gap: .9rem;
}

.cards-3{ grid-template-columns: repeat(3, 1fr); }
.cards-2{ grid-template-columns: repeat(2, 1fr); }

.card{
  border-radius: 18px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  overflow:hidden;
  box-shadow: var(--shadow2);
  display:flex;
  flex-direction:column;
  min-height: 240px;
  position: relative;
}
.card::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(280px 160px at 18% 12%, rgba(255,255,255,.10), transparent 60%);
  pointer-events:none;
}
html[data-theme="light"] .card{ background: rgba(255,255,255,.55); }

.card.wide{ flex-direction:row; min-height: 210px; }
.card:hover{ transform: translateY(-1px); transition: transform .18s ease; }

.thumb{
  height: 140px;
  border-bottom: 1px solid var(--stroke2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.thumb::before{
  content:"";
  display:block;
  height:100%;
  width:100%;
  background:
    linear-gradient(135deg, rgba(10,14,30,.35), rgba(10,14,30,.08)),
    radial-gradient(260px 180px at 18% 18%, rgba(255,255,255,.10), transparent 62%);
}
html[data-theme="light"] .thumb::before{
  background:
    linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,.06)),
    radial-gradient(260px 180px at 18% 18%, rgba(10,14,30,.10), transparent 62%);
}

.card.wide .thumb{
  width: 42%;
  height: auto;
  border-bottom: 0;
  border-right: 1px solid var(--stroke2);
}

/* Image mapping */
.t1{ background-image: url("assets/humantranscription.png"); }
.t2{ background-image: url("assets/sarscov2vsph.png"); }
.t3{ background-image: url("assets/thrombogenesis.png"); }
.t4{ background-image: url("assets/drug_therapeutic_vs_thrombogenesis.png"); }
.t5{ background-image: url("assets/salts_vs_fibrinogen_nanofiber.png"); }

.card-body{
  padding: .85rem .9rem .95rem;
  display:flex;
  flex-direction:column;
  gap: .45rem;
  position: relative;
}
.card-body h3{
  margin:0;
  font-size: 1.02rem;
  letter-spacing: .15px;
}
.card-body p{ margin:0; font-size:.95rem; }

.tags{
  display:flex;
  gap: .4rem;
  flex-wrap:wrap;
  margin-top: .2rem;
}
.tag{
  display:inline-flex;
  align-items:center;
  padding: .22rem .60rem;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.10);
  font-weight: 900;
  letter-spacing: .6px;
  font-size: .82rem;
}
.tag:hover{ background: rgba(255,255,255,.16); }

/* Links section */
.links{
  padding: 0 1.1rem 1.1rem;
  display:grid;
  gap: .65rem;
}
.link-row{
  display:grid;
  gap: .15rem;
  padding: .8rem .9rem;
  border-radius: 16px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow2);
  text-decoration:none;
}
html[data-theme="light"] .link-row{ background: rgba(255,255,255,.55); }
.link-row[aria-disabled="true"]{ cursor: default; }
.link-title{ font-weight: 820; }
.link-meta{ color: var(--muted); font-size: .92rem; }

/* Card links */
.card-link{
  color: inherit;
  text-decoration: none;
}
.card-link:hover{ text-decoration:none; }
.card-link:focus-visible{ outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 18px; }

/* Responsive */
@media (max-width: 1020px){
  .collab-grid{ grid-template-columns: 1fr; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero{ min-height: 520px; }
  .cards-3{ grid-template-columns: 1fr; }
  .cards-2{ grid-template-columns: 1fr; }
  .card.wide{ flex-direction: column; }
  .card.wide .thumb{ width:100%; height: 180px; border-right:0; border-bottom: 1px solid var(--stroke2); }
}

@media (max-width: 560px){
  .header-row{ padding: .75rem 0; }
  .nav{ gap: .45rem; }
  .nav-link{ display:none; }
  .theme-btn .theme-text{ display:none; }
  .hero{ padding: .9rem; min-height: 500px; }
  .panel-head{ padding: .95rem .95rem .2rem; }
  .cards{ padding: 0 .95rem .95rem; }
  .links{ padding: 0 .95rem .95rem; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .bg-blobs{ animation: none; }
  .card:hover{ transform:none; transition:none; }
}

/* Blur fallback */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))){
  .panel, .site-header{ background: rgba(20,22,35,.88); }
  html[data-theme="light"] .panel{ background: rgba(255,255,255,.92); }
}


/* Logo (black & white, adapts to theme) */
.logo{
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,.92);
}
html[data-theme="light"] .logo{
  color: rgba(10,14,30,.90);
}


/* Status glow: Past (red) vs Current (green) */
.chip{
  position: relative;
  overflow: hidden;
}

.chip[data-status="past"]{
  border-color: rgba(248,113,113,.24);
}
.chip[data-status="current"]{
  border-color: rgba(34,197,94,.24);
}

/* Animated wave glow */
.chip[data-status="past"]::before,
.chip[data-status="current"]::before{
  content:"";
  position:absolute;
  inset:-14px;
  border-radius: 20px;
  filter: blur(18px);
  opacity: .78;
  pointer-events:none;
  animation: statusWave 5.4s ease-in-out infinite;
}

.chip[data-status="past"]::before{
  background:
    radial-gradient(280px 170px at 0% 50%, rgba(248,113,113,.62), transparent 60%),
    radial-gradient(280px 170px at 100% 50%, rgba(239,68,68,.40), transparent 60%),
    linear-gradient(90deg, rgba(239,68,68,.0), rgba(239,68,68,.24), rgba(239,68,68,.0));
}

.chip[data-status="current"]::before{
  background:
    radial-gradient(280px 170px at 0% 50%, rgba(74,222,128,.56), transparent 60%),
    radial-gradient(280px 170px at 100% 50%, rgba(34,197,94,.38), transparent 60%),
    linear-gradient(90deg, rgba(34,197,94,.0), rgba(34,197,94,.22), rgba(34,197,94,.0));
}

@keyframes statusWave{
  0%   { transform: translateX(-10px) translateY(0) scale(1.02); }
  50%  { transform: translateX(10px)  translateY(-3px) scale(1.05); }
  100% { transform: translateX(-10px) translateY(0) scale(1.02); }
}

.pill[data-status="past"]{
  border-color: rgba(248,113,113,.28);
  background: rgba(239,68,68,.12);
}
.pill[data-status="current"]{
  border-color: rgba(74,222,128,.28);
  background: rgba(34,197,94,.12);
}

html[data-theme="light"] .pill[data-status="past"]{
  color: rgba(10,14,30,.86);
  background: rgba(239,68,68,.10);
}
html[data-theme="light"] .pill[data-status="current"]{
  color: rgba(10,14,30,.86);
  background: rgba(34,197,94,.10);
}

/* Clickable collaborator tags */
.tag-btn{
  cursor: pointer;
  user-select: none;
}
.tag-btn:hover{
  background: rgba(255,255,255,.16);
}
.tag-btn:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}


/* Lab details popover (light transparent panel) */
.popover{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(0,0,0,.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 220;
}
.popover.show{
  opacity: 1;
  pointer-events: auto;
}

.popover-card{
  width: min(560px, 100%);
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
  position: relative;
  overflow: hidden;
}
.popover-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(520px 240px at 18% 18%, rgba(125,211,252,.18), transparent 62%),
    radial-gradient(520px 240px at 82% 26%, rgba(244,114,182,.14), transparent 62%),
    radial-gradient(560px 260px at 55% 92%, rgba(167,139,250,.12), transparent 66%);
  filter: blur(18px);
  opacity: .9;
  pointer-events:none;
}

.popover-close{
  position:absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.08);
  color: var(--txt);
  cursor: pointer;
  box-shadow: var(--shadow2);
  font-size: 22px;
  line-height: 1;
}
.popover-close:hover{ background: rgba(255,255,255,.14); }

.popover-head{
  display:flex;
  align-items:center;
  gap: .75rem;
  padding: 1.1rem 1.1rem .4rem;
  position: relative;
}
.popover-badge{
  display:grid;
  place-items:center;
  min-width: 46px;
  height: 34px;
  padding: 0 .65rem;
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.10);
  font-weight: 900;
  letter-spacing: .8px;
}
.popover-title{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 1.02rem;
}
.popover-content{
  padding: .4rem 1.1rem 1.1rem;
  position: relative;
  display:grid;
  gap: .35rem;
}
.popover-content .row{
  display:flex;
  gap: .5rem;
  flex-wrap:wrap;
  align-items:baseline;
}
.popover-content .k{
  color: var(--muted);
  min-width: 110px;
}
.popover-content a{
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,.22);
}
html[data-theme="light"] .popover-content a{
  border-bottom: 1px dashed rgba(10,14,30,.22);
}
.popover-content a:hover{
  border-bottom-style: solid;
}


/* Active nav link */
.nav-link.active{
  color: var(--txt);
  background: rgba(255,255,255,.10);
  border: 1px solid var(--stroke2);
}


/* Landing hero with big image */
body.landing{
  overflow-x:hidden;
}
.hero-landing{
  min-height: 100vh;
  position: relative;
  display: grid;
  align-items: stretch;
}
body.landing .hero-header{
  z-index: 120;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body.landing .hero-header .header-row{
  padding: 1.05rem 0;
}
.hero-landing-cover{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 20% 20%, rgba(0,0,0,.05), rgba(0,0,0,.65)),
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.20) 35%, rgba(0,0,0,.72)),
    url("assets/mainpagepicture.png");
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.02);
  z-index: 0;
}
.hero-landing-cover::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(520px 320px at 18% 18%, rgba(125,211,252,.14), transparent 62%),
    radial-gradient(520px 320px at 82% 26%, rgba(244,114,182,.10), transparent 62%),
    radial-gradient(560px 340px at 55% 92%, rgba(167,139,250,.10), transparent 66%);
  mix-blend-mode: screen;
  opacity: .75;
}
.hero-landing-content{
  position: relative;
  z-index: 1;
  padding: 7.2rem 0 2.2rem;
}
.hero-badge{
  display:inline-flex;
  padding: .28rem .72rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 860;
  letter-spacing: .2px;
}
.hero-title{
  margin: .9rem 0 .4rem;
  font-size: clamp(2.1rem, 4.6vw, 3.8rem);
  letter-spacing: .2px;
}
.hero-sub{
  margin: 0;
  max-width: 880px;
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
  color: rgba(255,255,255,.82);
  line-height: 1.55;
  text-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.hero-actions{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  margin-top: 1.25rem;
}
.hero-quick{
  margin-top: 1.6rem;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
  max-width: 920px;
}
.quick-card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  padding: .95rem 1rem;
  text-decoration:none;
}
.quick-card:hover{
  background: rgba(255,255,255,.14);
  text-decoration:none;
  transform: translateY(-1px);
  transition: transform .18s ease;
}
.quick-k{
  color: rgba(255,255,255,.70);
  font-weight: 780;
  letter-spacing: .2px;
  font-size: .92rem;
}
.quick-v{
  font-weight: 920;
  letter-spacing: .2px;
  margin-top: .18rem;
}

@media (max-width: 900px){
  .hero-quick{ grid-template-columns: 1fr; }
  .hero-landing-content{ padding-top: 6.4rem; }
}


/* Custom tooltip (no browser default) */
.tip{
  position: relative;
  border-bottom: 1px dashed rgba(255,255,255,.22);
  text-decoration: none;
}
.tip:hover{ border-bottom-style: solid; }

.tip::after{
  content: attr(data-tip);
  position:absolute;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  bottom: -10px;
  white-space: nowrap;
  font-size: .82rem;
  color: var(--txt);
  background: rgba(10,14,30,.86);
  border: 1px solid rgba(255,255,255,.14);
  padding: .35rem .55rem;
  border-radius: 12px;
  box-shadow: 0 16px 46px rgba(0,0,0,.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 20;
}
.tip:hover::after{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
html[data-theme="light"] .tip::after{
  background: rgba(255,255,255,.92);
  color: rgba(10,14,30,.92);
  border-color: rgba(10,14,30,.12);
}


/* Floating lab panel (appears near tag) */
.floatpop{
  position: fixed;
  z-index: 260;
  width: min(520px, calc(100vw - 1.2rem));
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.floatpop.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.floatpop::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(520px 240px at 18% 18%, rgba(125,211,252,.18), transparent 62%),
    radial-gradient(520px 240px at 82% 26%, rgba(244,114,182,.14), transparent 62%),
    radial-gradient(560px 260px at 55% 92%, rgba(167,139,250,.12), transparent 66%);
  filter: blur(18px);
  opacity: .9;
  pointer-events:none;
}
.floatpop-inner{
  position: relative;
  padding: 1.05rem 1.05rem 1.1rem;
}
.floatpop-head{
  display:flex;
  align-items:center;
  gap: .7rem;
  padding-bottom: .45rem;
}
.floatpop-badge{
  display:grid;
  place-items:center;
  min-width: 44px;
  height: 32px;
  padding: 0 .6rem;
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.10);
  font-weight: 900;
  letter-spacing: .8px;
}
.floatpop-title{
  font-weight: 950;
  letter-spacing: .2px;
}
.floatpop-close{
  margin-left:auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.08);
  color: var(--txt);
  cursor: pointer;
  box-shadow: var(--shadow2);
  font-size: 20px;
  line-height: 1;
}
.floatpop-close:hover{ background: rgba(255,255,255,.14); }
.floatpop-content{
  display:grid;
  gap: .35rem;
}
.floatpop-content .row{
  display:flex;
  gap: .5rem;
  flex-wrap:wrap;
}
.floatpop-content .k{
  color: var(--muted);
  min-width: 110px;
}


/* Landing header overlay stays transparent */
body.landing .site-header.hero-header{
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}


/* Skills page */
.skills-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin-top: .9rem;
}
.skill-card{
  border-radius: 20px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow2);
  padding: 1rem 1rem .9rem;
  position: relative;
  overflow: hidden;
}
.skill-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(420px 220px at 20% 20%, rgba(125,211,252,.12), transparent 62%),
    radial-gradient(420px 220px at 80% 30%, rgba(244,114,182,.10), transparent 62%),
    radial-gradient(460px 240px at 55% 90%, rgba(167,139,250,.10), transparent 66%);
  filter: blur(20px);
  opacity: .85;
  pointer-events:none;
}
.skill-card > *{ position: relative; }
.skill-card h3{
  margin: 0 0 .55rem;
  font-size: 1.05rem;
  letter-spacing: .15px;
}
.skill-card ul{
  margin: 0;
  padding-left: 1.05rem;
  display:grid;
  gap: .35rem;
}
.skill-card li{
  color: rgba(255,255,255,.80);
  line-height: 1.45;
}
html[data-theme="light"] .skill-card li{
  color: rgba(10,14,30,.78);
}
.skills-strip{
  margin-top: 1rem;
  padding-top: .5rem;
}
.chipline{
  display:inline-block;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  padding: .55rem .85rem;
  color: rgba(255,255,255,.78);
  line-height: 1.35;
}
html[data-theme="light"] .chipline{
  color: rgba(10,14,30,.78);
}

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


/* Mobile menu */
.menu-btn{
  display:none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.08);
  box-shadow: var(--shadow2);
  color: var(--txt);
  cursor: pointer;
  align-items:center;
  justify-content:center;
}
.menu-btn:hover{ background: rgba(255,255,255,.12); }
.menu-btn:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.menu-ico{
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  display:block;
}
.menu-ico::before,
.menu-ico::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.menu-ico::before{ top: -6px; }
.menu-ico::after{ top: 6px; }

.nav{
  display:flex;
  align-items:center;
  gap: .65rem;
}
.nav-links{
  display:flex;
  align-items:center;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content:flex-end;
}

@media (max-width: 980px){
  .menu-btn{ display:flex; }
  .nav-links{
    position: fixed;
    top: calc(64px + env(safe-area-inset-top));
    right: 14px;
    left: 14px;
    display:grid;
    gap: .55rem;
    padding: .95rem;
    border-radius: 22px;
    border: 1px solid var(--stroke);
    background: rgba(10,14,30,.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 28px 80px rgba(0,0,0,.55);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 150;
  }
  html[data-theme="light"] .nav-links{
    background: rgba(255,255,255,.86);
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
  }
  .nav-links.open{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links .nav-link,
  .nav-links .nav-cta{
    display:flex;
    width: 100%;
    justify-content: center;
    padding: .75rem .85rem;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--stroke2);
  }
  .nav-links .nav-link.active{
    background: rgba(255,255,255,.10);
  }
  .nav-links .theme-btn{
    width: 100%;
    justify-content: center;
    padding: .78rem .9rem;
  }
}



/* --- Mobile text safety: keep sentences inside glass panes --- */
.panel, .skill-card, .quick-card, .link-row, .chip, .pill{
  min-width: 0;
}

p, li, a, .muted, .hero-sub, .link-title, .link-meta{
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

/* Skills strip capsule: looks great on desktop, becomes a clean rounded panel on phones */
.chipline{
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 560px){
  .chipline{
    display:block;
    border-radius: 18px; /* avoid “giant pill/circle” look when wrapping */
    padding: .75rem .9rem;
  }
}


/* Lightweight content cards (datasets/app blocks) */
.cards{
  display:grid;
  gap: .9rem;
}
.cardish{
  border-radius: 22px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow2);
  padding: 1rem 1rem .95rem;
  min-width: 0;
}
.cardish.glow-soft{
  position: relative;
  overflow: hidden;
}
.cardish.glow-soft::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(520px 260px at 18% 22%, rgba(34,197,94,.16), transparent 62%),
    radial-gradient(520px 260px at 88% 30%, rgba(124,255,178,.10), transparent 62%),
    radial-gradient(520px 260px at 58% 110%, rgba(150,246,255,.08), transparent 66%);
  filter: blur(18px);
  opacity: .9;
  pointer-events:none;
}
.cardish > *{ position: relative; }
.cardish-top h3{
  margin: 0 0 .35rem;
  font-size: 1.1rem;
}
.cardish-actions{
  margin-top: .75rem;
  display:flex;
  flex-wrap:wrap;
  gap: .6rem;
}


/* Linked app card */
.cardlink{
  display:block;
  text-decoration:none;
  color: inherit;
}
.cardlink:hover{
  text-decoration:none;
  transform: translateY(-1px);
  transition: transform .18s ease;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
.cardish-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap: wrap;
}
.badge{
  font-size: .78rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
}
html[data-theme="light"] .badge{
  color: rgba(10,14,30,.78);
}


/* Landing: LWAKLM callout */
.callout{
  margin-top: .85rem;
  display:inline-flex;
  align-items:center;
  gap: .55rem;
  padding: .55rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,.28);
  background: rgba(34,197,94,.10);
  box-shadow: 0 0 30px rgba(34,197,94,.10);
  text-decoration:none;
  color: rgba(255,255,255,.88);
}
.callout:hover{
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.44);
}
.callout-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(34,197,94,.85);
  box-shadow: 0 0 16px rgba(34,197,94,.55);
}
.callout-strong{ font-weight: 700; }
.callout-muted{ color: rgba(255,255,255,.72); }

html[data-theme="light"] .callout{
  color: rgba(10,14,30,.86);
  background: rgba(34,197,94,.12);
}
html[data-theme="light"] .callout-muted{ color: rgba(10,14,30,.70); }

/* Code page: emphasize desktop app row */
.app-row{
  border-color: rgba(34,197,94,.28) !important;
  background: rgba(34,197,94,.08) !important;
}
.app-row:hover{
  border-color: rgba(34,197,94,.44) !important;
  background: rgba(34,197,94,.12) !important;
}
