:root{
  color-scheme: light dark;

  --font-h1: 2.5rem;
  --font-h2: 1.75rem;
  --font-h3: 1.35rem;
  --font-h4: 1.2rem;
  --font-h5: 1rem;
  --font-h6: 0.9rem;

  --base-vw: 42vw;
  --grid3x-paddingtop: calc((100dvh - var(--base-vw)) / 2);
  --header-height: clamp(2rem, 7dvh, 4rem);
  --gridfreex-wrapper-vw: 66vw;
  --items-gap: 0.15rem;

  --items-border-width: 0.125rem;

  /* generic filters (override in modes if needed) 
  --filter-deboss-invert: inset 0 0 0.2rem rgba(1,0,3,0.5);
  --filter-deboss-text: 1px 3px 6px var(--color-bg), 0 0 0 #000, 1px 3px 6px var(--color-bg), 1px 1px 1px var(--color-item-active);
  */
}

/* ONE mode */
.one-mode{
  --color-text: rgba(0,0,0,0.85);
  --color-bg: rgba(255,255,255,1);
  --color-item: rgba(255,255,255,0);
  --color-header: rgba(255,255,255,.5);
  --color-item-hover: #e7e7e7;
  --color-item-active: #919191;
  --color-waveprogress: rgba(0,0,0,.85);

  --border-color: rgba(0,0,0,0.75);
  --logo-fill: rgba(0,0,0,0.75);
  --logo-stroke: rgba(0,0,0,0.85);
  --logo-stroke-width: 0.1px;
}

/* ZERO mode */
.zero-mode{
  --color-text: (255,255,255,0.975);
  --color-bg: rgba(0,0,0,.75);
  --color-item: rgba(0,0,0,.75);
  --color-header: rgba(0,0,0,0.5);
  --color-item-hover: #1a1a1a;
  --color-item-active: #6d6d6d;
  --color-waveprogress: rgba(255,255,255,0.975);

  --border-color: rgba(255,255,255,0.925);
  --logo-fill: rgba(255,255,255,0.975);
  --logo-stroke: rgba(255,255,255,0.975);
  --logo-stroke-width: 0.1px;
}

/* Logo path rules (shared) */
:is(.one-mode, .zero-mode) .logo path{
  filter: none;
  stroke: var(--logo-stroke);
  stroke-width: var(--logo-stroke-width);
  fill: var(--logo-fill);
  vector-effect: non-scaling-stroke;
}

/* Common item borders for active modes */
:is(.one-mode, .zero-mode)
  .grid3x-item,
:is(.one-mode, .zero-mode)
  .grid2x-item,
:is(.one-mode, .zero-mode)
  .cv,
:is(.one-mode, .zero-mode)
  .works-item,
:is(.one-mode, .zero-mode)
  .tag-button,
:is(.one-mode, .zero-mode)
  .expand-collapse-button,
:is(.one-mode, .zero-mode)
  .tag-area-text::before,
:is(.one-mode, .zero-mode)
  .tag-area-text::after,
:is(.one-mode, .zero-mode)
  .header-design,
:is(.one-mode, .zero-mode)
  .gridfreex-cell{
  border: var(--items-border-width) solid var(--border-color);
}

/* --------------------------------------------- intrinsic --------------------------------------------- */
html {
  overflow-x: hidden;
  overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) { 
  html {
    overflow-y: auto;
    scrollbar-gutter: stable; /* conditional Scrollbar gutter */
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto,
  "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  font-weight: 400;
  line-height: 1.25;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: opacity 0.3s ease-in;
}

/* hyperlink */
a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: purple;
}
a:hover {
  color: red;
}
a:active {
  color: darkred;
}

.cvtext a {
  all: unset;
}
.cvtext a:hover {
  color: blue; /* 원하는 hover 색 */
  text-decoration: underline; /* 필요 시 */
  cursor: pointer;
}

/* --------------------------------------------- general --------------------------------------------- */
.hidden {
  opacity: 0;
}

.page {
  display: flex;
  position: absolute;
  width: 100vw;
  left: calc((100vw - var(--base-vw)) / 2);
  transform: translateX(0%);
  padding-top: var(--grid3x-paddingtop);
  pointer-events: none;

  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}
.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  left: 0;
  transform: translateX(0);
  padding-top: var(--grid3x-paddingtop);
  pointer-events: auto;

  opacity: 1;
  transition: opacity 0.25s ease-in-out;
  z-index: 10;
}

.blank {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}

.nav-link {
  transition: background-color 0.15s linear;
}


.nav-link:hover,
.tag-button:hover,
.works-item:hover {
  color: var(--color-text);
  background-color: var(--color-item-hover);
  cursor: pointer;
}

.nav-link:active,
.works-item:active {
  background-color: var(--color-item-active);
  box-shadow: var(--filter-deboss-invert);
  transition: all 0.1s linear;
}


.pressable-text {
  transform: none;
  transition: all 0.1s linear;
}

.nav-link:hover .pressable-text,
.tag-button:hover .pressable-text,
.works-item:hover .pressable-text{
  text-shadow: var(--filter-deboss-text-hover);
}

.nav-link:active .pressable-text,
.works-item:active .pressable-text{
  transform: translate(0rem, 0.15rem);
  text-shadow: var(--filter-deboss-text-active);
}


/* --------------------------------------------- HOME PAGE --------------------------------------------- */
.infotext,
.decotext {
  display: flex;
  align-items: center;
  justify-content: left;
  font-size: calc(var(--base-vw) / 66);
  word-spacing: 0.1rem;
  white-space: nowrap;
  min-width: 0;
}

.grid3x {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: var(--base-vw);
  /*gap: var(--items-gap);*/
 /* border: solid 1px gray;*/
}

.grid3x-item {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 10%;
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: var(--font-h2);
  background-color: var(--color-item);

  /* gap */
  transform: scale(0.98);
  z-index: 99;
}

.grid3x-blank {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 50;
  font-size: var(--font-h6);
  background-color: var(--color-item);
  grid-column: span 3;
}


.logo{
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translate(5%);
}

.logo svg {
  width: 38%;

  /*filter: url(#deboss);*/
}

.info_logo_wrap{
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  transform: translate(-1%,-3%);

}

.utility {
  font-size: var(--font-h4);
  /* gap */
}

/* --------------------------------------------- ABOUT PAGE --------------------------------------------- */
.grid2x {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--items-gap);
  transform: scale(0.97);
}
.grid2x-item {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 10%;
  aspect-ratio: 1;
  padding: 0.5vw;
  border-radius: 50%;
  font-size: var(--font-h4);
  text-align: center;
  background-color: var(--color-item);
  box-shadow: var(--filter-deboss);
  cursor: pointer;
}

/*mail highlight*/
@keyframes highlightAnimation {
  0%, 10%, 100% {
    background-color: transparent;
  }
  5%, 20%, 80%{
    background-color: rgba(255, 230, 0, 0.7);
  }
}
.highlight {
  animation: highlightAnimation 5s ease-out;
  border-radius: 1px;
}

.cv {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  aspect-ratio: 3/2;

  text-align: left;
  padding: 2.5vw 3.6vw;
  margin-top: 1dvh;
  margin-bottom: 1.75vw;
  border-radius: 4.5rem 4.5rem 2rem 2rem;

  background-color: var(--color-item);
  box-shadow: var(--filter-deboss);
}
.cvtitlebig {
  font-size: var(--font-h1);
  word-break: break-word;
  margin-left: -4.5px;
}
.cvtitle {
  font-size: var(--font-h2);
  word-break: break-word;
}
.cvtext {
  margin-left: 0.1rem;
  margin-top: 1.25rem;
  font-size: var(--font-h4);
  word-break: break-word;
  hyphens: auto;
}

#links .grid3x-item {
  display: flex;
  align-items: center;
  grid-column: span 2;
  aspect-ratio: 4/1;
  border-radius: 8rem 8rem 8rem 8rem;
}

#close-links {
  font-size: var(--font-h2);
}

/* --------------------------------------------- WORKS-SEARCH PAGE --------------------------------------------- */
.header-design {
  display: flex;
  position: absolute;
  width: 100%;
  min-height: var(--header-height);
  justify-content: center;
  align-items: center;
  font-size: var(--font-h4);
  border-radius: 0 0 10vw 10vw;
  background: var(--color-header);
  box-shadow: var(--filter-deboss);
  backdrop-filter: blur(4px);
  
}

.header-text-wrapper {
  max-width: 100%;
  overflow: hidden;
  transition: all 0.5s ease;
  position: relative;
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) var(--mask-stop-left),
    black calc(var(--mask-stop-left) + 3%),
    black calc(var(--mask-stop-right) - 3%),
    rgba(0,0,0,0) var(--mask-stop-right)
  );
  mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) var(--mask-stop-left),
    black calc(var(--mask-stop-left) + 3%),
    black calc(var(--mask-stop-right) - 3%),
    rgba(0,0,0,0) var(--mask-stop-right)
  );
}

.header-text-wrapper .scrolling {
  display: inline-block;
  white-space: nowrap;
  animation: scroll 110s linear infinite;
}
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* search interface */
.search {
  grid-column: span 3;
  aspect-ratio: 3/1;
  display: flex;
  flex-direction: column;
  width: var(--base-vw);

  opacity: 1;
  transition: all 0.4s ease;
}
.search.expanded {
  aspect-ratio: 1.85/1;
}

.tag-area-main {
  display: flex;
  align-items: center;
  gap: var(--items-gap);
}

.expand-container {
  display: flex;
  flex-direction: column;
  position: relative;

  /* margin for box shadow */
  padding: var(--items-gap);
  
  opacity: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}
.expand-container.expanded {
  max-height: var(--expanded-height);
  opacity: 1;
}
/* expand container mask */
.expand-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.75rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-bg)); /* deboss-lowering bottom side*/

  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease-out;
}
.expand-container.expanded::after {
  opacity: 0;
}
.expand-container:not(.expanded)::after {
  opacity: 1;
  transition: opacity 0.1s ease-in; /* collapse 시 살짝 빠르게 */
}

.tag-area-more {
  display: flex;
  gap: var(--items-gap);
  padding-right: 1rem;
}

.tag-area-year {
  display: flex;
  gap: var(--items-gap);
  padding-top: var(--items-gap);
  padding-bottom: var(--items-gap);
}

.tag-area-text {
  display: flex;
  align-items: center;
  height: 3.5rem;
  margin-top: auto;
  margin-bottom: auto;
  position: relative;
}
.tag-area-text::before, .tag-area-text:after { /* little dots on each side*/
  content: "";
  position: absolute;
  height: 0.7rem;
  width: 0.7rem;
  background: var(--color-item);
  box-shadow: inset 0rem 0rem 0.5rem rgba(255, 255, 255, 0.2), inset 0rem 0rem 0.25rem rgba(0, 0, 0, 0.75);
  border-radius: 50%;
}
.tag-area-text::before {
  left: 0.6vw;
}
.tag-area-text:after {
  right: 0.6vw;
}
.tag-text {
  display: block;
  margin-left: 5%;
  text-align: center;
  width: 90%;
  white-space: nowrap;
  transition: opacity 0.1s linear;
}
.tag-text.fade-out {
  opacity: 0;
}
.tag-text.fade-in {
  opacity: 1;
}

.tag-button, .expand-collapse-button {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.4vw;
  border-radius: 50%;
  font-size: var(--font-h6);
  text-align: center;
  word-break: break-all;

  background-color: var(--color-item);
  box-shadow: var(--filter-deboss);
  cursor: pointer;
  transition: filter 0.1s ease;
}

.tag-button.active {
  background-color: var(--color-item-active);
  color: var(--color-text);
  box-shadow: var(--filter-deboss-invert);
}

.tag-button.active .pressable-text {
  transform: translate(0rem, 0.1rem); /* 텍스트만 살짝 아래로 이동 */
  text-shadow: var(--filter-deboss-text-active);
}

.expand-collapse-button {
  flex: none;
  font-size: 1.35rem;
}
/*
.math {
  font-family: STIX Math, Latin Modern Math;
  font-weight: 600;
}
  */

.year {
  aspect-ratio: 3/1;
  border-radius: 50%;
}

/* works items in grid3x */
.works-item {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  align-items: center;
  justify-content: center;
  padding: 10px;
  aspect-ratio: 1;
  border-radius: 50%;

  font-size: var(--font-h4);
  text-align: center;
  word-break: break-word;
  word-wrap: wrap;
  pointer-events: none;
  background-color: var(--color-item);

  opacity: 0;
  transform: translateY(15px);
}

/*
.works-item .pressable-text {
  text-shadow: none;
}
*/

.works-item.visible {
  position: relative;
  pointer-events: all;

  opacity: 1;
  transform: translateY(0px);
  transition: opacity 0.3s ease, transform 0.5s ease, color 0.5s ease, text-shadow 0.5s ease, background-color 0.5s ease;
  overflow: hidden;

  /* gap */
  transform: scale(0.985);
}

.works-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit; /* 원래 둥근 모서리 유지 */
  box-shadow: var(--filter-deboss);
  z-index: 1;
  pointer-events: none;
}


.works-tmb {
  width: 100%;
  aspect-ratio: 1 / 1; 
  object-fit: cover;  
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  opacity: 0.33;
  filter: blur(3px) opacity(43%);
  transition: opacity 0.15s ease, filter 0.2s ease, transform 0.2s ease;
}
.works-tmb:hover {
  opacity: 1;
  filter: none;
}
.works-tmb:active {
  transform: scale(1.05);
  filter: brightness(0.66);
}

/* --------------------------------------------- WORKS-DETAIL PAGE --------------------------------------------- */
.works-detail {
  text-align: left;
}

.gridfreex-container {
  display: flex;
  opacity: 0;
  margin-top: 0px;
  transform: translateY(50px);
  transition: transform 0.8s ease, opacity 0.8s ease;
  border-radius: 1vw;
}
.gridfreex-container.visible {
  opacity: 1;
  transform: translateY(0px); 
}

/*
.gridfreex-shadow {
  width: var(--gridfreex-wrapper-vw);
  margin: 1.5vh auto 3vw auto;
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: url(#deboss);
  border-radius: 1vw;

  z-index: 2;
}
*/

.gridfreex-wrapper {
  width: var(--gridfreex-wrapper-vw);
  margin: 1.5vh auto 3vw auto;
  border-radius: 1vw;
  /*overflow: hidden;*/
}
.gridfreex {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.2rem;
  
  pointer-events: auto;
}
.gridfreex-cell {
  display: flex;
  align-items: center;
  border-radius: 0.1vw;
  background: var(--color-item);
  pointer-events: auto;

  word-break: break-all;
  padding: 2rem 3rem 2rem 3rem;
  
}

/* --------------------------------------------- WORKS-DETAIL gridfreex media elements --------------------------------------------- */

.break-words {
  word-break: break-word;
  hyphens: auto;
}
.txt-L,
.txt-M,
.txt-S {
  padding: 1rem 0rem 1rem 0rem;
}

.txt-XL {
  font-size: var(--font-h1);
}

.txt-L {
  font-size: var(--font-h2);
}
.txt-M {
  font-size: var(--font-h4);
}
.txt-S {
  font-size: var(--font-h5);
}

/* audio */
.audio-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2vh;
  margin-bottom: 2vh;
}

.waveform-fixed {
  width: 100%;
  height: 128px; /* WAVE_HEIGHT와 동일 */
  display: flex;
  align-items: center;  /* 중앙선 고정 */
  overflow: hidden;
}

.waveform {
  width: 100%;
  transition: opacity 0.2s ease;
  
}

.waveform:hover {
  filter: brightness(1.3);
  transition: all 0.2s ease ;
}

/* still image */
/* structure : image-wrapper -> img-container(inset effect) -> figure ( img + figcaption )*/
.image-wrapper {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  margin: auto;
}

.img-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  /*box-shadow: var(--filter-deboss);*/
  pointer-events: none;
}

.gridfreex-cell img {
  width: 100%;
  height: auto;
  object-fit: contain;

  cursor: pointer;
  border-radius: 0.05vw;

  display: block;
  /*filter: url(#deboss);*/
}
.gridfreex-cell figure {
  margin: 0;
  position: relative;
}
.gridfreex-cell figcaption {
  position: relative;
  bottom: 0;
  margin-top: 0.75vw;
  margin-bottom: 0.3rem;
  width: 100%;
  padding: 0.15rem;
  text-align: center;
  font-size: var(--font-h6);
}

/* modal */
.modal {
  display: none; /* 기본 숨김 */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--color-header);
  -webkit-backdrop-filter: blur(50px); /* Safari 우선 */  
  backdrop-filter: blur(50px);
  background-clip: padding-box; 
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 0.05vw;
}

/* 닫기 버튼 */
.close {
  position: absolute;
  color: var(--color-item-active);
  font-size: var(--font-h1);
  cursor: pointer;
  text-shadow: none;
}
.close-tl {
  top: 2rem;
  left: 2.5rem;
}
.close-tr {
  top: 2rem;
  right: 2.5rem;
}
.close-bl {
  bottom: 2rem;
  left: 2.5rem;
}
.close-br {
  bottom: 2rem;
  right: 2.5rem;
}
.close:hover {
  filter: brightness(2);
}

/* video */
.video-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.video-container {
  max-width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 0.05vw;
  /*filter: var(--filter-deboss);*/
}
.video-container.video-overlay video {
  filter: brightness(0.3) blur(1px);
}
.video-container.hide-cursor {
  cursor: none;
}
.video-container video {
  width: 100%;
  height: 100%;
  border: 0;
  transition: filter 0.1s linear;
}

.controls-div {
  display: flex;
  flex-direction: row;
  gap: 1.75vw;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: scale(1) translate(-50%, -50%);
}
.video-container:fullscreen .controls-div {
  gap: 5.25vw;
}

.sound-button,
.play-pause-button,
.fullscreen-button {
  position: relative;
  text-align: center;
  font-size: 1.2vw;
  width: 1.75vw;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: none;
  text-shadow: none;
}
.video-container:hover .sound-button,
.video-container:hover .play-pause-button,
.video-container:hover .fullscreen-button {
  display: block;
}
.video-container:fullscreen .sound-button,
.video-container:fullscreen .play-pause-button,
.video-container:fullscreen .fullscreen-button {
  font-size: 1.5vw;
  width: 2.5vw;
}
.video-container:fullscreen .volume-slider {
  font-size: 1rem;
  width: 4vw;
  height: 1250%;
}

/* 볼륨 슬라이더 스타일 */
.volume-slider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2vw;
  height: 600%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 1vw 10vw;
  cursor: pointer;
  display: none; /* 기본에는 숨김 */
  overflow: hidden;
}

/* 슬라이더 내 볼륨 채움 효과 */
.volume-slider .volume-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%; /* 초기 볼륨 25% 반영 */
  background: white;
}


.video-caption {
  margin-top: 0.5rem;
  width: 100%;
  text-align: center;
  font-size: var(--font-h6);
}

video:fullscreen {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

/* 오디오 파일 로딩중 CSS */
.audio-wrapper { position: relative; width: 100%; }
.waveform { width: 100%; }

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.loading-overlay.hidden { display: none; }

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.95);
  border-top: 3px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* --------------------------------------------- conditions --------------------------------------------- */

#works.page.active {
  position: static;
}

#links .grid3x,
#works .grid3x {
  margin-bottom: 5dvh;
}

#works-detail.page.active {
  padding-top: var(--header-height);
}

/* --------------------------------------------- media queries (cleaned) --------------------------------------------- */

/* ultrawide */
@media (min-aspect-ratio: 21/9) {
  .search { padding-top: var(--header-height); }
}

/* <= 1200px */
@media (max-width: 1200px) {
  :root{
    --base-vw: 60vw;
    --gridfreex-wrapper-vw: 85vw;
    
    --font-h1: 2.2rem;
    --font-h2: 1.65rem;
    --font-h3: 1.25rem;
    --font-h4: 1.025rem;
    --font-h5: .9rem;
    --font-h6: .8rem;

  }

  .cv { padding: 3.5vw 6.7vw; }
  .logo { width: 38%; }
  .logo path { stroke-width: 0; }

  .waveform-fixed {
    height: 90px;
  }
}

/* <= 1024px (pc small) */
@media (max-width: 1024px) {
  :root{
    --base-vw: 66vw;
    --gridfreex-wrapper-vw: 90vw;

    --font-h1: 2.2rem;
    --font-h2: 1.65rem;
    --font-h3: 1.25rem;
    --font-h4: 0.925rem;
    --font-h5: 0.875rem;
    --font-h6: 0.75rem;
  }
  .cv { padding: 6vw 7vw; }
  
  .waveform-fixed {
    height: 85px;
  }
}
/* tablet tall (<=1024px && tall screens) */
@media (max-width: 1024px) and (min-height: 1024px) {
  #works.page {
    padding-top: calc(var(--grid3x-paddingtop) - var(--base-vw) / 3);
  }
}

/* mobile <=768px */
@media (max-width: 768px) {
  :root{
    --base-vw: 93vw;
    --gridfreex-wrapper-vw: 100vw;

    --font-h1: 1.45rem;
    --font-h2: 1.15rem;
    --font-h3: 0.85rem;
    --font-h4: 0.725rem;
    --font-h5: 0.675rem;
    --font-h6: 0.55rem;
  }

  .logo { width: 28%; }

  .cv{
    border-radius: 2.5rem;
    padding: 3.8vw 9.2vw;
  }

  .cvtitlebig {
    padding-left: 0.15rem;
  }

  .search{
    position: relative;
    transform: translateY(calc((var(--grid3x-paddingtop) - var(--header-height)) * -0.5));
  }

  .tag-button { font-size: calc(1rem - 1.33vw); }
  .tag-area-text { transform: translateY(calc(var(--header-height) * .25)); }

  .gridfreex-cell { padding: 0.66rem 1rem; }

  .waveform-fixed {
    height: 64px;
  }

  /* video player changes */
  .fullscreen-button, .play-pause-button { width: 8vw; }

  .sound-button {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
  }

  .video-container:fullscreen .sound-button {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
  }

  .video-container:fullscreen .play-pause-button,
  .video-container:fullscreen .fullscreen-button {
    position: relative;
    visibility: visible;
    pointer-events: all;
    width: 20vw;
  }
}

/* smaller mobile <=480px */
@media (max-width: 480px) {
  .tag-button {
    font-size: calc(1rem - 1.4vw);
    padding: 0.5rem;
  }
  body {background: rgba (255,255,255,0.5);} /* test */
}