/* ==========================================================================
   uncarved · static site stylesheet (Hostinger)
   Fonts and images load from /assets, so nothing depends on Google or a CDN
   (works in mainland China). Swap assets/images/background.jpg for your photo.
   ========================================================================== */


@font-face { font-family: "uc-inter"; font-weight: 300; font-display: swap; src: url("../assets/fonts/Inter-300Light.woff2") format("woff2"); }
@font-face { font-family: "uc-inter"; font-weight: 400; font-display: swap; src: url("../assets/fonts/Inter-400Regular.woff2") format("woff2"); }
@font-face { font-family: "uc-inter"; font-weight: 500; font-display: swap; src: url("../assets/fonts/Inter-500Medium.woff2") format("woff2"); }
@font-face { font-family: "uc-rubik"; font-weight: 800; font-display: swap; src: url("../assets/fonts/Rubik-800ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "uc-noto"; font-weight: 400; font-display: swap; src: url("../assets/fonts/NotoSerifJP-400Regular-subset.woff2") format("woff2"); }
@font-face { font-family: "uc-noto"; font-weight: 700; font-display: swap; src: url("../assets/fonts/NotoSerifJP-700Bold-subset.woff2") format("woff2"); }

/* 0. Page + background photo (a fixed layer, so it also stays put on iPhone) */
html { background: #14161d; }
body { margin: 0; min-height: 100%; background: transparent; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #14161d url("../assets/images/background.jpg") center / cover no-repeat;
}
main { display: block; }
img { display: block; max-width: 100%; }
.uc-hero-word { overflow-wrap: normal; }

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --uc-cobalt: #3A5BA0;
  --uc-periwinkle: #8C9CCF;
  --uc-navy: #1C2233;
  --uc-ink-soft: #4A5068;                     /* secondary text on cream (stickers only) */
  --uc-cream: #EDE8DC;
  --uc-soft: rgb(237 232 220 / .74);         /* secondary text on the dark photo */
  --uc-line: rgb(237 232 220 / .32);         /* rules, dotted leaders, dashed slots */
  --uc-accent: #A9B6E0;                      /* periwinkle, lifted a touch: blue that reads on dark */
  --uc-shadow: 0 1px 2px rgb(8 10 18 / .45), 0 0 18px rgb(8 10 18 / .35);
  --uc-tape: rgb(222 214 196 / .8);

  --uc-sans: "uc-inter", "Helvetica Neue", Arial, sans-serif;
  --uc-display: "uc-rubik", "Arial Rounded MT Bold", "Helvetica Neue", sans-serif;
  --uc-cjk: "uc-noto", "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", serif;

  --uc-xs: 12px;
  --uc-sm: 14px;
  --uc-md: clamp(16px, 15px + .35vw, 20px);

  --uc-gutter: clamp(16px, 4vw, 48px);
  --uc-gap: clamp(48px, 9vw, 120px);
  --uc-max: 1440px;
  --uc-ease: cubic-bezier(.22, .61, .36, 1);
}

/* 2. Site base ------------------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  color: var(--uc-cream);
  font-family: var(--uc-sans);
  -webkit-font-smoothing: antialiased;
}

/* site-wide film grain: no upload needed, never blocks clicks */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .12 0 0 0 0 .2 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 3. Kit root: the whole page sits inside <div class="uc"> ------------------ */
.uc {
  max-width: var(--uc-max);
  margin: 0 auto;
  padding: 0 var(--uc-gutter);
  font-family: var(--uc-sans);
  font-size: var(--uc-sm);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--uc-cream);
  text-shadow: var(--uc-shadow);   /* keeps type legible over bright patches of the photo */
  white-space: normal;
  text-transform: lowercase;
}
.uc br { display: none; }        /* stray line breaks from the editor never shift the layout */
.uc *, .uc *::before, .uc *::after { box-sizing: border-box; }
.uc h1, .uc h2, .uc p, .uc dl, .uc dd, .uc figure { margin: 0; padding: 0; }
.uc h1, .uc h2 {
  font-family: var(--uc-sans);
  font-weight: 300;
  font-size: var(--uc-md);
  line-height: 1.1;
  letter-spacing: .14em;
}
.uc a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  transition: color .4s var(--uc-ease);
}
.uc a:hover { color: var(--uc-accent); }
.uc [lang="ja"], .uc .uc-jp { font-family: var(--uc-cjk); text-transform: none; }

/* images fill whatever slot they sit in */
.uc .uc-slot img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
}
.uc .uc-slot img { object-fit: cover; }

/* an empty slot shows a labelled dashed box until an image is dropped in */
.uc-slot { position: relative; overflow: hidden; }
.uc-slot:not(:has(img)) {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px dashed var(--uc-line);
  background: rgb(8 10 18 / .18);
  color: var(--uc-soft);
  font-size: var(--uc-xs);
  text-align: center;
}

/* 4. Shared pieces ----------------------------------------------------------- */
.uc-label {
  font-size: var(--uc-xs);
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--uc-soft);
}
.uc-v { writing-mode: vertical-rl; line-height: 1; user-select: none; }
.uc-block { background: var(--uc-cobalt); color: var(--uc-cream); padding: 16px; text-shadow: none; }
.uc-block .uc-label { color: rgb(237 232 220 / .85); }
.uc-block a:hover { color: var(--uc-cream); opacity: .75; }
.uc-peri { background: var(--uc-periwinkle); color: var(--uc-navy); text-shadow: none; }
.uc-peri .uc-label { color: var(--uc-navy); }

.uc-film img { filter: contrast(.92) saturate(.82) brightness(1.02); transition: filter .8s var(--uc-ease), transform .8s var(--uc-ease); }
.uc-film::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgb(191 208 220 / .12), rgb(58 91 160 / .10) 60%, rgb(232 210 122 / .06));
  mix-blend-mode: soft-light;
}
.uc-tape { overflow: visible !important; }
.uc-tape::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  z-index: 3;
  width: clamp(56px, 7vw, 92px);
  height: 22px;
  background: var(--uc-tape);
  transform: translateX(-50%) rotate(-4deg);
}
.uc-print { box-shadow: 0 0 0 6px #F6F3EC, 0 0 0 7px rgb(8 10 18 / .25); }

.uc-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.uc-rule { flex: 1; height: 1px; background: currentColor; opacity: .35; }

.uc-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: var(--uc-gap);
  padding: 16px 0 32px;
  border-top: 1px solid var(--uc-line);
}

/* 5. Header (top of the one page) ---------------------------------------------- */
.uc-header {
  display: flex;
  align-items: baseline;
  gap: 32px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.uc-wordmark { font-weight: 400; letter-spacing: .22em; text-decoration: none !important; }
.uc-wordmark [lang="ja"] { font-weight: 700; color: var(--uc-accent); letter-spacing: 0; margin-left: .3em; }
.uc-header .uc-issue { margin-right: auto; }
.uc-nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.uc-nav a { text-decoration-color: transparent; }
.uc-nav a:hover { text-decoration-color: currentColor; }
.uc-wordmark { white-space: nowrap; }
@media (max-width: 480px) { .uc-header .uc-issue { display: none; } .uc-header { gap: 16px; } .uc-nav { margin-left: auto; } }

/* 6. Hero: type only, the background photo is the image ------------------------ */
.uc-home { padding-top: 8px; }
.uc-hero {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas:
    "mark block"
    "mark air"
    ".    line"
    "word word"
    ".    note";
  grid-template-rows: auto minmax(28vh, 1fr) auto auto auto;
  gap: 16px 0;
  min-height: calc(100svh - 72px);
  padding-bottom: var(--uc-gap);
}
.uc-hero-mark  { grid-area: mark; justify-self: center; font-size: 36px; font-weight: 700; color: var(--uc-cobalt); }
.uc-hero-block { grid-area: block; }
.uc-hero-title { font-size: var(--uc-sm) !important; font-weight: 400 !important; letter-spacing: .3em !important; margin-bottom: 32px !important; }
.uc-hero-spine { display: none; }
.uc-hero-line  { grid-area: line; max-width: 34ch; font-size: var(--uc-xs); letter-spacing: .06em; }
.uc-hero-word {
  grid-area: word;
  font-family: var(--uc-display);
  font-weight: 800;
  font-size: clamp(64px, 17vw, 240px);
  line-height: .82;
  letter-spacing: -.035em;
  color: var(--uc-cobalt);
  text-shadow: 0 2px 30px rgb(8 10 18 / .35);
  margin-left: -.05em !important;
}
.uc-hero-note  { grid-area: note; max-width: 38ch; font-size: var(--uc-xs); color: var(--uc-soft); }
.uc-hero-note [lang="ja"] { color: var(--uc-cream); }
.uc-cite { display: block; }
.uc-more { margin-top: 16px !important; font-size: var(--uc-sm); color: var(--uc-cream); }

@media (min-width: 960px) {
  .uc-hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas: none;
    gap: 0;
    min-height: calc(100vh - 72px);
    padding-bottom: 48px;
  }
  /* left edge: the mark; top right: the cobalt block; the middle stays open for the photo */
  .uc-hero-mark  { grid-area: 1 / 1 / 3 / 2; align-self: start; font-size: clamp(64px, 6.5vw, 104px); }
  .uc-hero-block { grid-area: 1 / 10 / 2 / 13; display: flex; flex-direction: column; justify-content: space-between; min-height: 240px; padding: 32px 16px; }
  .uc-hero-title { margin: 0 !important; }
  .uc-hero-spine { display: block; grid-area: 2 / 12 / 3 / 13; justify-self: end; align-self: center; font-size: var(--uc-xs); letter-spacing: .35em; color: var(--uc-soft); }
  /* the lower band: name line left, note right, then the display word across the bottom */
  .uc-hero-line  { grid-area: 3 / 2 / 4 / 8; align-self: end; padding-bottom: 24px; }
  .uc-hero-note  { grid-area: 3 / 9 / 4 / 13; justify-self: end; align-self: end; padding-bottom: 24px; }
  .uc-hero-word  { grid-area: 4 / 1 / 5 / 13; }
}

/* 7. Work index ---------------------------------------------------------------- */
.uc-work { padding-top: var(--uc-gap); }
.uc-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 38vw;
  grid-auto-flow: dense;
  margin: 0 calc(var(--uc-gutter) * -1);
}
.uc-tile { position: relative; display: block; text-decoration: none !important; overflow: hidden; }
.uc-tile > .uc-slot { height: 100%; min-height: 0 !important; }
.uc-w2, .uc-w3 { grid-column: span 2; }
.uc-h3, .uc-h4 { grid-row: span 2; }
.uc-tile:hover img { filter: contrast(.95) saturate(.9) brightness(1.08); transform: translate(2px, -2px); }
.uc-tile.uc-block { display: flex; flex-direction: column; justify-content: space-between; }
.uc-word { font-size: var(--uc-md); letter-spacing: .14em; }
.uc-sticker {
  position: absolute; left: 8px; bottom: 8px; z-index: 4;
  padding: 3px 8px;
  background: var(--uc-cream);
  color: var(--uc-navy);
  font-size: var(--uc-xs);
  letter-spacing: .04em;
  line-height: 1.5;
  text-shadow: none;
}
.uc-sticker span { display: block; color: var(--uc-ink-soft); }
@media (min-width: 768px) {
  .uc-collage { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(84px, 10vw, 150px); margin: 0; }
  .uc-w1 { grid-column: span 1; } .uc-w2 { grid-column: span 2; } .uc-w3 { grid-column: span 3; }
  .uc-h2 { grid-row: span 2; } .uc-h3 { grid-row: span 3; } .uc-h4 { grid-row: span 4; }
  .uc-offset { z-index: 2; transform: translate(-12px, 20px) rotate(-1deg); }
}

/* 8. Project sections (mikan, taipei grey) ------------------------------------------ */
.uc-project { display: grid; gap: 32px; padding-top: var(--uc-gap); align-items: start; }
.uc-panel { position: relative; display: grid; gap: 16px; align-content: start; padding: 32px 16px; margin: 0 calc(var(--uc-gutter) * -1); }
.uc-title { font-size: clamp(24px, 18px + 1.6vw, 40px) !important; letter-spacing: .12em !important; }
.uc-panel-mark { position: absolute; top: 32px; right: 16px; font-size: 40px; font-weight: 400; }
.uc-meta { display: grid; gap: 4px; font-size: var(--uc-xs); }
.uc-meta div { display: flex; gap: 8px; }
.uc-meta dt { min-width: 7ch; opacity: .75; }
.uc-statement { font-size: var(--uc-xs); max-width: 38ch; line-height: 1.8; }
.uc-panel-nav { font-size: var(--uc-xs); margin-top: 16px !important; }
.uc-project-media { width: 100%; }
.uc .uc-project-media img { height: auto !important; object-fit: contain; }
@media (min-width: 960px) {
  .uc-project { grid-template-columns: minmax(280px, 1fr) 2.3fr; gap: 56px; }
  .uc-panel { position: sticky; top: 32px; margin: 0; min-height: 70vh; padding: 32px; }
  .uc-panel-mark { font-size: 64px; }
}

/* 9. About --------------------------------------------------------------------------- */
.uc-about { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: var(--uc-gap); }
.uc-portrait { width: 416px; max-width: 100%; aspect-ratio: 4 / 5; }
.uc-about-text { display: grid; gap: 16px; max-width: 42ch; align-content: end; }
.uc-about-mark { display: none; position: absolute; top: var(--uc-gap); right: 0; font-size: clamp(48px, 8vw, 112px); color: var(--uc-accent); }
@media (min-width: 768px) {
  .uc-about { grid-template-columns: auto 1fr; gap: var(--uc-gap); }
  .uc-about-mark { display: block; }
}

/* 10. Contact: CD back-cover credits -------------------------------------------------- */
.uc-contact { display: grid; justify-items: center; gap: 32px; padding-top: var(--uc-gap); text-align: center; }
.uc-credits { width: min(100%, 480px); display: grid; gap: 6px; font-size: var(--uc-xs); letter-spacing: .04em; }
.uc-credits div { display: flex; align-items: baseline; gap: 8px; }
.uc-credits dt { color: var(--uc-soft); }
.uc-credits div::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--uc-line); transform: translateY(-.3em); }
.uc-credits dd { order: 2; margin: 0; }
.uc-barcode {
  width: 120px; height: 36px; opacity: .85;
  background: repeating-linear-gradient(90deg,
    var(--uc-cream) 0 2px, transparent 2px 4px, var(--uc-cream) 4px 5px, transparent 5px 8px,
    var(--uc-cream) 8px 11px, transparent 11px 12px, var(--uc-cream) 12px 13px, transparent 13px 17px);
}

/* 11. Motion off for anyone who asks ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .uc *, .uc *::before, .uc *::after { transition: none !important; animation: none !important; }
}

/* 12. One-page anchors: jump links land with a little air above ---------------------- */
.uc [id] { scroll-margin-top: 24px; }
/* ==========================================================================
   uncarved: mobile add-on
   Everything sits inside a max-width: 767px query, so desktop and tablet
   layouts are untouched.
   ========================================================================== */
@media (max-width: 767px) {

  /* 1. Header stays reachable on the long one-page scroll */
  .uc-header {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 calc(var(--uc-gutter) * -1);
    padding: 12px var(--uc-gutter);
    background: linear-gradient(rgb(8 10 18 / .72), rgb(8 10 18 / .38) 70%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .uc [id] { scroll-margin-top: 64px; }          /* jump links land below the sticky header */

  /* 2. Bigger tap targets, same look */
  .uc-nav a, .uc-panel-nav a, .uc-more a, .uc-credits a, .uc-footer a {
    display: inline-block;
    padding: 8px 0;
  }

  /* 3. Collages: full-bleed and swipeable, so prints and captions read at a real size */
  .uc-project-media {
    width: auto;
    margin: 0 calc(var(--uc-gutter) * -1);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .uc-project-media::-webkit-scrollbar { display: none; }
  .uc .uc-slot.uc-project-media img {
    width: 230vw !important;
    max-width: none !important;
    height: auto !important;
  }
  .uc-project::after {                            /* a quiet hint under each collage */
    content: "swipe to see all six frames  →";
    display: block;
    margin-top: -16px;
    font-size: var(--uc-xs);
    letter-spacing: .08em;
    color: var(--uc-soft);
  }

  /* 4. Slightly tighter rhythm between sections on a small screen */
  .uc-work, .uc-project, .uc-about, .uc-contact { padding-top: 72px; }
  .uc-footer { margin-top: 72px; }

  /* 5. keep "uncarved樸" on one line */
  .uc-hero-word { white-space: nowrap; font-size: 15vw; }
}
