/* ===========================
   CSS変数・リセット
=========================== */
:root {
  --bg: #141420;
  --bg2: #1a1a28;
  --surface: #212130;
  --surface2: #2a2a3e;
  --border: rgba(255,255,255,0.12);
  --text: #f0f0f8;
  --text-muted: #9a9ab8;
  --accent: #d4b47a;
  --accent2: #9d8ec0;
  --accent-glow: rgba(212,180,122,0.18);
  --font-display: 'Noto Serif JP', serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'Noto Sans JP', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ノイズテクスチャ */
.noise {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.2;
}

/* ===========================
   ナビゲーション
=========================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 3rem;
  background: rgba(20,20,32,0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: padding .3s;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--text);
}

.dot { color: var(--accent); }

.nav-links {
  display: flex; gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ===========================
   ヒーロー
=========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 8rem 3rem 4rem;
  overflow: clip;
}

.hero-bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 700;
  letter-spacing: .05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.09);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 700px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp .8s .3s forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp .8s .5s forwards;
}

.name-line {
  position: relative;
  display: inline-block;
}

.name-line::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  clip-path: inset(0 100% 0 0);
  animation: textReveal 1.2s .8s cubic-bezier(.77,0,.175,1) forwards;
}

@keyframes textReveal {
  to { clip-path: inset(0 0% 0 0); }
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp .8s .7s forwards;
}

.hero-stats {
  display: flex; align-items: center; gap: 2rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp .8s .9s forwards;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-pct { font-size: 1.2rem; }

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: .4rem;
}

.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

.hero-cta {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .9rem 2rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .12em;
  transition: all .3s;
  opacity: 0;
  animation: fadeUp .8s 1.1s forwards;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* デコレーション */
.hero-decoration {
  position: absolute; right: 8%; top: 50%;
  transform: translateY(-50%);
  width: 400px; height: 400px;
  pointer-events: none;
}

.deco-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid;
}

.ring-1 {
  width: 200px; height: 200px;
  border-color: rgba(200,169,110,.28);
  animation: spin 20s linear infinite;
}

.ring-2 {
  width: 300px; height: 300px;
  border-color: rgba(139,124,170,.2);
  animation: spin 35s linear infinite reverse;
}

.ring-3 {
  width: 400px; height: 400px;
  border-color: rgba(200,169,110,.12);
  animation: spin 50s linear infinite;
}

.deco-line {
  position: absolute; top: 50%; left: 50%;
  width: 1px; height: 200px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  transform-origin: top center;
  animation: rotateLine 8s ease-in-out infinite;
}

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes rotateLine { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(180deg); } }

/* スクロールインジケーター */
.scroll-indicator {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  opacity: 0;
  animation: fadeIn 1s 1.5s forwards;
}

.scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .2em;
  color: var(--text-muted);
}

@keyframes scrollPulse {
  0%,100% { opacity: .4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ===========================
   セクション共通
=========================== */
section {
  padding: 7rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex; align-items: baseline; gap: 1.2rem;
  margin-bottom: 4rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .1em;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: .05em;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px; height: 2px;
  background: var(--accent);
  margin-top: .5rem;
}

/* ===========================
   アバウト
=========================== */
.about { border-top: 1px solid var(--border); }

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
  align-items: start;
}

.about-left { position: relative; }

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.about-card-inner { text-align: center; }

.about-icon-wrap {
  width: 70px; height: 70px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  color: var(--accent);
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: .3rem;
}

.about-role {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.award-badge {
  display: flex; align-items: center; gap: .7rem;
  padding: .9rem 1.2rem;
  background: var(--accent-glow);
  border: 1px solid rgba(200,169,110,.2);
  color: var(--accent);
  font-size: .82rem;
}

.about-intro {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-text {
  margin-bottom: 1rem;
  line-height: 1.9;
}

.about-text strong { color: var(--accent); font-weight: 500; }
.about-text em { font-style: normal; color: var(--accent); font-weight: 500; }

.about-tags {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: 2rem;
}

.tag {
  padding: .35rem .9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--text-muted);
  transition: all .25s;
  cursor: pointer;
  user-select: none;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.tag:active {
  transform: scale(0.95);
}

.tag.clicked {
  border-color: var(--accent);
  color: var(--bg);
  background: var(--accent);
  animation: tagPop .35s ease;
}

@keyframes tagPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ===========================
   スキル
=========================== */
.skills {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(139,124,170,.03), transparent);
}

.skills-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.skill-cat-title {
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cat-icon {
  color: var(--accent);
  font-size: 1rem;
}

.skill-bars { display: flex; flex-direction: column; gap: 1.5rem; }

.skill-bar-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .5rem;
}

.skill-name {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .05em;
}

.skill-pct {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent);
}

.skill-bar-track {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(.77,0,.175,1);
}

.skill-bar-fill.animated {
  width: var(--target);
}

/* サービスグリッド */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* 5枚目のカードを左寄せに */
.services-grid .service-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - .5rem);
}

.service-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .4s;
}

.service-card:hover { border-color: rgba(200,169,110,.25); transform: translateY(-3px); }
.service-card:hover::after { width: 100%; }

.service-icon {
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h4 {
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: .5rem;
}

.service-card p {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===========================
   実績
=========================== */
.works {
  border-top: 1px solid var(--border);
}

.works-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.work-item {
  display: grid;
  grid-template-columns: 80px 1fr 180px;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  transition: all .3s;
}

.work-item:first-child { border-top: 1px solid var(--border); }
.work-item:hover { background: rgba(255,255,255,.01); }

.work-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(255,255,255,.12);
  line-height: 1;
}

.work-tag {
  display: inline-block;
  padding: .2rem .8rem;
  background: var(--accent-glow);
  border: 1px solid rgba(200,169,110,.2);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .8rem;
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: .8rem;
}

.work-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.work-desc strong { color: var(--accent); }

.work-meta {
  display: flex; flex-wrap: wrap; gap: .5rem;
}

.work-meta span {
  padding: .2rem .7rem;
  background: var(--surface2);
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .08em;
  color: var(--text-muted);
}

/* 実績ビジュアル */
.result-circle {
  position: relative;
  width: 120px; height: 120px;
  margin: 0 auto;
}

.result-circle svg {
  width: 100%; height: 100%;
}

.progress-circle {
  stroke-dashoffset: 263.9;
  transition: stroke-dashoffset 1.5s cubic-bezier(.77,0,.175,1);
}

.progress-circle.animated {
  stroke-dashoffset: 89.7;
}

.result-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.result-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.result-unit {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.tech-stack-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

.tech-dot {
  padding: .7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-align: center;
  color: var(--text-muted);
  animation: pulse 2s var(--d) ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { border-color: var(--border); color: var(--text-muted); }
  50% { border-color: rgba(139,124,170,.4); color: var(--accent2); }
}

.web-visual {
  display: flex; gap: .4rem; align-items: flex-end;
  height: 80px;
}

.web-bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent2), var(--accent));
  opacity: .4;
  border-radius: 2px 2px 0 0;
  animation: barGrow 3s ease-in-out infinite;
}

.web-bar:nth-child(1) { height: 50%; animation-delay: 0s; }
.web-bar:nth-child(2) { height: 80%; animation-delay: .4s; }
.web-bar:nth-child(3) { height: 65%; animation-delay: .8s; }

@keyframes barGrow {
  0%,100% { opacity: .3; }
  50% { opacity: .7; }
}

/* ===========================
   画像ギャラリー
=========================== */
.work-item--gallery {
  border-bottom: none !important;
  padding-bottom: 1rem;
}

.work-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.gallery-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
  transition: border-color .3s;
}

.gallery-item:hover {
  border-color: rgba(212,180,122,.35);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.2rem 1.2rem .9rem;
  background: linear-gradient(to top, rgba(10,10,20,.9) 0%, transparent 100%);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s, transform .3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* ライトボックス */
.lightbox {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(10px);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
  transform: scale(.96);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  border-radius: 4px;
}

.lightbox.open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s, transform .2s;
  background: none; border: none;
  line-height: 1;
  padding: .4rem;
}

.lightbox-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

@media (max-width: 600px) {
  .work-gallery { grid-template-columns: 1fr; }
}

/* ===========================
   コンタクト
=========================== */
.contact {
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-inner { max-width: 600px; margin: 0 auto; }

.contact-catch {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.contact-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: .9rem;
}

.contact-platforms {
  display: flex; flex-direction: column; gap: 1rem;
  margin-bottom: 2rem;
}

.platform-card {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1.2rem 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: all .3s;
}

.platform-card:hover {
  border-color: rgba(200,169,110,.3);
  background: var(--surface2);
}

.platform-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  flex-shrink: 0;
}

.platform-info { flex: 1; }

.platform-info h4 {
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: .2rem;
}

.platform-info p {
  font-size: .78rem;
  color: var(--text-muted);
}

.contact-note {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: 1rem 1.3rem;
  background: var(--surface);
  border-left: 2px solid var(--accent2);
  text-align: left;
  font-size: .8rem;
  color: var(--text-muted);
}

.contact-note svg { color: var(--accent2); flex-shrink: 0; margin-top: 2px; }

/* ===========================
   フッター
=========================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 3rem;
}

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-copy {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-links {
  display: flex; gap: 2rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .25s;
}

.footer-links a:hover { color: var(--accent); }

/* ===========================
   アニメーション
=========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   レスポンシブ
=========================== */
@media (max-width: 900px) {
  .nav { padding: 1.2rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  section { padding: 5rem 1.5rem; }
  .hero { padding: 7rem 1.5rem 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills-categories { grid-template-columns: 1fr; gap: 3rem; }
  .services-grid { grid-template-columns: 1fr; }
  .work-item { grid-template-columns: 60px 1fr; }
  .work-result { display: none; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-decoration { display: none; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-stats { gap: 1.2rem; }
  .stat-num { font-size: 1.8rem; }
}
