/* palette */
:root{
  --bg:            #2a2542;
  --bg-elevated:   #332C4E;
  --bg-elevated-2: #3C3459;
  --muted:         #a99ca6;
  --accent:        #7a56ae;
  --accent-light:  #b19dcc;
  --text:          #e0dee0;

  --font-hand: 'Caveat', cursive;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 8px;
  --gap: 22px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; font-size:clamp(16px, 1.05vw + 4px, 20px); } /* huh */

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  position:relative;
  overflow-x:hidden;
}

a{ color:inherit; }
:focus-visible{ outline:2px solid var(--accent-light); outline-offset:3px; }

.stars{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:
          radial-gradient(1.5px 1.5px at 8% 15%, var(--accent-light) 0, transparent 100%),
          radial-gradient(1.5px 1.5px at 22% 60%, var(--text) 0, transparent 100%),
          radial-gradient(1px 1px at 35% 22%, var(--accent-light) 0, transparent 100%),
          radial-gradient(1.5px 1.5px at 48% 78%, var(--text) 0, transparent 100%),
          radial-gradient(1px 1px at 63% 12%, var(--accent-light) 0, transparent 100%),
          radial-gradient(1.5px 1.5px at 74% 55%, var(--text) 0, transparent 100%),
          radial-gradient(1px 1px at 85% 30%, var(--accent-light) 0, transparent 100%),
          radial-gradient(1.5px 1.5px at 92% 68%, var(--text) 0, transparent 100%),
          radial-gradient(1px 1px at 15% 85%, var(--accent-light) 0, transparent 100%),
          radial-gradient(1px 1px at 55% 40%, var(--text) 0, transparent 100%);
  opacity:.35;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle{ from{ opacity:.22; } to{ opacity:.42; } }

header{ position:relative; z-index:10; }
/*main, footer{ position:relative; z-index:1; }*/

.wobble-frame{ position:relative; }
.wobble-frame::before{
  content:'';
  position:absolute; inset:0;
  border:1.5px solid var(--accent-light);
  border-radius:var(--radius);
  filter:url(#wobble);
  opacity:.8;
  pointer-events:none;
}

/*font test*/
.sniglet-regular {
  font-family: "Sniglet", system-ui;
  font-weight: 400;
  font-style: normal;
}

.sniglet-extrabold {
  font-family: "Sniglet", system-ui;
  font-weight: 800;
  font-style: normal;
}

.section-label{
  font-family:var(--font-hand);
  font-size:2.2rem;
  font-weight:700;
  margin:0 0 22px;
  display:inline-block;
  position:relative;
  color:var(--text);
}
.section-label::after{
  content:'';
  position:absolute; left:-4px; right:-4px; bottom:-6px; height:10px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3Cpath d='M0 6 Q10 2 20 6 T40 6 T60 6 T80 6 T100 6 T120 6' fill='none' stroke='%237A56AE' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size:60px 10px;
}

/* nav */
/*.site-nav{ padding:28px 5vw 0; }*/
.site-nav{ padding:38px 5vw 0; } /*room at top edge */

.nav-inner{ display:flex; flex-wrap:wrap; gap:14px; align-items:flex-start; list-style:none; margin:0; padding:0; }

.tab{
  position:relative;
  display:inline-block;
  font-family:var(--font-hand);
  font-size:1.3rem;
  font-weight:700;
  line-height: 1.2;
  padding:10px 22px 10px 16px;
  background:var(--bg-elevated);
  color:var(--text);
  border:1.5px solid var(--accent-light);
  clip-path:polygon(16px 0, 100% 0, 100% 100%, 0 100%, 0 16px);
  cursor:pointer;
  text-decoration:none;
  transition:transform .15s ease, background .15s ease;
}
.tab:hover{ transform:translateY(-2px); background:var(--bg-elevated-2); }
.tab[aria-selected="true"]{ background:var(--accent); border-color:var(--accent); }

/*CV and Technical?*/
.note{
  position:absolute; top:-22px; right:7px;
  z-index:2;
  line-height:1.1;
  pointer-events:none;
  font-family:var(--font-hand);
  font-size:1rem;
  color:var(--accent-light);
  transform:rotate(-6deg);
  white-space:nowrap;
}

.dropdown{ position:relative; }
.dropdown-menu{
  position:absolute; top:calc(100% + 10px); left:0;
  display:flex; flex-direction:column; gap:2px;
  background:var(--bg-elevated); border:1.5px solid var(--accent-light);
  border-radius:var(--radius); padding:8px; min-width:150px;
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:opacity .15s ease, transform .15s ease, visibility .15s;
  z-index:20;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu{
  opacity:1; visibility:visible; transform:translateY(0);
}
.dropdown-menu a, .dropdown-menu button{
  all:unset; cursor:pointer; display:block;
  font-family:var(--font-mono); font-size:.82rem;
  padding:8px 10px; border-radius:4px; color:var(--text);
}
.dropdown-menu a:hover, .dropdown-menu button:hover{ background:var(--bg-elevated-2); color:var(--accent-light); }

.hover-note{ position:relative; border-bottom:1px dotted var(--accent-light); cursor:help; }
.hover-note-box{
  position:absolute; top:calc(100% + 8px); left:50%;
  transform:translateX(-50%) translateY(-6px);
  width:280px; max-width:min(280px, 90vw);
  background:var(--bg-elevated); border:1.5px solid var(--accent-light);
  border-radius:var(--radius); padding:10px 14px;
  font-family:var(--font-mono); font-size:.78rem; color:var(--text); line-height:1.5;
  text-align:left;
  opacity:0; visibility:hidden;
  transition:opacity .15s ease, transform .15s ease, visibility .15s;
  z-index:30; pointer-events:none;
}
.hover-note-box img{ max-width:100%; display:block; border-radius:4px; }
.hover-note:hover .hover-note-box, .hover-note:focus .hover-note-box{
  opacity:1; visibility:visible; transform:translateX(-50%) translateY(0);
}

/* layout / panels */
main{ padding:52px 5vw 100px; max-width:75rem; margin:0 auto; }
.panel{ animation:fadeIn .25s ease; }
.panel[hidden]{ display:none; }
@keyframes fadeIn{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }

.sub-tabs{ display:flex; gap:10px; margin-bottom:28px; }
.sub-tab{
  font-family:var(--font-mono); font-size:.82rem; font-weight:600;
  padding:8px 16px; border-radius:999px;
  border:1.5px dashed var(--accent-light);
  background:transparent; color:var(--muted); cursor:pointer;
}
.sub-tab[aria-selected="true"]{ background:var(--accent); color:var(--text); border-style:solid; }

/* home */
.featured-grid{ display:grid; grid-template-columns:1.2fr 1fr; gap:var(--gap); margin-bottom:56px; }
.hero-card{ background:var(--bg-elevated); border-radius:var(--radius); padding:28px; display:grid; place-items:center; min-height:390px; }
/*cropped*/
.hero-card{ position:relative; overflow:hidden; }
.hero-card img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 30%; } /* 30% = keep faces from getting cropped */
.hero-text{ background:var(--bg-elevated); border-radius:var(--radius); padding:32px; display:flex; flex-direction:column; justify-content:center; gap:16px; }
.hero-text p{ margin:0; font-size:1.02rem; color:var(--muted); }
.hero-text strong{ color:var(--text); }
.tag-row{ display:flex; flex-wrap:wrap; gap:10px; }
.tag{ font-family:var(--font-mono); font-size:.78rem; padding:6px 12px; border:1.5px dashed var(--accent-light); border-radius:999px; color:var(--text); }

/* cards. ideas/pocs/hobbies */
.ideas-pane-wrap{ position:relative; }
.ideas-scroll{ max-height:520px; overflow-y:auto; padding:10px 34px 10px 6px; scrollbar-width:none; }
.ideas-scroll::-webkit-scrollbar{ display:none; }
html::-webkit-scrollbar{ width:18px; }
html::-webkit-scrollbar-track{
  background:repeating-linear-gradient(45deg, var(--bg) 0 6px, var(--bg-elevated-2) 6px 12px);
}
html::-webkit-scrollbar-thumb{
  background:var(--accent);
  border-radius:0;
  border-top:2px solid var(--accent-light);
  border-left:2px solid var(--accent-light);
  border-bottom:2px solid var(--bg);
  border-right:2px solid var(--bg);
}
html::-webkit-scrollbar-button{
  background:var(--bg-elevated);
  border-top:2px solid var(--accent-light);
  border-left:2px solid var(--accent-light);
  border-bottom:2px solid var(--bg);
  border-right:2px solid var(--bg);
  height:18px; display:block;
}
html::-webkit-scrollbar-button:vertical:start{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='5,2 9,8 1,8' fill='%23E0DEE0'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:center;
}
html::-webkit-scrollbar-button:vertical:end{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='1,2 9,2 5,8' fill='%23E0DEE0'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:center;
}
html{ scrollbar-width:auto; scrollbar-color:var(--accent) var(--bg-elevated-2); }

.card-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:var(--gap); }
.card{ background:var(--bg-elevated); border-radius:var(--radius); padding:14px; transition:transform .15s ease, background .15s ease; }
a.card{ display:block; text-decoration:none; color:inherit; }
.card:nth-child(3n+1){ transform:rotate(-0.5deg); }
.card:nth-child(3n+2){ transform:rotate(0.4deg); }
.card:nth-child(3n){ transform:rotate(-0.3deg); }
.card:hover{ transform:rotate(0deg) translateY(-3px); background:var(--bg-elevated-2); }
.card-thumb{
  aspect-ratio:4/3; border-radius:4px; margin-bottom:10px;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-size:.72rem; color:var(--muted);
  background:repeating-linear-gradient(45deg, var(--bg) 0 10px, var(--bg-elevated-2) 10px 20px);
  overflow:hidden;
}
.card-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* gallery view toggle */
.gallery-toggle{
  width:16px; height:16px; border-radius:50%;
  border:1.5px solid var(--accent-light);
  background:transparent; padding:0; cursor:pointer;
  margin-left:auto; align-self:center;
}
.gallery-toggle[aria-pressed="true"]{ background:var(--accent-light); }
.gallery-mode .card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 6px;
}
.gallery-mode .card{ padding:0; background:transparent; }
.gallery-mode .card::before{ display:none; }
.gallery-mode .card-thumb{ margin-bottom:0; }
.gallery-mode .card-title, .gallery-mode .card-desc{ display:none; }

.card-title{ font-family:var(--font-mono); font-weight:600; font-size:.88rem; margin:0 0 4px; color:var(--text); }
.card-desc{ font-family:var(--font-mono); font-size:.76rem; color:var(--muted); margin:0; }

.scroll-track{ position:absolute; top:0; right:0; bottom:0; width:14px; border-radius:999px; background:var(--bg-elevated); border:1.5px dashed var(--accent-light); overflow:hidden; }
.scroll-thumb{ position:absolute; left:2px; right:2px; border-radius:999px; background:var(--accent); }

/* about */
.about-grid{ display:grid; grid-template-columns:1fr 1.3fr; gap:var(--gap); }
.about-card{ background:var(--bg-elevated); border-radius:var(--radius); padding:28px; }
.cv-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.cv-list li{ font-family:var(--font-mono); font-size:.85rem; color:var(--muted); border-left:2px solid var(--accent-light); padding-left:14px; }
.cv-list strong{ display:block; color:var(--text); font-size:.9rem; margin-bottom:2px; }
.btn{
  font-family:var(--font-mono); font-size:.82rem; font-weight:600;
  display:inline-block; margin-top:18px; padding:10px 20px;
  border:1.5px dashed var(--accent-light); border-radius:999px;
  color:var(--text); background:transparent; cursor:pointer;
}
.btn:hover{ background:var(--accent); border-style:solid; }

/* hobbies */
.hobby-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:var(--gap); }
.hobby-card{ background:var(--bg-elevated); border-radius:var(--radius); padding:22px; }
a.hobby-card{ display:block; text-decoration:none; color:inherit; transition:background .15s ease; }
a.hobby-card:hover{ background:var(--bg-elevated-2); }
.hobby-card h3{ font-family:var(--font-hand); font-size:1.5rem; margin:0 0 8px; color:var(--accent-light); }
.hobby-card p{ margin:0; font-size:.92rem; color:var(--muted); }

/* misc */
.log-list{ display:flex; flex-direction:column; gap:0; }
.panel > p{ color:var(--muted); margin:0 0 20px; }

.log-item{ display:grid; grid-template-columns:110px 1fr; gap:18px; padding:16px 0; border-bottom:1px solid var(--bg-elevated-2); }
a.log-item{ text-decoration:none; color:inherit; cursor:pointer; }
a.log-item:hover{ background:var(--bg-elevated); }
.log-date{ font-family:var(--font-mono); font-size:.78rem; color:var(--accent-light); }
.log-item p{ margin:0; font-size:.92rem; color:var(--muted); }
.log-item strong{ color:var(--text); }

/* project detail page */
.back-link{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--font-mono); font-size:.82rem; color:var(--accent-light);
  margin-bottom:28px; text-decoration:none;
}
.back-link:hover{ color:var(--text); }

.project-header{ margin-bottom:8px; }
.project-tagline{ color:var(--muted); font-size:1rem; margin:6px 0 0; }
.project-header .tag-row{ margin-top:16px; margin-bottom:40px; }

.project-image{
  aspect-ratio:16/9; border-radius:var(--radius);
  background:repeating-linear-gradient(45deg, var(--bg) 0 12px, var(--bg-elevated-2) 12px 24px);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); color:var(--muted); font-size:.85rem;
  margin-bottom:40px;
  overflow:hidden;
}
.project-image img{ width:100%; height:100%; object-fit:cover; }
.project-image model-viewer{
  width:100%; height:100%;
  --poster-color: transparent;
  background:transparent;
}

/*default section*/
.project-section{ margin-bottom:36px; }

.project-section h2{ font-family:"Cantarell", sans-serif;
  font-size:1.5rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  word-spacing: -0.04em;  /*words spacing*/
  color:var(--accent-light);
  margin:0 0 12px; }

.project-section p {
  color: var(--muted);
  max-width: 100%; /*70ch*/
  margin: 0 0 12px;
  text-align: justify;
  hyphens: auto;
}

.project-section > ul {
  color:var(--muted);
  margin-top: 0;
}

/* intro gallery/figure */
.gallery-intro{
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent-light);
}

/*left-aligned image (or video) with text on the right*/
.attempt-row{
  display:grid;
  grid-template-columns:500px 1fr;
  gap:24px;
  align-items:center;
  margin:28px 0;
}
.attempt-figure{ margin:0; }
.attempt-figure img{ width:100%; height:auto; display:block; background:transparent; }
.attempt-figure video{
  max-width:100%; max-height:360px; width:auto; height:auto;
  display:block; margin:0 auto; background:transparent;
}
.attempt-figure figcaption{
  font-family:var(--font-mono); font-size:.75rem; color:var(--muted);
  margin-top:3px; text-align:center;
}
.attempt-row p{ margin:0; }

@media (max-width:600px){ .attempt-row{ grid-template-columns:1fr; } }

.video-frame{
  max-width:100%;
  max-height:70vh;
  display:block;
  margin:24px auto;
  border-radius:4px;
}
.video-frame video{ max-width:100%; max-height:70vh; width:auto; height:auto; display:block; margin:0 auto; }
.video-frame figcaption{
  font-family:var(--font-mono); font-size:.75rem; color:var(--muted);
  margin-top:3px; text-align:center;
}

.project-section img{
  max-width:100%;
  height:auto;
  display:block;
  margin:24px 0;
}
/*slideshow*/
.container .row .demo {
  margin-top: 4px;
}


* {
  box-sizing: border-box;
}

.column {
  float: left;
  width: 50%;
  padding: 5px;
}

.row::after {
  content: "";
  clear: both;
  display: table;
}

@media screen and (max-width: 500px) {
  .column {
    width: 100%;
  }
}

.photo-frame{ position:relative; display:block; }
.photo-frame::before, .photo-frame::after{
  content:''; position:absolute; width:22px; height:22px;
  border:2px solid var(--accent-light); pointer-events:none;
}
.photo-frame::before{ top:-2px; left:-2px; border-right:none; border-bottom:none; }
.photo-frame::after{ bottom:-2px; right:-2px; border-left:none; border-top:none; }
.photo-frame figcaption{
  font-family:var(--font-mono); font-size:.75rem; color:var(--muted);
  margin-top:2px;
}

.subsection-heading{
  font-family:var(--font-body);
  font-weight:600;
  font-size:1.05rem;
  color:var(--text);
  margin:32px 0 4px;
}

.image-pair{ display:grid; grid-template-columns:1fr 1fr; gap:24px; margin:28px 0; }
@media (max-width:600px){ .image-pair{ grid-template-columns:1fr; } }

.side-gallery{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  margin:28px 0;
}
.side-gallery a{ display:block; position:relative; overflow:hidden; border-radius:4px; }
.side-gallery img{
  width:100%; aspect-ratio:1/1; object-fit:cover; display:block;
  filter:brightness(.7); transition:filter .15s ease, transform .15s ease;
}
.side-gallery a:hover img{ filter:brightness(1); transform:scale(1.04); }
.side-gallery a:nth-child(4){ grid-column:1 / span 1; margin-left:calc(50% + 8px); }
.side-gallery a:nth-child(5){ grid-column:3 / span 1; margin-right:calc(50% + 8px); }
@media (max-width:600px){
  .side-gallery{ grid-template-columns:repeat(2, 1fr); }
  .side-gallery a:nth-child(4), .side-gallery a:nth-child(5){ margin:0; grid-column:auto; }
}

/* cubBaal acrylic */
.gallery-five{
  display:grid;
  grid-template-columns:repeat(6, 1fr);
  gap:12px;
  max-width:560px;
  margin:28px auto;
}
.gallery-five a{ display:block; overflow:hidden; border-radius:4px; }
.gallery-five a:nth-child(1){ grid-column:2 / span 2; grid-row:1; }
.gallery-five a:nth-child(2){ grid-column:4 / span 2; grid-row:1; }
.gallery-five a:nth-child(3){ grid-column:1 / span 2; grid-row:2; }
.gallery-five a:nth-child(4){ grid-column:3 / span 2; grid-row:2; }
.gallery-five a:nth-child(5){ grid-column:5 / span 2; grid-row:2; }
.gallery-five img{ width:100%; aspect-ratio:1/1; object-fit:cover; display:block; transition:transform .15s ease; }
.gallery-five a:hover img{ transform:scale(1.04); }

/* life / travel photo wall. https://www.w3schools.com/howto/howto_css_image_grid_responsive.asp*/
.life-gallery{ column-count:4; column-gap:8px; margin:24px 0 8px; }
.life-gallery img{ width:100%; display:block; margin:0 0 8px; border-radius:4px; break-inside:avoid; transition:transform .15s ease; }
.life-gallery img:hover{ transform:scale(1.02); }
@media (max-width:1000px){ .life-gallery{ column-count:3; } }
@media (max-width:700px){ .life-gallery{ column-count:2; } }
@media (max-width:420px){ .life-gallery{ column-count:1; } }



/*attempt slideshow https://www.w3schools.com/howto/howto_js_slideshow_gallery.asp*/
* {
  box-sizing: border-box;
}

/* Position the image container (needed to position the left and right arrows) */
.container {
  position: relative;
}

/* Hide the images by default */
.mySlides {
  display: none;
}

/* Add a pointer when hovering over the thumbnail images */
.cursor {
  cursor: pointer;
}

/* Next & previous buttons */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  transform: translateY(-50%); /*very centered*/
  color: var(--text);
  font-weight: bold;
  font-size: 20px;
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover,
.next:hover {
  background-color: color-mix(in srgb, var(--bg-elevated-2) 65%, transparent);
}

/* Number text (1/3 etc) */
.numbertext {
  color: var(--text);
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* Container for image text */
.caption-container {
  text-align: center;
  /*background-color: rgb(42 37 66 / 80%);*/
  background-color: color-mix(in srgb, var(--bg) 80%, transparent);
  padding: 10px 16px;
  color: var(--text);
  position: absolute;
  inset: auto 0 0;
  #caption {
    color: inherit;
    text-align: center;
    margin: 0;
  }
}

.slide-stage {
  position: relative;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Six columns side by side */
.container .column { float: left; width: 16.66%; }

/* Add a transparency effect for thumnbail images */
.demo {
  opacity: 0.6;
}
.active,
.demo:hover {
  opacity: 1;
}




/* cube-fold layout */
.cube-net{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  grid-template-rows:repeat(3, 1fr);
  column-gap:8px;
  row-gap:0px;
  max-width:600px;
  margin:10px auto;
}
/* bigger variant for the acrylic model-viewer net — add this class
   alongside .cube-net to size it up without touching the photo gallery */
.cube-net.cube-net-wide{ max-width:820px; }

.cube-net > *{ display:block; position:relative; overflow:hidden; }
.cube-net model-viewer{
  width:100%; aspect-ratio:1/1; display:block;
  --poster-color: transparent; background:transparent;
}
.cube-net > *:nth-child(1){ grid-column:2; grid-row:1; }
.cube-net > *:nth-child(2){ grid-column:1; grid-row:2; }
.cube-net > *:nth-child(3){ grid-column:2; grid-row:2; }
.cube-net > *:nth-child(4){ grid-column:3; grid-row:2; }
.cube-net > *:nth-child(5){ grid-column:4; grid-row:2; }
.cube-net > *:nth-child(6){ grid-column:2; grid-row:3; }

.cube-net img{
  width:100%; aspect-ratio:1/1; object-fit:cover; display:block;
  filter:brightness(.7); transition:filter .15s ease, transform .15s ease;
}
.cube-net a:hover img{ filter:brightness(1); transform:scale(1.04); }
@media (max-width:480px){
  .cube-net{ grid-template-columns:repeat(2, 1fr); grid-template-rows:repeat(4, 1fr); max-width:320px; }
  .cube-net.cube-net-wide{ max-width:320px; }
  .cube-net > *:nth-child(1){ grid-column:1 / span 2; grid-row:1; }
  .cube-net > *:nth-child(2){ grid-column:1; grid-row:2; }
  .cube-net > *:nth-child(3){ grid-column:2; grid-row:2; }
  .cube-net > *:nth-child(4){ grid-column:1; grid-row:3; }
  .cube-net > *:nth-child(5){ grid-column:2; grid-row:3; }
  .cube-net > *:nth-child(6){ grid-column:1 / span 2; grid-row:4; }
}

abbr{ text-decoration:underline dotted var(--accent-light); cursor:help; }

.code-block{
  font-family:var(--font-mono);
  font-size:.85rem;
  line-height:1.6;
  background:var(--bg-elevated);
  border:1px solid var(--bg-elevated-2);
  border-radius:4px;
  padding:16px;
  overflow-x:auto;
  margin:24px 0;
}
.crisp{ image-rendering: pixelated; }

.quote-widget{
  position:fixed; right:22px; bottom:22px; z-index:50;
  display:flex; align-items:flex-end; gap:10px;
  max-width:320px;
  transition:opacity .2s ease;
}
.quote-widget.near-text{ opacity:.3; }
.quote-widget.near-text:hover{ opacity:1; }
.quote-bubble{
  /* FINETUNEFINETUNEFINETUNE bubbble y-axis */
  --bubble-lift: 18px;

  position:relative;
  transform:translateY(calc(var(--bubble-lift) * -1));
  margin:2px 2px 2px 4px;
  padding:8px 12px;
  min-height:30px; display:flex; align-items:center;
  background:var(--bg-elevated);
  color:var(--text);
  font-family:var(--font-mono); font-size:.72rem; line-height:1.45;
  box-shadow:
          0 -2px 0 0 var(--accent-light),
          0  2px 0 0 var(--accent-light),
          -2px 0 0 0 var(--accent-light),
          2px  0 0 0 var(--accent-light);
}
.quote-bubble::before, .quote-bubble::after{
  content:''; position:absolute; left:-8px; bottom:6px; height:10px;
}
.quote-bubble::before{
  width:8px; background:var(--accent-light);
  clip-path:polygon(8px 0, 4px 0, 4px 2px, 2px 2px, 2px 4px, 0 4px, 0 6px, 2px 6px, 2px 8px, 4px 8px, 4px 10px, 8px 10px);
}
.quote-bubble::after{
  width:10px; background:var(--bg-elevated);
  clip-path:polygon(10px 0, 6px 0, 6px 2px, 4px 2px, 4px 4px, 2px 4px, 2px 6px, 4px 6px, 4px 8px, 6px 8px, 6px 10px, 10px 10px);
}

/*pengu*/
.pengu, .quote-mascot{ width:56px; height:56px; flex-shrink:0; cursor:pointer; }

/*footer{ padding:28px 5vw 90px; font-family:var(--font-mono); font-size:.76rem; color:var(--muted); text-align:center; }*/

@media (max-width:820px){
  .featured-grid, .about-grid{ grid-template-columns:1fr; }
  .card-grid, .hobby-grid{ grid-template-columns:repeat(2, 1fr); }
  .quote-widget{ max-width:240px; right:14px; bottom:14px; }
}
@media (max-width:520px){
  .card-grid, .hobby-grid{ grid-template-columns:1fr; }
  .note{ display:none; }
  .log-item{ grid-template-columns:1fr; gap:4px; }
}
@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
}

.model-stage{
  position:relative;
  background:var(--bg-elevated);
  border:1.5px solid var(--accent-light);
  border-radius:var(--radius);
  margin:24px 0 32px;
  overflow:hidden;
}
.model-stage model-viewer{
  width:100%; height:400px; display:block;
  background:transparent; --poster-color:transparent;
}
.model-stage.compact{ margin:0; }
.model-stage.compact model-viewer{ height:230px; }

.model-toolbar{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px;
  padding:10px 14px;
  border-top:1px solid var(--bg-elevated-2);
  font-family:var(--font-mono); font-size:.75rem; color:var(--muted);
}
.model-btn-group{ display:flex; flex-wrap:wrap; gap:6px; }
.model-btn{
  font-family:var(--font-mono); font-size:.74rem;
  padding:5px 11px; border-radius:999px;
  border:1.5px dashed var(--accent-light);
  background:transparent; color:var(--text); cursor:pointer;
  transition:background .15s ease;
}
.model-btn:hover, .model-btn[aria-pressed="true"]{ background:var(--accent); border-style:solid; }

.attempt-row.model-row{ grid-template-columns:260px 1fr; }
@media (max-width:650px){
  .attempt-row.model-row{ grid-template-columns:1fr; }
  .model-stage model-viewer{ height:320px; }
}

/*two images side by side wip*/
/*.two-pair{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:22px 0 28px; }*/
/*.two-pair img{ width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:4px; margin:0; }*/
/*@media (max-width:600px){ .two-pair{ grid-template-columns:1fr; } }*/


/*PoA siwtcher*/
.poa-viewer{
  background:var(--bg-elevated);
  border:1.5px solid var(--accent-light);
  border-radius:var(--radius);
  padding:16px;
  margin:24px 0 32px;
}
.poa-stage{
  position:relative; aspect-ratio:16/9; border-radius:4px; overflow:hidden;
  background:var(--bg);
  display:flex; align-items:center; justify-content:center;
}
.poa-stage img{ width:100%; height:100%; object-fit:contain; margin:0; display:block; }

.poa-controls{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px;
  margin-top:12px;
}
.poa-pills{ display:flex; flex-wrap:wrap; gap:6px; }
.poa-pill{
  font-family:var(--font-mono); font-size:.76rem;
  padding:6px 12px; border-radius:999px;
  border:1.5px dashed var(--accent-light);
  background:transparent; color:var(--muted); cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
.poa-pill:hover, .poa-pill[aria-pressed="true"]{ background:var(--accent); border-style:solid; color:var(--text); }
.poa-caption{ font-family:var(--font-mono); font-size:.76rem; color:var(--muted); }


/*logs misc details*/
.log-swatches { list-style:none; padding:0; display:flex; flex-wrap:wrap; gap:.5rem 1rem; }
.log-swatches li { display:flex; align-items:center; gap:.4rem; font-size:.85em; }
.log-swatches span { width:1.25rem; height:1.25rem; border:1px solid var(--accent-light, #b19dcc); border-radius:4px; }
