@font-face{
  font-family: "Outfit";
  src: url("./Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg: #fff;
  --fg: #000;

  --muted: rgba(0, 0, 0, .56);
  --hair: rgba(0, 0, 0, .42);
  --card: rgba(0, 0, 0, .35);

  --shadow: 0 18px 60px rgba(0, 0, 0, 0);
  --shadowHard: 0 26px 90px hsla(0, 0%, 0%, 0);

  --blur: 18px;

  /* square only */
  --radius: 1px;
  --radiusPanel: 1px;
}

body.theme-invert{
  --bg: #000;
  --fg: #fff;

  --muted: rgba(255,255,255,.56);
  --hair: rgba(255,255,255,.42);
  --card: rgba(255,255,255,.35);

  --shadow: 0 18px 60px rgba(0,0,0,0);
  --shadowHard: 0 26px 90px rgba(0,0,0,0);
}

html, body { height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  letter-spacing: -0.015em;
  overflow-x: hidden;
}

/* WebGL layer */
#three-root{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Floating dock */
.dock{
  position: fixed;
  right: 2vw;
  top: 2vw;
  z-index: 20;
  display: flex;
  gap: 2vw;
  padding: 2vw;
}

.chip{
  font-size: 13px;
  border: 1px solid var(--hair);  background: var(--bg);
  color: var(--fg);
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}
.chip:hover{  
  background: color-mix(in srgb, var(--fg) 80%, transparent);
  color: color-mix(in srgb, var(--bg) 80%, transparent);
  border-color: color-mix(in srgb, var(--fg) 80%, transparent);
}
.chip[aria-pressed="true"]{
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.chip.danger{
  border-color: color-mix(in srgb, var(--fg) 80%, transparent);
}

.wrap{
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 34px 22px 60px;
}

/* Hero */
.hero{
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 6vw;
  padding: 28px 0 40px;
}

.wordmark{
  font-size: clamp(48px, 8vw, 92px);
  line-height: .92;
  display: inline-flex;
  gap: 0.0em;
  align-items: center;
  font-weight: 400;
  position: relative;
  z-index: 1;
  opacity: 1.0;
  margin-bottom: 3vw;
}
.wordmark .dot{
    opacity: 1.0;
    font-size: inherit;
    display: inline-block;
    transform: translateY(-0.15em);
    margin: 0 0.1em;
}


.mininav{
  display:flex;
  gap:14px;
  margin-bottom: 3vw;
  flex-wrap: wrap;
}
.mininav a{
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  opacity: 1.0;
}
.mininav a:hover{ opacity: 1; }

h1{
  font-size: clamp(48px, 8vw, 92px);
  line-height: .92;
  margin: 10px 0 0;
  font-weight: 400;
  position: relative;
  z-index: 0;
  opacity: 1.0;
}

.lede{
  margin: 0 0 3vw;
  font-size: 16px;
  color: var(--muted);
  max-width: 56ch;
}

.cta-row{ display: flex; gap: 10px; align-items: center; }

.cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--bg) opacity(0.7);
  box-shadow: var(--shadow);
}
.cta.ghost{
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--fg) opacity(0.7);
  box-shadow: var(--shadow);
}

.cta:hover{ transform: translateY(-1px); box-shadow: var(--shadowHard); }

.micro{
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.kbd{
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--hair);
  background: var(--card);
}

.hero-right{
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.badge{
  width: 100%;
  border: 1px solid var(--hair);
  border-radius: var(--radiusPanel);
  padding: 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
}
.badge-title{
  font-size: 12px;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 850;
}
.badge-sub{ margin-top: 6px; font-size: 14px; }
.muted{ opacity: .78; }

/* Sections */
.section{
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--hair);
}
.section-head h2{
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}
.section-head p{
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

/* shared panels */
.card, .post, .panel, .line{
  border: 1px solid var(--hair);
  border-radius: var(--radiusPanel);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
}

/* Projects card */
.card{
  height: 420px;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}
.card.clickable{ cursor: pointer; }

.card-media{
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: var(--card);
}

.card-media img,
.card-media video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}



.playhint{
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(var(--blur));
  font-size: 14px;
  opacity: .9;
}

.card-meta{ padding: 14px; }
.card-title{ font-size: 16px; font-weight: 850; }
.card-tag{ margin-top: 6px; font-size: 13px; color: var(--muted); }

/* News posts */
.post{
  padding: 16px;
  height: 220px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.post-date{ font-size: 12px; color: var(--muted); }
.post-title{ font-size: 16px; font-weight: 850; }
.post-body{ font-size: 14px; color: var(--muted); }

/* Swiper */
.swiper{
  overflow: hidden;
  width: 100%;
}
.swiper-slide{
  width: 100%;
  box-sizing: border-box;
}
.swiper-footer{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.swiper-scrollbar{
  flex: 1;
  border-radius: var(--radius);
  background: var(--card);
  height: 8px;
}
.swiper-scrollbar-drag{
  background: var(--fg);
  opacity: .22;
}
.swiper-nav{ display: flex; gap: 8px; }
.navbtn{
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--fg);
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
.navbtn:hover{ background: var(--card); }

/* About */
.about-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
}
.panel{ padding: 16px; }
.panel.wide{ grid-column: 1 / -1; }
.panel-title{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .72;
  font-weight: 900;
  margin-bottom: 10px;
}
.panel p{
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}
.panel .big{
  font-size: 18px;
  font-weight: 900;
  color: var(--fg);
}
.em{
  color: var(--fg);
  font-weight: 900;
}
.tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag{
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 13px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

/* Contact */
.contact-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.line{
  display: block;
  padding: 14px 14px;
  text-decoration: none;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}
.line:hover{ background: var(--card); }

/* Footer */
.footer{
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}
.lightbox.open{ display:block; }

.lightbox-backdrop{
  position:absolute;
  inset:0;
  background: color-mix(in srgb, var(--fg) 55%, transparent);
}

.lightbox-panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(1040px, calc(100vw - 28px));
  height: min(78vh, 720px);
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  border-radius: var(--radiusPanel);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 140px color-mix(in srgb, var(--fg) 45%, transparent);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.lightbox-head{
  display:flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
}

.lb-title{
  color: var(--fg);
  font-weight: 900;
  font-size: 16px;
}
.lb-tag{
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.lightbox-body{
  display: grid;
  grid-template-columns: 1fr 320px;
  width: 100%;
  height: 100%;
  background: var(--bg);
}

.lb-media{
  position: relative;
  background: var(--bg);
}
.lb-media img,
.lb-media video{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

.lb-side{
  border-left: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  padding: 14px;
  overflow: auto;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.kv{
  display: grid;
  gap: 10px;
  font-size: 13px;
}
.kv .k{
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .72;
  font-weight: 900;
  font-size: 11px;
}
.kv .v{
  color: var(--muted);
  line-height: 1.35;
}
.pills{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill{
  border: 1px solid var(--hair);
  padding: 7px 9px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  color: var(--fg);
  font-size: 12px;
}
.lb-links{
  display:grid;
  gap: 8px;
  margin-top: 10px;
}
.lb-links a{
  display:block;
  padding: 10px 10px;
  border: 1px solid var(--hair);
  text-decoration: none;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.lb-links a:hover{ background: var(--card); }

@media (max-width: 860px){
  .lightbox-body{ grid-template-columns: 1fr; }
  .lb-side{ border-left: 0; border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); }
}


/* Mobile */
@media (max-width: 860px){
  .hero{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr; }
  .dock{ right: 2vw; top: 2vw; }
}
