:root {
  --cf-orange: #f6821f;
  --cf-blue: #0052ff;
  --cf-blue-light: #3b82f6;
  --cf-black: #0a0a0a;
  --cf-dark: #111111;
  --cf-gray: #9ca3af;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cf-black);
  color: #fff;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1f1f1f;
  box-shadow: 0 1px 24px rgba(0,82,255,0.10);
}
.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo .logo-img { display: block; border-radius: 8px; }
.logo .logo-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cf-gray);
  border: 1px solid #2a3040;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 2px;
}
.nav-links { display: flex; gap: 28px; align-items: center; overflow-x: auto; flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { position: relative; color: var(--cf-gray); font-size: 14px; white-space: nowrap; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: linear-gradient(90deg, var(--cf-blue), var(--cf-orange)); transition: width .25s; }
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: #fff; }
.nav-actions { display: flex; gap: 12px; align-items: center; }

.btn {
  background: linear-gradient(135deg, var(--cf-blue), #3b82f6);
  color: #fff;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,82,255,.35);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(0,82,255,.5); filter: brightness(1.08); }
.btn-outline {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  border-radius: 10px;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: transform .2s, background .2s, border-color .2s;
}
.btn-outline:hover { transform: translateY(-2px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }
.lang-switch { display: inline-flex; gap: 4px; align-items: center; }
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 24px 130px;
  text-align: center;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(0,82,255,0.18), transparent 60%),
    radial-gradient(50% 50% at 90% 10%, rgba(246,130,31,0.14), transparent 60%),
    linear-gradient(180deg, #0c0c14, var(--cf-black) 70%);
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(0,82,255,0.30) 0%, rgba(0,82,255,0) 65%);
  z-index: 0;
  animation: orbA 12s ease-in-out infinite;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(246,130,31,0.16) 0%, rgba(246,130,31,0) 65%);
  z-index: 0;
  animation: orbB 14s ease-in-out infinite;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 44px;
  border-radius: 28px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}
.hero-inner > * { animation: fadeUp .8s ease both; }
.hero-inner > *:nth-child(2) { animation-delay: .1s; }
.hero-inner > *:nth-child(3) { animation-delay: .2s; }
.hero-inner > *:nth-child(4) { animation-delay: .3s; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  color: #cfe0ff;
  background: linear-gradient(#0a0a0a,#0a0a0a) padding-box, linear-gradient(90deg, var(--cf-blue), var(--cf-orange)) border-box;
  border: 1px solid transparent;
  margin-bottom: 28px;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulse 2s infinite;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #7dd3fc, var(--cf-blue-light) 40%, #f6821f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 18px;
  color: var(--cf-gray);
  max-width: 620px;
  margin: 0 auto 38px;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
@keyframes orbA { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-30px); } }
@keyframes orbB { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-24px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* Sections */
section.block { padding: 92px 24px; max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.section-head p { color: var(--cf-gray); font-size: 16px; max-width: 600px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--cf-dark);
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  padding: 30px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--cf-blue); transform: translateY(-4px); }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: rgba(0,82,255,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card .icon svg { width: 24px; height: 24px; stroke: var(--cf-blue-light); }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--cf-gray); font-size: 15px; }

/* Page header (sub pages) */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 24px 72px;
  text-align: center;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(0,82,255,0.16), transparent 65%),
    linear-gradient(180deg, #0c0c14, var(--cf-black) 85%);
}
.page-hero h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 800; letter-spacing: -1.2px; margin-bottom: 14px; }
.page-hero p { color: var(--cf-gray); font-size: 16px; max-width: 640px; margin: 0 auto; }
.page-hero .badge { margin-bottom: 22px; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filters:empty { display: none; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #262b36;
  background: rgba(255,255,255,.03);
  color: var(--cf-gray);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: #fff; border-color: #3b82f6; }
.chip.is-active { background: var(--cf-blue); border-color: var(--cf-blue); color: #fff; font-weight: 700; }
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.works-grid > .empty-state { grid-column: 1 / -1; }
.work {
  display: block;
  background: var(--cf-dark);
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.work:hover { border-color: var(--cf-blue); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.work-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0,82,255,.35), rgba(246,130,31,.22));
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-thumb .work-mark {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
}
.work-body { padding: 18px 20px 20px; }
.work-body h3 { font-size: 17px; line-height: 1.45; margin-bottom: 8px; }
.work-body p { color: var(--cf-gray); font-size: 13px; line-height: 1.7; }
.work-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: #7aa2ff; font-size: 12px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.work-tags span {
  font-size: 11px;
  color: var(--cf-gray);
  border: 1px solid #262b36;
  border-radius: 999px;
  padding: 2px 9px;
}
.empty-state {
  text-align: center;
  border: 1px dashed #262b36;
  border-radius: 18px;
  padding: 64px 24px;
  background: rgba(255,255,255,.015);
}
.empty-state .empty-mark {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,82,255,.12);
}
.empty-state .empty-mark svg { width: 26px; height: 26px; stroke: var(--cf-blue-light); }
.empty-state h3 { font-size: 20px; margin-bottom: 10px; }
.empty-state p { color: var(--cf-gray); font-size: 14px; max-width: 440px; margin: 0 auto; }

/* About */
.about-wrap { max-width: 880px; margin: 0 auto; }
.about-block {
  background: var(--cf-dark);
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 20px;
}
.about-block h2 { font-size: 20px; margin-bottom: 14px; }
.about-block p { color: var(--cf-gray); font-size: 15px; line-height: 1.9; }
.about-block p + p { margin-top: 12px; }
.about-list { list-style: none; display: grid; gap: 10px; }
.about-list li { display: flex; gap: 12px; color: var(--cf-gray); font-size: 14px; }
.about-list li b { flex: 0 0 132px; color: #fff; font-weight: 600; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; }
.about-links a {
  border: 1px solid #262b36;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #cfe0ff;
  transition: border-color .2s, color .2s;
}
.about-links a:hover { border-color: var(--cf-blue); color: #fff; }

/* CTA */
.cta {
  text-align: center;
  padding: 96px 24px;
  background: radial-gradient(circle at center, rgba(0,82,255,0.18), transparent 70%);
}
.cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
.cta p { color: var(--cf-gray); font-size: 17px; margin-bottom: 34px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta .hero-actions { margin-top: 0; }

/* Footer */
footer {
  border-top: 1px solid #1f1f1f;
  background: var(--cf-black);
  padding: 56px 24px 36px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-inner h4 { font-size: 14px; margin-bottom: 16px; color: #fff; }
.footer-inner a { display: block; color: var(--cf-gray); font-size: 14px; margin-bottom: 10px; transition: color .2s; }
.footer-inner a:hover { color: var(--cf-blue-light); }
.footer-bottom {
  max-width: 1200px; margin: 36px auto 0;
  padding-top: 22px; border-top: 1px solid #1f1f1f;
  color: var(--cf-gray); font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: #7aa2ff; }

/* 404 */
.notfound { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 24px; }
.notfound .code {
  font-size: clamp(72px, 14vw, 110px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #0052ff, #3b82f6, #f6821f);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.notfound h1 { font-size: 24px; margin: 14px 0 10px; }
.notfound p { color: var(--cf-gray); margin-bottom: 26px; }

@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .works-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .nav { padding: 14px 16px; gap: 8px; }
  .logo { font-size: 17px; letter-spacing: -0.3px; }
  .logo .logo-img { width: 26px; height: 26px; }
  .logo .logo-sub { display: none; }
  .nav-actions { gap: 8px; }
  .nav .tt-hamburger { padding: 10px 6px 10px 10px; font-size: 26px; }
  .hero { padding: 80px 16px 96px; }
  .hero-inner { padding: 36px 22px; border-radius: 20px; }
  .hero h1 { font-size: clamp(30px, 9vw, 46px); }
  .hero p { font-size: 16px; }
  .grid, .works-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  section.block { padding: 68px 18px; }
  .about-block { padding: 24px; }
  .about-list li { display: block; }
  .about-list li b { display: block; margin-bottom: 2px; }
}

/* ライトテーマ補正（art 固有クラス） */
html[data-ui-theme="light"] .work,
html[data-ui-theme="light"] .about-block,
html[data-ui-theme="light"] .empty-state {
  background: #ffffff !important;
  border-color: #e3e6ea !important;
  color: #151a21 !important;
}
html[data-ui-theme="light"] .work-thumb { background: linear-gradient(135deg, rgba(59,130,246,.18), rgba(246,130,31,.12)); }
html[data-ui-theme="light"] .work-thumb .work-mark { color: rgba(21,26,33,.45); }
html[data-ui-theme="light"] .work-tags span { border-color: #d8dde5; color: #5b6472; }
html[data-ui-theme="light"] .chip { background: #ffffff; border-color: #d8dde5; color: #5b6472; }
html[data-ui-theme="light"] .chip.is-active { background: #0052ff; border-color: #0052ff; color: #fff; }
html[data-ui-theme="light"] .about-list li b { color: #10151b; }
html[data-ui-theme="light"] .about-links a { border-color: #d8dde5; color: #1d4ed8; }
html[data-ui-theme="light"] .empty-state { border-style: dashed; }
html[data-ui-theme="light"] .page-hero {
  background: radial-gradient(60% 60% at 50% 0%, rgba(59,130,246,.10), transparent 65%),
              linear-gradient(180deg, #ffffff, #f6f7f9 85%) !important;
}
html[data-ui-theme="light"] .badge { color: #1d4ed8 !important; background: linear-gradient(#fff,#fff) padding-box, linear-gradient(90deg, var(--cf-blue), var(--cf-orange)) border-box !important; }
html[data-ui-theme="light"] .logo .logo-sub { color: #5b6472; border-color: #d8dde5; }
html[data-ui-theme="light"] .cta { background: radial-gradient(circle at center, rgba(59,130,246,.10), transparent 70%) !important; }
