/* =============================================================
   7days — Portfolio (work.html)
   ============================================================= */

body.page-work { background: var(--c-paper); }

/* Hero strip ------------------------------------------------- */
.work-hero {
  padding: calc(var(--header-h) + 56px) 0 56px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-paper);
}
.work-hero .container {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.work-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(46px, 7vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
}
.work-hero h1 em { font-style: italic; color: var(--c-accent); }
.work-hero .meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--c-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: right;
}
.work-hero .meta strong { color: var(--c-ink); font-weight: 600; font-family: var(--f-display); font-size: 18px; letter-spacing: -0.005em; }

/* --- Layout: sidebar + content ------------------------------ */
.section.work {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
  padding: 0;
  background: var(--c-paper);
}

.main-cont-nav-work {
  width: 215px;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  padding: 32px 0 40px 60px;
  z-index: 5;
}
.main-cont-nav-work .nav-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 24px;
  display: block;
}
.work-nav-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wrapper-nav-work {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out),
              padding var(--t-fast) var(--ease-out);
  overflow: hidden;
  border: 1px solid transparent;
}
.wrapper-nav-work a { display: contents; }
.wrapper-nav-work .dot {
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(14,14,16,0.30);
  transition: background var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
  margin: 0 4px;
}
.wrapper-nav-work .thumb {
  width: 0; height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-paper-warm);
  flex-shrink: 0;
  transition: width var(--t-fast) var(--ease-out),
              opacity var(--t-fast) var(--ease-out);
  opacity: 0;
}
.wrapper-nav-work .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.wrapper-nav-work .name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--c-ink);
  opacity: 0;
  max-width: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--t-fast) var(--ease-out),
              max-width var(--t-fast) var(--ease-out);
}

/* Hover state — expand */
.wrapper-nav-work:hover {
  background: rgba(14,14,16,0.04);
}
.wrapper-nav-work:hover .thumb { width: 40px; opacity: 1; }
.wrapper-nav-work:hover .name { opacity: 1; max-width: 200px; }
.wrapper-nav-work:hover .dot { background: var(--c-accent); }

/* Active state — pill with name (no thumb) */
.wrapper-nav-work.active {
  background: var(--c-ink);
  border-color: var(--c-ink);
}
.wrapper-nav-work.active .dot {
  background: var(--c-accent);
  transform: scale(1.2);
}
.wrapper-nav-work.active .name {
  color: #fff;
  opacity: 1;
  max-width: 200px;
}
.wrapper-nav-work.active .thumb { width: 0; opacity: 0; }

/* --- Main content area -------------------------------------- */
.main-wrapper-work {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 77px;
  padding: calc(var(--header-h) + 32px) clamp(28px, 4vw, 60px) 80px 28px;
}

/* --- Project block ------------------------------------------ */
.main-project-wrapper {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 64px 8px 8px;
  margin-bottom: 123px;
  border-top: 1px solid var(--c-line);
  position: relative;
}
.main-project-wrapper:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 16px;
}
.main-project-wrapper .index-tag {
  position: absolute;
  top: 18px;
  right: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.cont-project-content {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding-left: 16px;
}
.content-project-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.content-project-info.first {
  gap: 14px;
}
.proj-title {
  font-family: var(--f-display);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--c-ink);
  margin: 0;
}
.proj-type {
  color: var(--c-muted);
  font-size: 14px;
  letter-spacing: 0.01em;
  margin: 0;
}
.proj-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 4px;
  font-weight: 600;
}
.content-project-info p:not(.proj-label):not(.proj-type) {
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-ink);
  margin: 0;
}

.pill-year {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 0.8px solid rgba(0,0,0,0.12);
  border-radius: 320px;
  padding: 6px 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-ink);
  letter-spacing: 0.04em;
}

.proj-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 18px;
  border-radius: 100px;
  background: var(--c-ink);
  color: var(--c-paper);
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
  margin-top: 6px;
  transition: background var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.proj-live-btn:hover { background: var(--c-ink-soft); transform: translateY(-2px); }
.proj-live-btn .arrow-circle {
  display: inline-flex;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-accent);
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}

.services-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill-service {
  display: inline-flex;
  align-items: center;
  border: 0.8px solid rgba(178,30,53,0.16);
  border-radius: 5px;
  padding: 6px 11px;
  font-size: 13px;
  color: var(--c-ink);
  background: #fff;
  letter-spacing: 0.005em;
}

/* --- Image gallery grid ------------------------------------- */
.cont-project-imgs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-left: 16px;
}

.img-project,
.video-cont-p2 {
  grid-column: span 4;
  width: 100%;
  height: clamp(380px, 46vw, 640px);
  max-height: calc(100svh - var(--header-h) - 96px);
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-paper-deep);
  position: relative;
}
.img-project.small,
.video-cont-p2.small {
  grid-column: span 1;
  height: clamp(150px, 16vw, 220px);
}
.img-project.medium,
.video-cont-p2.medium {
  grid-column: span 2;
  height: clamp(260px, 30vw, 440px);
}
.video-cont-p2.big { grid-column: span 4; }
.video-cont-p2:not(.big):not(.small):not(.medium) {
  grid-column: span 2;
  height: clamp(260px, 30vw, 440px);
}

.img-project img,
.img-project video,
.video-cont-p2 video,
.video-cont-p2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.video-cont-p2 .play-badge {
  position: absolute;
  bottom: 14px; left: 14px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(14,14,16,0.6);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 2;
  pointer-events: none;
}
.video-cont-p2 .play-badge::before {
  content: "";
  width: 0; height: 0;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* Hidden items toggle */
.hide { display: none !important; }

.show-more-row {
  display: flex;
  justify-content: center;
  padding: 24px 16px 0;
}
.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-line);
  background: #fff;
  color: var(--c-ink);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}
.show-more-btn:hover { background: var(--c-paper-warm); border-color: rgba(0,0,0,0.18); }
.show-more-btn .chev {
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: transform var(--t-fast) var(--ease-out);
}
.show-more-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* --- End-of-portfolio cap ----------------------------------- */
.work-end {
  padding: clamp(80px, 14vh, 160px) 0 clamp(60px, 8vh, 80px);
  text-align: center;
  border-top: 1px solid var(--c-line);
  background: var(--c-paper);
}
.work-end h2 {
  font-family: var(--f-display);
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin: 0 auto;
  font-weight: 400;
}
.work-end h2 em { font-style: italic; color: var(--c-accent); }
.work-end .row {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Responsive --------------------------------------------- */
@media (max-width: 1080px) {
  .section.work {
    flex-direction: column;
    min-height: auto;
    overflow: visible;
  }

  .main-cont-nav-work {
    position: relative;
    top: auto;
    width: 100%;
    height: auto;
    padding: 14px var(--pad-x);
    background: var(--c-paper);
    border-bottom: 1px solid var(--c-line);
    z-index: 4;
    overflow-x: auto;
  }

  .main-cont-nav-work .nav-label { display: none; }

  .work-nav-list {
    flex-direction: row;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }

  .work-nav-list::-webkit-scrollbar { display: none; }

  .wrapper-nav-work {
    flex-shrink: 0;
    padding: 7px 12px;
    background: rgba(14,14,16,0.04);
  }

  .wrapper-nav-work .name {
    opacity: 1;
    max-width: none;
    font-size: 12px;
  }

  .wrapper-nav-work .thumb,
  .wrapper-nav-work .dot {
    display: none;
  }

  .wrapper-nav-work.active { background: var(--c-ink); }
  .wrapper-nav-work.active .name { color: #fff; }

  .main-wrapper-work {
    padding: 48px var(--pad-x) 70px;
    width: 100%;
    gap: 56px;
  }

  .cont-project-content {
    flex-wrap: wrap;
    gap: 24px;
    padding-left: 0;
  }
  .content-project-info {
    flex: 1 1 calc(50% - 12px);
    min-width: 220px;
  }

  .cont-project-imgs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
  }

  .img-project,
  .video-cont-p2,
  .img-project.medium,
  .video-cont-p2.medium,
  .video-cont-p2.big {
    grid-column: span 2 !important;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .img-project.small,
  .video-cont-p2.small {
    grid-column: span 1 !important;
    aspect-ratio: 1 / 1;
  }

  .img-project img,
  .img-project video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--c-paper-deep);
  }

  .video-cont-p2 video,
  .video-cont-p2 img {
    height: 100%;
    object-fit: contain;
    background: var(--c-paper-deep);
  }
}

@media (max-width: 760px) {
  .main-wrapper-work {
    padding-top: 34px;
    gap: 48px;
  }
  .main-project-wrapper {
    margin-bottom: 56px;
    padding: 40px 0 0;
    gap: 28px;
  }
  .cont-project-content {
    flex-direction: column;
    padding-left: 0;
    gap: 18px;
  }
  .content-project-info { flex: 1 1 100%; min-width: 0; }
  .cont-project-imgs {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .img-project,
  .video-cont-p2,
  .img-project.small, .img-project.medium,
  .video-cont-p2.small, .video-cont-p2.medium,
  .video-cont-p2.big {
    grid-column: span 1 !important;
    height: auto;
  }

  .img-project,
  .img-project.small,
  .img-project.medium,
  .video-cont-p2,
  .video-cont-p2.small,
  .video-cont-p2.medium,
  .video-cont-p2.big {
    aspect-ratio: 16 / 10;
  }

  .proj-title { font-size: clamp(28px, 8vw, 40px); }

  .work-hero { padding-top: calc(var(--header-h) + 24px); padding-bottom: 28px; }
  .work-hero .container { align-items: flex-start; }
  .work-hero .meta { text-align: left; }
}
