/* ══════════════════════════════════════════════════════════════
   CSS VARIABLES  — edit here to retheme the entire site
══════════════════════════════════════════════════════════════ */
:root {
  /* Palette */
  --bg: #000000;
  --text: #ffffff;
  --text-sub: #aaaaaa;

  /* Accent colors */
  --blue: #0055ff;
  --cyan: #00e5ff;
  --purple: #bd00ff;
  --pink: #ff007f;
  --yellow: #ffff00;

  /* Glows */
  --glow-blue: 0 0 10px rgba(0, 85, 255, .7), 0 0 25px rgba(0, 85, 255, .3);
  --glow-purple: 0 0 10px rgba(189, 0, 255, .6), 0 0 20px rgba(189, 0, 255, .3);
  --glow-yellow: 0 0 10px rgba(255, 255, 0, .6), 0 0 20px rgba(255, 255, 0, .3);
  --glow-pink: 0 0 10px rgba(255, 0, 127, .6), 0 0 20px rgba(255, 0, 127, .3);

  /* Typography */
  --font-retro: 'Press Start 2P', 'DotGothic16', monospace;
  --font-pixel: 'DotGothic16', sans-serif;
  --font-sans: 'Montserrat', 'Noto Sans JP', sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --speed: 0.85s;
}

/* ══════════════════════════════════════════════════════════════
   BASE RESET
══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Blue scrollbars everywhere ── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--blue) rgba(0, 0, 0, .35);
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .35);
}

::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* ── Outer vivid-blue frame ── */
.frame {
  position: fixed;
  inset: 10px;
  border: 4px solid var(--blue);
  box-shadow: var(--glow-blue), inset var(--glow-blue);
  pointer-events: none;
  z-index: 9999;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════
   GEOMETRIC BACKGROUND
══════════════════════════════════════════════════════════════ */
.geo-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Slow-moving grid lines */
.geo-grid {
  position: absolute;
  inset: -100px;
  background-image:
    linear-gradient(rgba(0, 85, 255, .042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 85, 255, .042) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 32s linear infinite;
}

@keyframes gridDrift {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(48px, 48px);
  }
}

/* Wireframe floating shapes — injected by JS */
@keyframes geoFloat {
  0% {
    transform: translate(0px, 0px) rotate(0deg) scale(1.00);
  }

  33% {
    transform: translate(18px, -22px) rotate(60deg) scale(1.07);
  }

  66% {
    transform: translate(-12px, 14px) rotate(-30deg) scale(0.94);
  }

  100% {
    transform: translate(6px, -8px) rotate(20deg) scale(1.04);
  }
}

.SP {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 25px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  padding: 10px 20px;
}

.header-logo a {
  font-family: var(--font-retro);
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
  transition: color .3s ease;
}

.header-logo a:hover {
  color: var(--blue);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-item a {
  font-family: var(--font-retro);
  font-size: .8rem;
  color: var(--text-sub);
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: color .3s ease, text-shadow .3s ease;
}

.nav-item.active a,
.nav-item a:hover {
  color: var(--blue);
  text-shadow: var(--glow-blue);
}

/* ══════════════════════════════════════════════════════════════
   SIDE NAV DOTS
══════════════════════════════════════════════════════════════ */
.nav-dots {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1000;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: transparent;
  cursor: pointer;
  transition: all .35s ease;
}

.dot.active {
  background: var(--blue);
  box-shadow: var(--glow-blue);
  transform: scale(1.3);
}

.dot:hover {
  transform: scale(1.15);
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS CONTAINER
══════════════════════════════════════════════════════════════ */
.sections-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transition: transform var(--speed) var(--ease);
  will-change: transform;
}

.section {
position: absolute;
width: 100%;
height: 100vh;
top: 50%;
left: 0;
transform: translateY(-50%);

padding: 100px 80px 80px;
display: flex;
justify-content: center; /* 左右中央 */
align-items: center;     /* 上下中央 */
overflow: hidden;
}

.section-content {
  width: 100%;
  max-width: 1600px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.section.active .section-content {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   TOP SECTION
══════════════════════════════════════════════════════════════ */
.section-top {
  text-align: center;
}

.top-hero {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Hero photo */
.top-photo-wrap {
  flex-shrink: 0;
  animation: fadeIn .9s ease both;
}

.top-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Main heading — no stretch animation */
.top-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3.8rem);
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow:
    0 2px 12px rgba(255, 255, 255, .45),
    0 0 30px rgba(255, 255, 255, .18);
  animation: fadeIn .9s .1s ease both;
}

.top-title-x {
  color: var(--blue);
  text-shadow: var(--glow-blue);
  margin: 0 4px;
}

/* Category shortcut tags — white border */
.top-category-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeIn .9s .25s ease both;
}

.top-cat-btn {
  font-family: var(--font-retro);
  font-size: 0.62rem;
  line-height: 0.62rem;
  color: #fff;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, .5);
  padding: 10px 18px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background .25s ease, border-color .25s ease,
    box-shadow .25s ease, transform .25s ease;
}

.top-cat-btn:hover {
  background: var(--blue);
  border: 1px solid var(--blue);
}

/* Scroll indicator — text only */
.scroll-indicator {
  margin-top: 40px;
  cursor: pointer;
  animation: fadeIn .9s .4s ease both;
}

.scroll-text {
  font-family: var(--font-retro);
  font-size: .65rem;
  color: var(--yellow);
  letter-spacing: 2px;
  animation: flash 1.5s infinite;
}

@keyframes flash {

  0%,
  100% {
    opacity: 0;
  }

  49% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  99% {
    opacity: 1;
  }
}

/* Copyright */
.top-copyright {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-retro);
  font-size: .5rem;
  color: rgba(255, 255, 255, .5);
  letter-spacing: 2px;
  white-space: nowrap;
  animation: fadeIn 1s .6s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════════════════════
   PROFILE SECTION
══════════════════════════════════════════════════════════════ */
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 4px;
  background: var(--blue);
}

.profile-grid {
  display: flex;
  width: 80%;
  max-height: 100%;
  margin: auto;
  gap: 80px;
  align-items: start;
}

.profile-img-container {
  display: flex;
  height: 100%;
  justify-content: center;
  order: 2;
}

.profile-img {
  object-fit: contain;
  object-position: center top;
  border-radius: 6px;
  transition: box-shadow .4s ease, transform .4s ease;
  display: block;
}

.profile-details {
  display: flex;
  margin: auto 0px;
  margin-right: auto;
  width: 60%;
  flex-direction: column;
  gap: 30px;
}

.profile-group {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name {
  font-family: var(--font-retro);
  font-size: 1.1rem;
  color: var(--blue);
}

.profile-line {
  height: 0.5px;
  border: solid 1px var(--blue);
  opacity: 0.5;
  width: 100%;
}

.profile-bio {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text);
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════
   WORKS SECTION
══════════════════════════════════════════════════════════════ */
.works-categories {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  margin-top: 22px;
}

.category-btn {
  font-family: var(--font-retro);
  font-size: .72rem;
  color: #fff;
  background: rgba(0, 0, 0, .7);
  border: 1px solid var(--text);
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.category-btn:hover {
  background: var(--blue);
  border: 1px solid var(--blue);
}

.category-btn.active {
  background: var(--blue);
  border: 1px solid var(--blue);
}

.category-btnn:not(.active):hover {
  background: var(--text);
  color: #000;
  transform: translateY(-2px);
}



.works-grid-wrapper {
  flex-grow: 1;
  width: 100%;
  overflow-y: auto;
  padding-right: 4px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding-bottom: 40px;
}

.work-card {
  border: 1px solid var(--text);
  background: rgba(0, 0, 0, .85);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color .35s, box-shadow .35s,
    transform .35s cubic-bezier(.165, .84, .44, 1);
}

.work-card:hover {
  border-color: var(--blue);
  box-shadow: var(--glow-blue);
}

.work-card-media {
  width: 100%;
  aspect-ratio: 16/10;
  background: #111;
  overflow: hidden;
  transition: border-color .35s;
}

.work-card:hover .work-card-media {
  border-color: var(--blue);
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.work-card:hover .work-card-media img {
  transform: scale(1.08);
}

.work-card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-grow: 1;
}

.work-card-tag {
  font-size: .58rem;
  color: var(--yellow);
}

.work-card-title {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: #fff;
}

.work-card-desc {
  font-family: var(--font-pixel);
  font-size: .85rem;
  color: var(--text-sub);
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ══════════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  width: 96vw;
    height: 96%;
  background: rgba(5, 5, 5, .96);
  border: 3px solid var(--blue);
  box-shadow: var(--glow-blue);
  border-radius: 8px;
  overflow: hidden;
  transform: scale(.84);
  transition: transform .45s var(--ease);
  z-index: 10001;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--blue);
  font-size: 1.8rem;
  cursor: pointer;
  text-shadow: var(--glow-blue);
  transition: color .3s, transform .3s;
}

.modal-close:hover {
  color: var(--pink);
  text-shadow: var(--glow-pink);
  transform: scale(1.1) rotate(90deg);
}

.modal-body {
  display: grid;
  height: 100%;
  grid-template-columns: 1.2fr 1fr;
}

.modal-media-container {
  background: #000;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--blue);
}

.modal-media-container img {
      max-width: 100%;
    max-height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 0px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background: rgba(0, 0, 0, .5);
}

.modal-category {
      font-size: 0.8rem;
    font-weight: 600;
  color: var(--blue);
}

.modal-title {
  font-size: 1.6rem;
  color: #fff;
}

.modal-desc {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-sub);
}

/* ============================================================
   WORKS - PC 2 COLUMN
============================================================ */

.works-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(500px, 1.4fr);
  gap: 50px;

  width: 100%;
  height: calc(100vh - 180px);
  min-height: 500px;
}


/* ─────────────────────────────────────────
   LEFT : WORK LIST
───────────────────────────────────────── */

.works-list-wrapper {
  min-height: 0;
  overflow-y: auto;
}

.works-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  overflow-x: hidden;
}

.work-list-item {
  display: grid;

  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0);
  background: rgba(255, 255, 255, 0);

  color: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    border-color .3s ease,
    background .3s ease,
    transform .3s ease;
}

.work-list-item:hover {
  border-color: var(--text);
}

.work-list-item.active {
  border-color: var(--blue);
}


/* image */

.work-list-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.work-list-media img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform .5s ease;
}

.work-list-item:hover .work-list-media img {
  transform: scale(1.05);
}


/* text */

.work-list-info {
  min-width: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.work-list-tag {
  display: block;

  margin-bottom: 8px;

  color: #508cff;

  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
}

.work-list-title {
  margin: 0;

  color: #fff;

  font-size: 15px;
  line-height: 1.5;
}


/* ─────────────────────────────────────────
   RIGHT : DETAIL
───────────────────────────────────────── */

.works-detail {
  min-width: 0;
  min-height: 0;

  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;

  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.works-detail-media {
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.works-detail-media img {
  display: block;

  height: 100%;
  margin: auto;
  object-fit: cover;
}

.works-detail-info {
  padding: 28px 32px 32px;
}

.works-detail-tag {
  display: block;

  margin-bottom: 10px;

  color: var(--blue);

  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
}

.works-detail-title {
  margin: 0 0 14px;

  color: #fff;

  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.35;
}

.works-detail-desc {

  margin: 0;

  color: rgba(255, 255, 255, 0.65);

  font-size: 14px;
  line-height: 2;
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  .SP {
    display: block;
  }


  .section {
    padding: 90px 40px 40px;
  }

  .nav-dots {
    display: none;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    flex-direction: column-reverse;
    align-items: center;
    overflow-y: auto;
    padding: 0px 0px;
    gap: 40px;
  }

  .profile-details {
    width: 96%;
  }

  .profile-img {
    width: 40%;
    height: fit-content;
  }

  .profile-img-container {
    display: flex;
    height: auto;
    justify-content: center;
    order: 1;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-media-container {
    border-right: none;
    border-bottom: 1px solid var(--blue);
    aspect-ratio: 16/9;
  }

  /* ==========================================================
     WORKS
     TABLET / MOBILE
  ========================================================== */

  .works-layout {
    display: none;
  }

  .works-grid-wrapper {
    display: block;
    width: 100%;
    height: auto;
    overflow-y: auto;
    height: 100%;
  }

  .works-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 96%;
  }


  /* ==========================================================
     CARD
  ========================================================== */

  .work-card {
    display: block;

    width: 100%;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);

    cursor: pointer;

    transition:
      transform .3s ease,
      border-color .3s ease,
      background .3s ease;
  }

  .work-card:hover {
    border-color: rgba(80, 140, 255, 0.5);
    background: rgba(80, 140, 255, 0.05);
  }


  /* image */

  .work-card-media {
    width: 100%;
    aspect-ratio: 16 / 10;

    overflow: hidden;
  }

  .work-card-media img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .5s ease;
  }

  .work-card:hover .work-card-media img {
    transform: scale(1.04);
  }


  /* information */

  .work-card-info {
    padding: 18px 20px 20px;
    gap: 0px;
  }

  .work-card-tag {
    display: block;

    margin-bottom: 7px;

    color: var(--blue);

    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
  }

  .work-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    margin: 0 0 10px;
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    overflow: hidden;
  }

  .work-card-desc {
    margin: 0;

    color: rgba(255, 255, 255, 0.55);

    font-size: 12px;
    line-height: 1.8;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
  }


  /* ==========================================================
     CATEGORY
  ========================================================== */

  .works-categories {
    display: flex;

    width: 100%;

    gap: 8px;

    margin-top: 0px;

    overflow-x: auto;
    overflow-y: hidden;

    padding-bottom: 10px;

    scrollbar-width: none;
  }

  .works-categories::-webkit-scrollbar {
    display: none;
  }

  .category-btn {
    flex: 0 0 auto;
  }


  /* ==========================================================
     MODAL
  ========================================================== */

  .modal {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 9999;

    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
      opacity 0.35s cubic-bezier(.22, 1, .36, 1),
      visibility 0.35s;
  }

  .modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);

    opacity: 0;

    transition: opacity 0.45s cubic-bezier(.22, 1, .36, 1);
  }

  .modal.active .modal-backdrop {
    opacity: 1;
  }

  .modal-content {
    position: relative;
    z-index: 1;

    width: min(90vw, 760px);
    max-height: 90vh;
    overflow-y: auto;

    background: #111722;
    border: 1px solid rgba(255, 255, 255, 0.12);

    /*
   * 初期状態
   */
    opacity: 0;
    transform: scale(0.65);

    /*
   * イージング
   */
    transition:
      opacity 0.38s cubic-bezier(.22, 1, .36, 1),
      transform 0.55s cubic-bezier(.16, 1, .3, 1);
  }

  .modal.active .modal-content {
    opacity: 1;
    transform: scale(1);
  }

  .modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);

    opacity: 0;

    transition:
      opacity 0.45s cubic-bezier(.22, 1, .36, 1);
  }

  .modal.active .modal-backdrop {
    opacity: 1;
  }



  .modal-body {
    display: flex;
    flex-direction: column;
  }

  .modal-media-container {
    width: 100%;
  }

  .modal-media-container img {
    display: block;


    object-fit: cover;

    background: #080b10;
  }

  .modal-info {
    padding: 25px;
    padding-bottom: 40px;
    gap: 0px;
  }

  .modal-category {
    display: block;

    margin-bottom: 8px;

    color: var(--blue);

    font-size: 10px;
    letter-spacing: .12em;
  }

  .modal-title {
    margin: 0 0 14px;

    color: #fff;

    font-size: 22px;
    line-height: 1.4;
  }

  .modal-desc {
    margin: 0;

    color: rgba(255, 255, 255, 0.65);

    font-size: 13px;
    line-height: 1.9;
  }

}

@media (max-width: 768px) {
  .frame {
    inset: 5px;
    border-width: 2px;
  }

  .header {
    top: 15px;
    left: 15px;
    right: 15px;
    padding: 6px 12px;
  }

  .header-logo a {
    font-size: .75rem;
  }

  .nav-list {
    gap: 14px;
  }

  .nav-item a {
    font-size: .55rem;
  }

  .section {
    padding: 85px 24px 50px;
  }

  .top-photo-wrap {
    width: 200px;
    height: auto;
  }

  .top-title {
    font-size: clamp(1.2rem, 7vw, 2rem);
  }

  .top-cat-btn {
    font-size: .58rem;
    padding: 8px 12px;
  }

  .top-copyright {
    font-size: .38rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .profile-img {
    width: 100%;
  }

  .profile-bio {
    font-size: .88rem;
  }

  .works-categories {
    gap: 7px;
  }

  .category-btn {
    font-size: .6rem;
    padding: 7px 10px;
  }

  .works-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .works-grid {
    padding-top: 8px;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .work-card-info {
    padding: 16px 18px 18px;
  }

  .work-card-title {
    font-size: 14px;
  }

  .work-card-desc {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .modal-content {
    width: 92vw;
    max-height: 88vh;
  }


  .modal-title {
    font-size: 19px;
  }
}

@media (max-width: 480px) {

  .top-category-tags {
    gap: 8px;
  }
}

.work-url-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  margin-top: 18px;
  padding: 4px 8px;

  color: var(--text);
  background: transparent;
  border: 1px solid var(--text);
  border-radius: 999px;

  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;

  cursor: pointer;

  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

#detail-url {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#detail-url.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.work-url-btn:hover {
  color: var(--text);
  background-color: var(--blue);
  border-color: var(--blue);
}

.work-card-days,
.work-detail-days,
.modal-days {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
}

.work-card-desc,
.work-detail-desc,
#modal-desc {
  margin-top: 0;
}

@media (min-width: 1025px) {
  #detail-img {
    cursor: pointer;
    transition: opacity 0.2s ease-in;
  }
    #detail-img:hover {
    opacity: 0.8;
  }
}