:root {
  color: #121212;
  background: #ffffff;
  font-family: "LINE Seed JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { margin: 0; background: #ffffff; }

a { color: inherit; }

.home {
  min-height: 100vh;
  color: #121212;
  background: #ffffff;
  display: grid;
  grid-template-rows: 1fr auto;
}

.home-shell {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.home-mark,
.wordmark {
  font-weight: 400;
  letter-spacing: 0;
}

.home-mark {
  font-size: clamp(3.3rem, 10vw, 7.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.09em;
}

.tagline {
  margin: 1.75rem 0 3.5rem;
  color: #737373;
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.contact-link {
  margin-top: clamp(2.5rem, 6vh, 3.5rem);
  border: 1px solid #121212;
  border-radius: 5px;
  padding: 0.85rem 2.4rem;
  background: #121212;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  background: #ffffff;
  color: #121212;
}

.home-secondary-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.company-link {
  color: #737373;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  text-underline-offset: 0.25em;
}

.portfolio,
.contact-page,
.legal-page {
  min-height: 100vh;
  background: #ffffff;
  color: #121212;
}

.portfolio,
.contact-page {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background: #fafafa;
}

.portfolio::before,
.contact-page::before {
  position: fixed;
  z-index: 0;
  inset: -35vh -25vw;
  background: repeating-radial-gradient(ellipse at 18% 44%, transparent 0 72px, rgba(18, 18, 18, 0.045) 73px 74px, transparent 75px 138px);
  content: "";
  pointer-events: none;
  transform-origin: 35% 50%;
  animation: organic-contours 24s ease-in-out infinite alternate;
}

.portfolio-shell,
.contact-shell,
.legal-shell {
  width: min(100% - 3rem, 960px);
  margin: 0 auto;
}

.portfolio-shell,
.contact-shell { position: relative; z-index: 1; padding: 0 0 5rem; }

.portfolio-header,
.contact-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #e6e6e6;
  padding: 1.25rem 0;
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(18px);
}

.wordmark { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.06em; text-decoration: none; }

.portfolio-header p,
.contact-header p,
.eyebrow,
.section-heading span {
  margin: 0;
  color: #737373;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portfolio-intro { padding: clamp(4rem, 10vw, 7rem) 0 3.5rem; }

.portfolio h1,
.legal-shell h1,
.portfolio h2 {
  margin: 0;
  font-weight: 400;
  letter-spacing: 0;
}

.portfolio h1 { font-size: clamp(3.2rem, 8vw, 6rem); font-weight: 700; letter-spacing: -0.065em; line-height: 0.92; }

.intro-copy { width: min(100%, 470px); margin: 1.5rem 0 0; color: #555555; font-size: 1rem; line-height: 1.7; }

.profile-section { margin-bottom: clamp(4rem, 9vw, 6.5rem); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr); gap: 3rem; padding-top: 1.25rem; }
.career-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.career-list li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid #e6e6e6; }
.career-list li:first-child { border-top: 0; }
.career-list span, .contact-list dt { color: #737373; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; }
.career-list p { margin: 0; font-size: 0.92rem; }
.contact-list { display: grid; gap: 0; margin: 0; }
.contact-list div { padding: 0.9rem 0; border-top: 1px solid #e6e6e6; }
.contact-list div:first-child { border-top: 0; }
.contact-list dd { margin: 0.35rem 0 0; font-size: 0.9rem; }
.contact-list a { text-underline-offset: 0.25em; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #121212;
  padding-bottom: 0.8rem;
}

.section-heading h2 { font-size: 1.25rem; font-weight: 700; }

.tag-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1.1rem 0; }
.tag-filter-button { border: 1px solid #dbdbdb; border-radius: 999px; padding: 0.42rem 0.7rem; background: #ffffff; color: #555555; font: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer; }
.tag-filter-button[aria-pressed="true"], .tag-filter-button:hover, .tag-filter-button:focus-visible { border-color: #121212; background: #121212; color: #ffffff; }

.work-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; }
.work-tile { position: relative; display: grid; width: 100%; aspect-ratio: 3 / 4; place-items: center; overflow: hidden; border: 0; padding: 0; background: #171717; color: #ffffff; cursor: pointer; text-align: left; }
.work-tile-backdrop { position: absolute; inset: -1rem; width: calc(100% + 2rem); height: calc(100% + 2rem); object-fit: cover; object-position: 50% 50%; filter: blur(18px); opacity: 0.78; transform: scale(1.08); transform-origin: 50% 50%; }
.work-tile-image { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; transform-origin: 50% 50%; transition: transform 180ms ease; }
.work-tile-portrait .work-tile-image { object-fit: cover; }
.work-tile-portrait .work-tile-backdrop { opacity: 0.45; }
.work-tile-effect .work-tile-image { width: 58%; height: 58%; border-radius: 12%; object-fit: contain; }
.work-tile-effect .work-tile-backdrop { filter: blur(24px) grayscale(1); opacity: 0.32; }
.work-tile:hover .work-tile-image, .work-tile:focus-visible .work-tile-image { transform: scale(1.04); }
.work-tile-fallback { place-items: center; background: #171717; }
.work-tile-overlay { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.25rem; padding: 0.85rem; background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 62%); opacity: 0; transition: opacity 180ms ease; }
.work-tile-fallback .work-tile-overlay { position: static; align-items: center; justify-content: center; background: transparent; opacity: 1; text-align: center; }
.work-tile:hover .work-tile-overlay, .work-tile:focus-visible .work-tile-overlay { opacity: 1; }
.work-tile-overlay strong { display: -webkit-box; overflow: hidden; font-size: 0.79rem; font-weight: 700; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.work-tile-overlay small { font-size: 0.68rem; font-weight: 600; }
.work-tile-tags { display: -webkit-box; overflow: hidden; margin-top: 0.2rem; font-size: 0.65rem; font-weight: 600; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  padding: 1.7rem 0;
  border-top: 1px solid #e6e6e6;
}

.work-item:first-child { border-top: 0; }

.work-item h3 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.work-meta { margin: 0.55rem 0 0; color: #737373; font-family: inherit; font-size: 0.75rem; letter-spacing: 0.01em; }
.work-description { max-width: 560px; margin: 1rem 0 0; color: #444444; font-size: 0.94rem; line-height: 1.7; }
.work-source-link { display: inline-block; margin-top: 1rem; color: #555555; font-size: 0.78rem; font-weight: 600; text-underline-offset: 0.28em; }
.work-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.work-tags li { border: 1px solid #e6e6e6; border-radius: 999px; padding: 0.28rem 0.48rem; color: #737373; font-size: 0.69rem; line-height: 1; }
.link-preview { display: grid; grid-column: 1 / -1; grid-template-columns: 120px minmax(0, 1fr); min-height: 76px; overflow: hidden; border: 1px solid #e6e6e6; border-radius: 5px; color: inherit; text-decoration: none; }
.link-preview:hover, .link-preview:focus-visible { border-color: #121212; }
.link-preview img { width: 120px; height: 76px; background: #f5f5f5; object-fit: cover; }
.media-embed-rail { display: flex; grid-column: 1 / -1; gap: 0.75rem; width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; padding: 0 0 0.75rem; scroll-snap-type: x proximity; scrollbar-color: #9b9b9b transparent; }
.media-embed { flex: 0 0 auto; scroll-snap-align: start; }
.youtube-embed { width: min(680px, calc(100vw - 5rem)); aspect-ratio: 16 / 9; border: 0; border-radius: 5px; background: #111111; }
.youtube-embed.is-portrait { width: 326px; height: 580px; aspect-ratio: 9 / 16; }
.tiktok-embed, .instagram-embed { width: 326px; border: 1px solid #e6e6e6; border-radius: 5px; background: #ffffff; }
.tiktok-embed { height: 800px; }
.instagram-embed { height: 760px; }
.x-embed { width: 326px; height: 760px; border: 1px solid #e6e6e6; border-radius: 5px; background: #ffffff; }
.preview-text { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 0.25rem; padding: 0.75rem 0.9rem; }
.preview-text strong { overflow: hidden; font-size: 0.8rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.preview-text small { color: #737373; font-size: 0.7rem; }
.work-empty { margin: 0; padding: 2rem 0; color: #737373; font-size: 0.88rem; text-align: center; }
.work-error { margin-top: 1rem; }

.work-dialog { width: min(100% - 2rem, 960px); max-height: min(90vh, 900px); overflow: auto; border: 1px solid #d8d8d8; border-radius: 5px; padding: 0; background: rgba(255, 255, 255, 0.96); color: #121212; }
.work-dialog::backdrop { background: rgba(18, 18, 18, 0.48); }
.dialog-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6e6e6; padding: 0.85rem 1rem; background: #ffffff; }
.dialog-bar p { margin: 0; color: #737373; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.dialog-close { width: 2rem; height: 2rem; border: 0; border-radius: 4px; background: transparent; color: #121212; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.dialog-close:hover, .dialog-close:focus-visible { background: #f1f1f1; }
.dialog-content { padding: 0 1rem 1rem; }
.dialog-content .work-item { grid-template-columns: 1fr; gap: 1.25rem; border-top: 0; padding: 1.5rem 0 0; }
.dialog-content .work-description { max-width: none; }

.portfolio-contact { margin-top: clamp(4rem, 9vw, 6.5rem); border-top: 1px solid #121212; padding-top: 1.5rem; }
.portfolio-contact h2 { margin-top: 0.65rem; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; letter-spacing: -0.045em; }
.portfolio-contact a { display: inline-block; margin-top: 1.25rem; border-bottom: 1px solid #121212; font-size: 0.9rem; font-weight: 600; padding-bottom: 0.2rem; text-decoration: none; }

.legal-shell { padding: 1.5rem 0 6rem; }
.legal-shell .eyebrow { margin-top: clamp(4rem, 10vw, 7rem); }
.legal-shell h1 { margin-top: 0.7rem; font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 700; letter-spacing: -0.055em; }
.legal-shell > p { max-width: 680px; margin: 1.5rem 0 0; color: #444444; line-height: 1.9; }
.company-list { margin: 3.5rem 0 0; max-width: 620px; }
.company-list div { display: grid; grid-template-columns: 9rem 1fr; padding: 1rem 0; border-top: 1px solid #e6e6e6; }
.company-list dt { color: #737373; font-family: inherit; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; }
.company-list dd { margin: 0; }
.policy-content { width: min(100%, 720px); margin-top: 4.5rem; }
.policy-content header { border-top: 1px solid #121212; padding-top: 1.5rem; }
.policy-content section { margin-top: 4rem; }
.policy-content h2 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.5; }
.policy-content p,
.policy-content li { color: #444444; font-size: 0.88rem; line-height: 1.9; }
.policy-content p { margin: 1rem 0 0; }
.policy-content ol { display: grid; gap: 0.7rem; margin: 1rem 0 0; padding-left: 1.4rem; }
.policy-content ol ol { gap: 0.45rem; margin-top: 0.7rem; }
.policy-content address { margin-top: 1rem; color: #444444; font-size: 0.88rem; font-style: normal; line-height: 1.9; }
.policy-content address a { text-underline-offset: 0.25em; }
.policy-end { text-align: right; }
.policy-history { margin-top: 4.5rem; border-top: 1px solid #e6e6e6; padding-top: 1.5rem; }
.policy-history p { color: #737373; font-size: 0.75rem; }

.contact-layout { display: grid; grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr); gap: clamp(3rem, 9vw, 7rem); padding: clamp(4rem, 10vw, 7rem) 0; }
.contact-intro { position: sticky; top: 7rem; align-self: start; }
.contact-intro h1 { margin: 0.65rem 0 0; font-size: 3.4rem; font-weight: 700; letter-spacing: -0.06em; line-height: 1.02; white-space: nowrap; }
.contact-intro > p:last-child { max-width: 360px; margin: 1.75rem 0 0; color: #555555; font-size: 0.9rem; line-height: 1.8; }
.contact-form { display: grid; gap: 2rem; }
.contact-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-field { display: grid; gap: 0.65rem; }
.contact-field label { font-size: 0.78rem; font-weight: 700; }
.contact-field label span { margin-left: 0.35rem; color: #737373; font-size: 0.65rem; font-weight: 600; }
.contact-field-note { margin: 0.1rem 0 0; color: #737373; font-size: 0.7rem; line-height: 1.6; }
.contact-field input,
.contact-field textarea { width: 100%; border: 0; border-bottom: 1px solid #bdbdbd; border-radius: 0; padding: 0.8rem 0; background: transparent; color: #121212; font: inherit; font-size: 1rem; outline: 0; transition: border-color 160ms ease; }
.contact-field textarea { min-height: 11rem; resize: vertical; line-height: 1.7; }
.contact-field input:hover,
.contact-field textarea:hover { border-color: #737373; }
.contact-field input:focus,
.contact-field textarea:focus { border-color: #121212; border-bottom-width: 2px; padding-bottom: calc(0.8rem - 1px); }
.contact-form-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; border-top: 1px solid #e0e0e0; padding-top: 1.25rem; }
.contact-form-footer p { max-width: 280px; margin: 0; color: #737373; font-size: 0.68rem; line-height: 1.6; }
.contact-form-footer a { text-underline-offset: 0.2em; }
.contact-form-footer button { display: inline-flex; min-width: 9rem; align-items: center; justify-content: space-between; gap: 2rem; border: 1px solid #121212; border-radius: 4px; padding: 0.9rem 1rem; background: #121212; color: #ffffff; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.contact-form-footer button:hover,
.contact-form-footer button:focus-visible { background: #ffffff; color: #121212; }
.contact-form-footer button:disabled { border-color: #737373; background: #737373; cursor: wait; }
.contact-status { min-height: 1.4rem; margin: -1rem 0 0; color: #555555; font-size: 0.75rem; line-height: 1.5; }
.contact-honeypot { position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
.contact-success { padding-top: 1rem; outline: 0; }
.contact-success h2 { margin: 0.7rem 0 0; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.05em; line-height: 1.05; }
.contact-success > p:not(.eyebrow) { margin: 1.5rem 0 0; color: #555555; line-height: 1.8; }
.contact-success > a { display: inline-block; margin-top: 2.5rem; border-bottom: 1px solid #121212; padding-bottom: 0.2rem; font-size: 0.82rem; font-weight: 700; text-decoration: none; }

@keyframes organic-contours {
  0% { transform: translate3d(-2%, -1%, 0) rotate(-2deg) scale(1); }
  50% { transform: translate3d(3%, 2%, 0) rotate(1deg) scale(1.08, 0.94); }
  100% { transform: translate3d(-1%, 4%, 0) rotate(3deg) scale(0.96, 1.06); }
}

@media (max-width: 600px) {
  .tagline { margin: 1.5rem 0 3rem; letter-spacing: 0.01em; }
  .portfolio-shell, .contact-shell, .legal-shell { width: min(100% - 2rem, 960px); }
  .portfolio-shell, .contact-shell { padding-bottom: 4rem; }
  .portfolio-intro { padding: 3.5rem 0 3rem; }
  .portfolio-header p { display: none; }
  .profile-grid { grid-template-columns: 1fr; gap: 2rem; }
  .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem; }
  .work-tile-overlay { opacity: 1; }
  .work-item { grid-template-columns: 1fr; gap: 0.7rem; }
  .link-preview { grid-template-columns: 92px minmax(0, 1fr); }
  .link-preview img { width: 92px; }
  .media-embed-rail { width: 100%; }
  .instagram-embed, .tiktok-embed, .youtube-embed.is-portrait { width: min(326px, calc(100vw - 3rem)); }
  .x-embed { width: min(326px, calc(100vw - 3rem)); max-width: min(326px, calc(100vw - 3rem)); }
  .x-embed > iframe { width: 100% !important; max-width: 100% !important; }
  .company-list div { grid-template-columns: 1fr; gap: 0.4rem; }
  .legal-shell { padding-bottom: 4rem; }
  .company-list { margin-top: 3rem; }
  .policy-content { margin-top: 3.5rem; }
  .policy-content section { margin-top: 3rem; }
  .contact-layout { grid-template-columns: 1fr; gap: 3.5rem; padding: 3.5rem 0 4rem; }
  .contact-intro { position: static; }
  .contact-intro h1 { font-size: 2.75rem; }
  .contact-field-row { grid-template-columns: 1fr; gap: 2rem; }
  .contact-form-footer { align-items: stretch; flex-direction: column; gap: 1.25rem; }
  .contact-form-footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio::before, .contact-page::before { animation: none; }
}