:root {
  --bg: #fff5f2;
  --surface: #fff5f2;
  --soft: #fffaf8;
  --soft-2: #f5ebe7;
  --text: #0f1419;
  --muted: #536471;
  --faint: #8b98a5;
  --line: #eee4e0;
  --line-strong: #e1d6d1;
  --accent: #0f1419;
  --max-feed: 680px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }
img { display: block; max-width: 100%; }

.site-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 190px minmax(0, var(--max-feed)) 260px;
  min-height: 100vh;
}

.brand-rail {
  padding: 26px 24px;
}

.brand-lockup {
  position: sticky;
  top: 26px;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-symbol,
.avatar,
.post-avatar {
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-weight: 800;
  letter-spacing: -.05em;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 16px;
}

.brand-name {
  font-size: 13px;
  line-height: 1.15;
  font-weight: 700;
}

.profile-page {
  min-width: 0;
  border-inline: 1px solid var(--line);
}

.mobile-header { display: none; }

.cover {
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 18px 22px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255,255,255,.55), transparent 50%),
    repeating-linear-gradient(135deg, #fff9f6 0, #fff9f6 1px, #f5ebe7 1px, #f5ebe7 22px);
  border-bottom: 1px solid var(--line);
}

.cover span {
  color: #a3abb1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}

.profile-body {
  padding: 0 22px 22px;
}

.profile-topline {
  min-height: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.avatar {
  width: 118px;
  height: 118px;
  margin-top: -59px;
  border: 5px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-strong);
  border-radius: 50%;
  font-size: 40px;
  overflow: hidden;
}
.avatar-link {
  text-decoration: none;
  transition: opacity .15s ease, transform .15s ease;
}
.avatar-link:hover { opacity: .92; transform: scale(1.01); }
.avatar img,
.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-button {
  margin-top: 14px;
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background .15s ease;
}
.contact-button:hover { background: var(--soft); }

.identity h1 {
  margin: 5px 0 1px;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.handle {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.handle:hover { text-decoration: underline; }

.bio {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.65;
}

.profile-meta,
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.profile-meta span::before { content: "•"; margin-right: 6px; color: #b5bdc3; }
.profile-links a { text-underline-offset: 3px; }

.profile-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255,245,242,.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tab-button {
  position: relative;
  height: 54px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.tab-button:hover { background: var(--soft); }
.tab-button.is-active { color: var(--text); font-weight: 700; }
.tab-button.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent);
  transform: translateX(-50%);
}

.feed { min-height: 400px; }

.post {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 11px;
  padding: 18px 20px 20px;
  border-bottom: 1px solid var(--line);
  transition: background .15s ease, opacity .2s ease;
}
.post:hover { background: #fffaf8; }
.post[hidden] { display: none; }

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 14px;
}

.post-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.post-content { min-width: 0; }

.post-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  line-height: 1.35;
}
.post-header > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 13px;
}
.post-header strong { font-weight: 700; }
.post-header span { color: var(--muted); }
.post-type {
  flex: none;
  padding-top: 2px;
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: .12em;
}

.post-text {
  margin: 8px 0 12px;
  font-size: 14px;
  line-height: 1.55;
}
.post-text strong { font-size: 15px; }
.post-text span { color: var(--muted); font-size: 12px; }

.media-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--soft);
  text-decoration: none;
}

.video-card { aspect-ratio: 16 / 9; }
.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}
.video-card:hover img { transform: scale(1.018); filter: brightness(.82); }

.media-overlay {
  position: absolute;
  inset: auto 14px 14px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 10px 7px 8px;
  border-radius: 999px;
  background: rgba(15,20,25,.76);
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 11px;
  backdrop-filter: blur(8px);
}
.video-card:hover .media-overlay { opacity: 1; transform: none; }
.play-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 8px;
}

.graphic-portal {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  text-decoration: none;
}

.graphic-portal-art {
  position: relative;
  min-height: 320px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 78% 25%, #fff 0 8%, transparent 8.2%),
    linear-gradient(135deg, #f4f5f6 0%, #fff 43%, #eceff1 100%);
  overflow: hidden;
}
.graphic-portal-art::before,
.graphic-portal-art::after {
  content: "";
  position: absolute;
  border: 1px solid #dfe4e7;
  border-radius: 50%;
}
.graphic-portal-art::before { width: 250px; height: 250px; right: -65px; top: -65px; }
.graphic-portal-art::after { width: 150px; height: 150px; right: 45px; bottom: -70px; }
.gp-small { font-size: 9px; font-weight: 700; letter-spacing: .16em; color: #7a858d; }
.gp-large { position: relative; z-index: 1; font-size: clamp(38px, 7vw, 58px); line-height: .88; font-weight: 800; letter-spacing: -.075em; }
.gp-arrow { position: absolute; right: 24px; bottom: 20px; font-size: 25px; }
.graphic-portal-meta {
  display: grid;
  gap: 2px;
  padding: 12px 15px 14px;
  background: var(--surface);
}
.graphic-portal-meta span { color: var(--muted); font-size: 10px; }
.graphic-portal-meta strong { font-size: 12px; }
.graphic-portal:hover .graphic-portal-art { background: linear-gradient(135deg, #f0f2f3 0%, #fff 43%, #e7eaec 100%); }

.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 20px 48px;
  color: var(--faint);
  font-size: 10px;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.info-rail { padding: 26px 22px; }
.info-card {
  position: sticky;
  top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
  font-size: 12px;
  line-height: 1.75;
}
.info-card p { margin: 0 0 12px; }
.info-card a { font-weight: 600; text-underline-offset: 3px; }
.info-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

@media (max-width: 1000px) {
  .site-layout { grid-template-columns: 88px minmax(0, var(--max-feed)); justify-content: center; }
  .info-rail { display: none; }
  .brand-name { display: none; }
  .brand-rail { padding-inline: 22px; }
}

@media (max-width: 760px) {
  .site-layout { display: block; width: 100%; }
  .brand-rail { display: none; }
  .profile-page { border: 0; width: 100%; }
  .mobile-header {
    display: flex;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--line);
    background: rgba(255,245,242,.94);
  }
  .mobile-wordmark { font-size: 13px; font-weight: 700; text-decoration: none; }
  .cover { height: 145px; }
  .profile-body { padding-inline: 16px; }
  .profile-topline { min-height: 68px; }
  .avatar { width: 96px; height: 96px; margin-top: -48px; font-size: 31px; }
  .identity h1 { font-size: 21px; }
  .bio { font-size: 13px; }
  .post { grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding: 15px 12px 18px; }
  .post-avatar { width: 36px; height: 36px; font-size: 12px; }
  .post-header > div { font-size: 12px; }
  .post-text { font-size: 13px; }
  .post-text strong { font-size: 14px; }
  .media-card, .graphic-portal { border-radius: 12px; }
  .graphic-portal-art { min-height: 260px; padding: 20px; }
  .media-overlay { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}



/* Responsive refinements */
* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
}

.page,
.profile-shell,
.profile,
.feed,
.post,
.post-content {
  min-width: 0;
}

@media (max-width: 768px) {
  .page,
  .profile-shell {
    width: 100%;
    max-width: 100%;
  }

  header,
  .topbar,
  .profile-header,
  .profile-body,
  .tabs,
  .post {
    padding-left: 16px;
    padding-right: 16px;
  }

  .profile-name,
  .display-name,
  h1 {
    font-size: clamp(22px, 7vw, 30px);
  }

  .profile-bio,
  .post-text,
  .role,
  .meta {
    overflow-wrap: anywhere;
  }

  .post {
    gap: 10px;
  }

  .post-avatar {
    width: 40px;
    height: 40px;
  }

  .post-media,
  .thumbnail,
  .work-thumb,
  .post-media img,
  .thumbnail img,
  .work-thumb img {
    width: 100%;
    max-width: 100%;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  header,
  .topbar,
  .profile-header,
  .profile-body,
  .tabs,
  .post {
    padding-left: 12px;
    padding-right: 12px;
  }

  .post {
    gap: 8px;
  }

  .post-avatar {
    width: 36px;
    height: 36px;
  }

  .profile-avatar,
  .avatar-large {
    width: 84px;
    height: 84px;
  }
}

/* Top-left brand: text only */
.brand,
.site-brand,
.top-brand,
.header-brand {
  gap: 0;
}

.graphic-card img {
  width: 100%;
  height: auto;
  max-height: 720px;
  display: block;
  object-fit: contain;
}
@media (max-width: 768px) {
  .graphic-card img { max-height: none; }
}
