/* ============================================================
   DEVVOLCAN v2 — main.css
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
  --bg:          #0d1117;
  --bg2:         #161b22;
  --bg3:         #21262d;
  --accent:      #00ff41;
  --accent-dim:  #00a32a;
  --accent-glow: rgba(0,255,65,.12);
  --txt:         #e6edf3;
  --txt2:        #8b949e;
  --txt3:        #484f58;
  --border:      #30363d;
  --red:         #ff5f57;
  --yellow:      #febc2e;
  --green:       #28c840;
  --blue:        #58a6ff;
  --purple:      #bc8cff;
  --mono:        'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html.light-mode {
  --bg:          #ffffff;
  --bg2:         #f6f8fa;
  --bg3:         #eaeef2;
  --accent:      #1a7f37;
  --accent-dim:  #116329;
  --accent-glow: rgba(26,127,55,.1);
  --txt:         #1f2328;
  --txt2:        #656d76;
  --txt3:        #9198a1;
  --border:      #d0d7de;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 58px; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* スキャンライン */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.055) 2px, rgba(0,0,0,.055) 4px);
  pointer-events: none;
  z-index: 9999;
}

/* ── LAYOUT ── */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
main  { padding-top: 56px; }

/* ── BOOT SCREEN ── */
#dv-boot {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9998;
  padding: 40px;
  font-size: 12px;
  transition: opacity .4s;
}
.boot-line { opacity: 0; margin-bottom: 2px; color: var(--txt3); transition: opacity .1s; }
.boot-line.ok  { color: #3fb950; }
.boot-line.acc { color: var(--accent); }

/* ── NAVIGATION ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(13,17,23,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}
html.light-mode .site-nav { background: rgba(255,255,255,.9); }

.nav-logo { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.nav-logo-img { background: #fff; border-radius: 5px; padding: 3px 8px; display: inline-flex; align-items: center; height: 34px; }
.nav-logo-img img { height: 22px; width: auto; }
.nav-cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: middle; animation: blink 1.2s step-end infinite; margin-left: 2px; }

.nav-links { display: flex; list-style: none; gap: 0; }
.nav-links a {
  color: var(--txt3);
  text-decoration: none;
  font-size: 11px;
  padding: 6px 12px;
  letter-spacing: .06em;
  position: relative;
  transition: color .15s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.mode-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--txt3);
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 3px;
  transition: all .15s;
}
.mode-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 6px;
}
.hamburger span { display: block; height: 1px; background: var(--txt2); transition: all .25s; }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.drawer {
  position: fixed;
  top: 56px; left: 0; right: 0; bottom: 0;
  z-index: 99;
  visibility: hidden;
  pointer-events: none;
}
.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0;
  transition: opacity .25s;
}
.drawer-panel {
  position: absolute;
  top: 0; left: 0;
  width: 260px; height: 100%;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform .25s;
  padding: 24px 0;
  overflow-y: auto;
}
.drawer.open { visibility: visible; pointer-events: auto; }
.drawer.open .drawer-overlay { opacity: 1; }
.drawer.open .drawer-panel { transform: translateX(0); }

.drawer-links { list-style: none; }
.drawer-links a {
  display: flex;
  align-items: center;
  padding: 13px 24px;
  font-size: 13px;
  color: var(--txt2);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.drawer-links a:hover,
.drawer-links a.active { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }
.drawer-sep { height: 1px; background: var(--border); margin: 12px 16px; }

/* ── SECTION COMMON ── */
.site-section { padding: 72px 0; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 44px;
}
.sh-prompt { color: var(--accent); font-size: 12px; font-weight: 700; }
.sh-title { font-size: 20px; font-weight: 700; color: var(--txt); letter-spacing: -.5px; }
.sh-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.sh-cmd { font-size: 10px; color: var(--txt3); }

.see-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--txt3);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 4px;
  transition: all .15s;
  margin-top: 24px;
}
.see-all:hover { border-color: var(--accent); color: var(--accent); }
.section-footer { margin-top: 28px; text-align: center; }

/* ── TERMINAL WINDOW ── */
.tw {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,255,65,.04), 0 24px 64px rgba(0,0,0,.5);
}
.tw-bar {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tw-dots { display: flex; gap: 6px; }
.tw-dots span { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: var(--red); }
.dot-y { background: var(--yellow); }
.dot-g { background: var(--green); }
.tw-title { flex: 1; text-align: center; font-size: 11px; color: var(--txt3); letter-spacing: .04em; }
.tw-body { padding: 24px; }

/* ── ANIMATIONS ── */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,65,.4); } 50% { box-shadow: 0 0 0 5px rgba(0,255,65,0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.cursor-blink {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

/* ── HERO ── */
.hero-section {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 40px 0;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,255,65,.05) 1px, transparent 0);
  background-size: 32px 32px;
}
.hero-box { max-width: 700px; position: relative; z-index: 1; }
.hero-ascii {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  opacity: .03;
  font-size: 10px;
  color: var(--accent);
  white-space: pre;
  line-height: 1.5;
  text-align: right;
  pointer-events: none;
  user-select: none;
}

.t-prompt { color: var(--txt2); font-size: 12px; }
.t-prompt .pu { color: var(--blue); }
.t-prompt .ph { color: var(--accent); }
.t-prompt .pp { color: var(--purple); }
.t-name { font-size: 36px; font-weight: 700; color: var(--txt); letter-spacing: -1.5px; margin: 6px 0 2px; }
.t-role { font-size: 14px; color: var(--txt2); margin-bottom: 14px; }
.t-tags span {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(0,255,65,.22);
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 10px;
  margin: 2px;
}

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }

.av-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 28px; text-align: center; }
.av-ring {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(0,255,65,.18), inset 0 0 16px rgba(0,255,65,.04);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.av-ring img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.av-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 13px; height: 13px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg2);
  animation: pulse 2s infinite;
}
.av-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.av-role { font-size: 11px; color: var(--accent); margin-bottom: 12px; }
.av-location { font-size: 10px; color: var(--txt3); }
.av-social { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.av-btn {
  border: 1px solid var(--border);
  color: var(--txt3);
  padding: 5px 12px;
  font-size: 10px;
  font-family: var(--mono);
  text-decoration: none;
  border-radius: 3px;
  transition: all .15s;
}
.av-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.info-row { display: flex; margin-bottom: 10px; font-size: 12px; }
.info-key { color: var(--txt3); width: 120px; flex-shrink: 0; }
.info-key::after { content: ':'; }
.info-val { color: var(--txt); }
.info-val.acc { color: var(--accent); }
.info-hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.info-desc { font-size: 11px; color: var(--txt2); line-height: 1.8; }

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.skill-card:hover { border-color: rgba(0,255,65,.4); box-shadow: 0 0 14px rgba(0,255,65,.05); }
.skill-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill-name { font-size: 12px; font-weight: 700; }
.skill-years { font-size: 10px; color: var(--txt3); }
.skill-cat { font-size: 9px; color: var(--accent-dim); letter-spacing: .12em; margin-bottom: 8px; }
.skill-bar-row { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--txt3); }
.skill-track { flex: 1; height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.skill-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 2px; }
.skill-cmd { font-size: 9px; color: var(--txt3); margin-top: 8px; }

/* ── CAREER TIMELINE ── */
.career-log-header {
  font-size: 11px;
  color: var(--txt3);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 14px;
  margin-bottom: 20px;
}
.career-log-header span { color: var(--accent); }

.career-item { position: relative; padding-left: 22px; margin-bottom: 28px; }
.career-item::before {
  content: '';
  position: absolute;
  left: 0; top: 7px; bottom: -28px;
  width: 1px;
  background: var(--border);
}
.career-item:last-child::before { display: none; }
.career-item::after {
  content: '';
  position: absolute;
  left: -4px; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 8px rgba(0,255,65,.35);
}
.career-date { font-size: 10px; color: var(--txt3); margin-bottom: 5px; display: flex; align-items: center; gap: 7px; }
.career-now {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(0,255,65,.25);
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 9px;
}
.career-company { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.career-role { font-size: 11px; color: var(--accent); margin-bottom: 7px; }
.career-desc { font-size: 11px; color: var(--txt2); line-height: 1.7; margin-bottom: 8px; }
.career-tech { display: flex; flex-wrap: wrap; gap: 5px; }
.tech-tag { font-size: 9px; color: var(--txt3); border: 1px solid var(--border); padding: 2px 7px; border-radius: 3px; }

/* ── PROJECTS ── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.project-card:hover { border-color: rgba(0,255,65,.4); transform: translateY(-2px); }

.project-thumb {
  height: 150px;
  background: linear-gradient(135deg, #0d2818, #0a1628, #1a0d2e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
  overflow: hidden;
}
.project-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,255,65,.015) 3px, rgba(0,255,65,.015) 4px);
}
.project-thumb-img { height: 150px; overflow: hidden; }
.project-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb-code {
  position: absolute;
  bottom: 10px; left: 14px; right: 14px;
  font-size: 9px;
  color: rgba(0,255,65,.22);
  white-space: nowrap;
  overflow: hidden;
}

.project-body { padding: 18px; }
.project-meta { display: flex; justify-content: space-between; margin-bottom: 8px; }
.project-cat { font-size: 9px; color: var(--accent); letter-spacing: .1em; }
.project-date { font-size: 9px; color: var(--txt3); }
.project-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; line-height: 1.4; }
.project-desc { font-size: 11px; color: var(--txt2); line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.project-tag { font-size: 9px; color: var(--txt3); border: 1px solid var(--border); padding: 1px 7px; border-radius: 3px; }
.project-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 11px; color: var(--accent); text-decoration: none; transition: gap .15s; }
.project-link:hover { gap: 9px; }

/* ── CERTIFICATIONS ── */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.cert-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.cert-card:hover { border-color: rgba(0,255,65,.4); box-shadow: 0 0 16px rgba(0,255,65,.06); }
.cert-badge-wrap { width: 96px; height: 96px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.cert-badge-wrap img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.cert-badge-placeholder {
  width: 96px; height: 96px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}
.cert-name { font-size: 11px; font-weight: 700; color: var(--txt); margin-bottom: 4px; line-height: 1.4; }
.cert-by { font-size: 10px; color: var(--txt3); margin-bottom: 6px; }
.cert-date { font-size: 10px; color: var(--accent); }

/* ── BLOG LIST ── */
.blog-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.blog-item { background: var(--bg); padding: 18px 22px; display: flex; gap: 20px; align-items: flex-start; text-decoration: none; color: inherit; transition: background .1s; }
.blog-item:hover { background: var(--bg3); }
.blog-num { font-size: 10px; color: var(--txt3); width: 22px; flex-shrink: 0; padding-top: 2px; }
.blog-content { flex: 1; }
.blog-date { font-size: 9px; color: var(--txt3); margin-bottom: 5px; }
.blog-cat-tag { display: inline-block; font-size: 9px; color: var(--accent-dim); border: 1px solid rgba(0,255,65,.18); padding: 1px 6px; border-radius: 3px; margin-bottom: 5px; }
.blog-title { font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 5px; line-height: 1.4; }
.blog-excerpt { font-size: 11px; color: var(--txt2); line-height: 1.6; }
.blog-arrow { color: var(--txt3); font-size: 14px; padding-top: 2px; transition: color .15s, transform .15s; flex-shrink: 0; }
.blog-item:hover .blog-arrow { color: var(--accent); transform: translateX(4px); }

/* ── CONTACT FORM ── */
.contact-box { max-width: 600px; }
.contact-greeting { font-size: 11px; color: var(--txt3); margin-bottom: 18px; line-height: 1.8; }
.contact-field { display: flex; align-items: flex-start; margin-bottom: 14px; }
.contact-prompt { color: var(--accent); margin-right: 10px; padding-top: 3px; flex-shrink: 0; font-size: 12px; white-space: nowrap; }
.contact-input {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 0;
  outline: none;
  width: 100%;
  transition: border-color .15s;
}
.contact-input:focus { border-color: var(--accent); }
.contact-input::placeholder { color: var(--txt3); }
.contact-textarea {
  resize: vertical;
  min-height: 72px;
  border: 1px solid var(--border) !important;
  padding: 8px !important;
  border-radius: 4px;
  background: var(--bg3) !important;
}
.contact-textarea:focus { border-color: var(--accent) !important; }

.contact-agree { margin: 14px 0 10px; }
.contact-agree-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.contact-agree-label input[type="checkbox"] { display: none; }
.agree-box {
  width: 14px; height: 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: border-color .15s, background .15s;
}
.contact-agree-label input:checked ~ .agree-box { background: var(--accent); border-color: var(--accent); }
.contact-agree-label input:checked ~ .agree-box::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #000; font-weight: 700;
}
.contact-agree-label:hover .agree-box { border-color: var(--accent); }
.agree-txt { font-size: 11px; color: var(--txt3); line-height: 1.5; }
.agree-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(0,255,65,.3); transition: border-color .15s; }
.agree-link:hover { border-color: var(--accent); }

.contact-submit {
  background: var(--accent-glow);
  border: 1px solid rgba(0,255,65,.35);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  padding: 9px 22px;
  cursor: pointer;
  border-radius: 4px;
  transition: all .15s;
  margin-top: 6px;
}
.contact-submit:hover:not(:disabled) { background: rgba(0,255,65,.2); }
.contact-submit:disabled { opacity: .35; cursor: not-allowed; border-color: var(--border); color: var(--txt3); background: none; }

.contact-links { display: flex; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.contact-social { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--txt2); text-decoration: none; transition: color .15s; }
.contact-social:hover { color: var(--accent); }

/* ── reCAPTCHA バッジ非表示（利用規約に基づき免責文を表示） ── */
.grecaptcha-badge { visibility: hidden !important; }

.recaptcha-notice {
  font-size: 10px;
  color: var(--txt3);
  line-height: 1.6;
  margin-top: 12px;
}
.recaptcha-notice a {
  color: var(--txt3);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.recaptcha-notice a:hover { color: var(--accent); }

/* ── CF7 TERMINAL STYLING ── */
.wpcf7 { font-family: var(--mono); }

/* フォームグループ: ターミナルプロンプト風レイアウト */
.wpcf7 .form-group { margin-bottom: 16px; }
.wpcf7 .form-group > p {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0;
}

/* ラベル → プロンプト */
.wpcf7 .form-group label {
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
  max-width: 160px;
  padding-top: 4px;
  margin-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wpcf7 .form-group label.required::after { content: ' >'; }
.wpcf7 .form-group label:not(.required)::after { content: ' >'; }

/* ラジオ・チェックはラベルを上に */
.wpcf7 .form-group:has(.wpcf7-radio) > p,
.wpcf7 .form-group:has(.wpcf7-checkbox) > p { flex-direction: column; gap: 8px; }
.wpcf7 .form-group:has(.wpcf7-radio) label::after,
.wpcf7 .form-group:has(.wpcf7-checkbox) label::after { content: ''; }

/* control-wrap */
.wpcf7 .wpcf7-form-control-wrap { flex: 1; display: block; }

/* テキスト・メール・電話 入力 */
.wpcf7 .wpcf7-text,
.wpcf7 .wpcf7-email,
.wpcf7 .wpcf7-tel {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 0;
  outline: none;
  transition: border-color .15s;
  border-radius: 0;
}
.wpcf7 .wpcf7-text:focus,
.wpcf7 .wpcf7-email:focus,
.wpcf7 .wpcf7-tel:focus { border-color: var(--accent); }
.wpcf7 .wpcf7-text::placeholder,
.wpcf7 .wpcf7-email::placeholder,
.wpcf7 .wpcf7-tel::placeholder { color: var(--txt3); }

/* テキストエリア */
.wpcf7 .wpcf7-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--txt);
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color .15s;
}
.wpcf7 .wpcf7-textarea:focus { border-color: var(--accent); }
.wpcf7 .wpcf7-textarea::placeholder { color: var(--txt3); }

/* ラジオボタン */
.wpcf7 .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  color: var(--txt2);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: all .15s;
}
.wpcf7 .wpcf7-list-item label:hover { border-color: var(--accent); color: var(--accent); }
.wpcf7 .wpcf7-list-item label::after { content: none; }
.wpcf7 .wpcf7-list-item input[type="radio"] { accent-color: var(--accent); }
.wpcf7 .wpcf7-list-item input[type="radio"]:checked + .wpcf7-list-item-label { color: var(--accent); }
.wpcf7 .wpcf7-list-item:has(input:checked) label { border-color: rgba(0,255,65,.4); background: var(--accent-glow); color: var(--accent); }

/* チェックボックス（同意） */
.wpcf7 .wpcf7-checkbox .wpcf7-list-item label {
  border: none;
  padding: 0;
  font-size: 11px;
  color: var(--txt3);
}
.wpcf7 .wpcf7-checkbox .wpcf7-list-item label:hover { background: none; border: none; color: var(--txt2); }
.wpcf7 .wpcf7-checkbox .wpcf7-list-item:has(input:checked) label { background: none; border: none; color: var(--txt); }
.wpcf7 .wpcf7-checkbox input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; }

/* 送信ボタン */
.wpcf7 .wpcf7-submit {
  background: var(--accent-glow);
  border: 1px solid rgba(0,255,65,.35);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  padding: 9px 22px;
  cursor: pointer;
  border-radius: 4px;
  transition: all .15s;
  margin-top: 6px;
}
.wpcf7 .wpcf7-submit:hover { background: rgba(0,255,65,.2); }
.wpcf7 .wpcf7-spinner { margin-left: 8px; border-color: var(--accent); border-top-color: transparent; }

/* バリデーションエラー */
.wpcf7 .wpcf7-not-valid-tip { color: var(--red); font-size: 10px; display: block; margin-top: 4px; }
.wpcf7 .wpcf7-text.wpcf7-not-valid,
.wpcf7 .wpcf7-email.wpcf7-not-valid,
.wpcf7 .wpcf7-textarea.wpcf7-not-valid { border-color: var(--red); }

/* 送信結果メッセージ */
.wpcf7 .wpcf7-response-output {
  border: 1px solid var(--border);
  color: var(--txt2);
  background: var(--bg3);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 11px;
  margin-top: 12px;
}
.wpcf7-form.sent .wpcf7-response-output { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.invalid .wpcf7-response-output { border-color: var(--red); color: var(--red); background: rgba(255,83,83,.08); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  font-size: 11px;
  color: var(--txt3);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  margin-bottom: 32px;
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-logo-img { background: #fff; border-radius: 5px; padding: 3px 8px; display: inline-flex; align-items: center; height: 34px; width: fit-content; }
.footer-logo-img img { height: 22px; width: auto; }
.footer-tagline { font-size: 10px; color: var(--txt3); line-height: 1.6; }
.footer-col h4 { font-size: 10px; color: var(--txt3); letter-spacing: .1em; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--txt2); text-decoration: none; font-size: 11px; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy { font-size: 10px; color: var(--txt3); }
.footer-exit { font-size: 10px; color: var(--accent); }

/* ── PAGE HEADER (archive・single共通) ── */
.page-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 56px;
}
.page-header-inner { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.breadcrumb { font-size: 11px; color: var(--txt3); margin-bottom: 16px; }
.breadcrumb a { color: var(--txt3); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }
.ph-cmd { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 12px; color: var(--txt3); }
.ph-cmd .ph-dollar { color: var(--accent); }
.ph-title { font-size: 26px; font-weight: 700; letter-spacing: -1px; margin-bottom: 8px; }
.ph-sub { font-size: 12px; color: var(--txt2); }
.ph-stats { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.ph-stat { font-size: 11px; color: var(--txt3); }
.ph-stat span { color: var(--accent); font-weight: 700; margin-right: 4px; }

/* ── FILTER BAR ── */
.filter-bar { padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: 10px; color: var(--txt3); letter-spacing: .08em; }
.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--txt3);
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
  transition: all .15s;
}
.filter-btn:hover,
.filter-btn.active { background: var(--accent-glow); border-color: rgba(0,255,65,.4); color: var(--accent); }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; }
.pagination a,
.pagination span {
  background: none;
  border: 1px solid var(--border);
  color: var(--txt3);
  font-family: var(--mono);
  font-size: 10px;
  padding: 5px 12px;
  border-radius: 3px;
  text-decoration: none;
  transition: all .15s;
}
.pagination a:hover,
.pagination .current { background: var(--accent-glow); border-color: rgba(0,255,65,.4); color: var(--accent); }

/* ── SIDEBAR ── */
.content-layout { display: grid; grid-template-columns: 1fr 260px; gap: 32px; padding: 32px 0 64px; }
.sidebar-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.sidebar-card:last-child { margin-bottom: 0; }
.sidebar-title { background: var(--bg3); border-bottom: 1px solid var(--border); padding: 9px 14px; font-size: 10px; color: var(--accent); letter-spacing: .06em; }
.sidebar-body { padding: 14px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item {
  font-size: 10px;
  color: var(--txt3);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 3px;
  text-decoration: none;
  transition: all .15s;
}
.tag-item:hover { border-color: var(--accent); color: var(--accent); }

.archive-list { list-style: none; }
.archive-list li { display: flex; justify-content: space-between; font-size: 11px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.archive-list li:last-child { border: none; }
.archive-list a { color: var(--txt2); text-decoration: none; transition: color .15s; }
.archive-list a:hover { color: var(--accent); }
.archive-count { font-size: 10px; color: var(--txt3); }

.recent-post { padding: 9px 0; border-bottom: 1px solid var(--border); }
.recent-post:last-child { border: none; }
.recent-post a { font-size: 11px; color: var(--txt2); text-decoration: none; line-height: 1.4; display: block; transition: color .15s; }
.recent-post a:hover { color: var(--accent); }
.recent-date { font-size: 9px; color: var(--txt3); margin-top: 3px; }

/* ── SINGLE PROJECT ── */
.single-hero {
  background: linear-gradient(135deg, #0d2818, #0a1628, #1a0d2e);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}
.single-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,255,65,.01) 3px, rgba(0,255,65,.01) 4px);
}
.sh-cat { font-size: 10px; color: var(--accent); letter-spacing: .12em; margin-bottom: 12px; }
.sh-h1 { font-size: 30px; font-weight: 700; letter-spacing: -1px; margin-bottom: 10px; line-height: 1.2; }
.sh-sub { font-size: 13px; color: var(--txt2); margin-bottom: 20px; max-width: 600px; }
.sh-meta { display: flex; gap: 20px; flex-wrap: wrap; }
.sh-meta-item { font-size: 11px; color: var(--txt3); }
.sh-meta-item span { color: var(--txt2); }
.sh-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.stack-tag { font-size: 10px; color: var(--txt); border: 1px solid var(--border); padding: 3px 10px; border-radius: 3px; background: rgba(255,255,255,.04); }
.sh-links { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.sh-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 4px;
  text-decoration: none;
  transition: all .15s;
}
.sh-link.primary { background: var(--accent-glow); border: 1px solid rgba(0,255,65,.35); color: var(--accent); }
.sh-link.primary:hover { background: rgba(0,255,65,.2); }
.sh-link.secondary { border: 1px solid var(--border); color: var(--txt2); }
.sh-link.secondary:hover { border-color: var(--accent); color: var(--accent); }

.project-detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 32px; padding: 40px 0 64px; }
.project-sidebar { display: flex; flex-direction: column; gap: 16px; }

.content-body h2 { font-size: 16px; font-weight: 700; margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.content-body h2::before { content: '## '; color: var(--accent); }
.content-body h3 { font-size: 13px; font-weight: 700; margin: 20px 0 10px; }
.content-body h3::before { content: '### '; color: var(--txt3); font-size: 11px; }
.content-body p { font-size: 12px; color: var(--txt2); line-height: 1.9; margin-bottom: 14px; }
.content-body ul,
.content-body ol { margin-bottom: 14px; padding-left: 0; list-style: none; }
.content-body ul li,
.content-body ol li { font-size: 12px; color: var(--txt2); line-height: 1.8; padding-left: 16px; position: relative; margin-bottom: 4px; }
.content-body ul li::before { content: '>'; color: var(--accent); position: absolute; left: 0; }
.content-body ol { counter-reset: ol-counter; }
.content-body ol li::before { content: counter(ol-counter) '.'; counter-increment: ol-counter; color: var(--accent); position: absolute; left: 0; font-size: 11px; }
.content-body a { color: var(--accent); }
.content-body a:hover { text-decoration: underline; }
.content-body strong { color: var(--txt); font-weight: 700; }
.content-body code { background: var(--bg3); color: var(--accent); border: 1px solid var(--border); padding: 1px 5px; border-radius: 3px; font-size: 11px; font-family: var(--mono); }
.content-body pre { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 16px; font-size: 11px; line-height: 1.8; overflow-x: auto; margin: 18px 0; }
.content-body pre code { background: none; border: none; padding: 0; }
.content-body blockquote { border-left: 3px solid var(--accent); padding-left: 14px; margin: 16px 0; }
.content-body blockquote p { color: var(--txt2); font-style: italic; }
.content-body img { border-radius: 6px; border: 1px solid var(--border); margin: 18px 0; }

.project-screenshot { margin: 24px 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.project-screenshot img { width: 100%; display: block; }

.related-section { padding: 32px 0; border-top: 1px solid var(--border); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.related-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 16px; text-decoration: none; display: block; color: inherit; transition: border-color .15s, transform .15s; }
.related-card:hover { border-color: rgba(0,255,65,.4); transform: translateY(-1px); }

/* ── SINGLE BLOG ── */
.article-header { max-width: 800px; }
.article-cat { font-size: 10px; color: var(--accent); letter-spacing: .12em; margin-bottom: 12px; }
.article-title { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.35; margin-bottom: 16px; }
.article-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.article-date { font-size: 11px; color: var(--txt3); }
.article-tags { display: flex; gap: 6px; }
.article-read { font-size: 10px; color: var(--txt3); }

.toc { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 28px 0; max-width: 420px; }
.toc-title { background: var(--bg3); border-bottom: 1px solid var(--border); padding: 9px 14px; font-size: 10px; color: var(--accent); }
.toc-body { padding: 12px 14px; }
.toc-item { display: flex; gap: 8px; font-size: 11px; color: var(--txt2); margin-bottom: 7px; text-decoration: none; transition: color .15s; }
.toc-item:hover { color: var(--accent); }
.toc-num { color: var(--txt3); width: 20px; flex-shrink: 0; }
.toc-sub { padding-left: 28px; font-size: 10px; color: var(--txt3); margin-bottom: 6px; text-decoration: none; display: flex; gap: 6px; transition: color .15s; }
.toc-sub:hover { color: var(--txt2); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.post-nav-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; text-decoration: none; color: inherit; transition: border-color .15s; }
.post-nav-card:hover { border-color: rgba(0,255,65,.4); }
.post-nav-dir { font-size: 9px; color: var(--txt3); margin-bottom: 6px; letter-spacing: .06em; }
.post-nav-title { font-size: 11px; color: var(--txt2); line-height: 1.4; }

/* ── CALLOUT ── */
.callout { background: var(--accent-glow); border: 1px solid rgba(0,255,65,.25); border-radius: 6px; padding: 14px 16px; margin: 18px 0; font-size: 12px; color: var(--txt2); line-height: 1.7; }
.callout::before { content: '> '; color: var(--accent); font-weight: 700; }

/* ── 404 ── */
.error-section { min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; }
.error-box { text-align: center; }
.error-code { font-size: 80px; font-weight: 700; color: var(--accent); opacity: .15; line-height: 1; margin-bottom: 16px; }
.error-msg { font-size: 14px; color: var(--txt2); margin-bottom: 24px; }
.error-cmd { font-size: 11px; color: var(--txt3); margin-bottom: 8px; }

/* ── GENERIC PAGE ── */
.page-content { max-width: 760px; padding: 48px 0 80px; }
.page-content h1 { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.page-content h1::before { content: '# '; color: var(--accent); }
.page-content h2 { font-size: 16px; font-weight: 700; margin: 32px 0 12px; }
.page-content h2::before { content: '## '; color: var(--accent); }
.page-content p { font-size: 12px; color: var(--txt2); line-height: 1.9; margin-bottom: 14px; }
.page-content a { color: var(--accent); }

/* ── SKILL ARCHIVE ── */
.skill-category-group { margin-bottom: 40px; }
.skill-category-label { font-size: 10px; color: var(--accent); letter-spacing: .12em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ── BLOG ARCHIVE LAYOUT ── */
.blog-archive-item {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
  background: var(--bg2);
}
.blog-archive-item:hover { border-color: rgba(0,255,65,.4); transform: translateX(2px); }
.blog-thumb { width: 160px; flex-shrink: 0; background: linear-gradient(135deg, #0d2818, #0a1628); display: flex; align-items: center; justify-content: center; font-size: 28px; position: relative; overflow: hidden; }
.blog-thumb::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,255,65,.01) 3px, rgba(0,255,65,.01) 4px); }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { flex: 1; padding: 18px 20px; }
.blog-arrow { width: 40px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--txt3); transition: color .15s; }
.blog-archive-item:hover .blog-arrow { color: var(--accent); }

/* ── RESPONSIVE 768px ── */
@media(max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-right .mode-toggle { font-size: 9px; padding: 3px 8px; }

  .site-section { padding: 48px 0; }
  .wrap { padding: 0 20px; }

  .sh-cmd { display: none; }
  .sh-title { font-size: 16px; }

  .hero-ascii { display: none; }
  .t-name { font-size: 22px; letter-spacing: -1px; }
  .t-role { font-size: 12px; }
  .tw-body { padding: 16px; }

  .about-grid { grid-template-columns: 1fr; }

  .skills-grid { grid-template-columns: 1fr 1fr; }

  .projects-grid { grid-template-columns: 1fr; }

  .certs-grid { grid-template-columns: 1fr 1fr; }

  .contact-box { max-width: 100%; }

  /* CF7 SP対応 */
  .wpcf7 .form-group > p { flex-direction: column; gap: 4px; }
  .wpcf7 .form-group label { padding-top: 0; margin-right: 0; width: 100%; }
  .wpcf7 .wpcf7-form-control-wrap { width: 100%; }
  .wpcf7 .wpcf7-text,
  .wpcf7 .wpcf7-email,
  .wpcf7 .wpcf7-tel { width: 100% !important; border-bottom: 1px solid var(--border); padding: 6px 0; }
  .wpcf7 .wpcf7-textarea { width: 100% !important; }
  .wpcf7 .wpcf7-radio { flex-direction: column; gap: 6px; }
  .wpcf7 .wpcf7-list-item label { width: 100%; justify-content: flex-start; }
  .wpcf7 .wpcf7-submit { width: 100%; text-align: center; }

  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .page-header-inner { padding: 0 20px; }
  .ph-title { font-size: 20px; }
  .ph-stats { flex-wrap: wrap; gap: 12px; }
  .filter-row { gap: 6px; }

  .content-layout { grid-template-columns: 1fr; }
  .project-detail-layout { grid-template-columns: 1fr; }

  .blog-archive-item { flex-direction: column; }
  .blog-thumb { width: 100%; height: 120px; }
  .blog-arrow { display: none; }

  .post-nav { grid-template-columns: 1fr; }
  .toc { max-width: 100%; }

  .sh-h1 { font-size: 22px; }
  .sh-links { flex-direction: column; gap: 8px; }
  .sh-links .sh-link { justify-content: center; }

  .related-grid { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE 480px ── */
@media(max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .t-name { font-size: 18px; }
  .nav-right .mode-toggle { display: none; }
  .project-thumb, .project-thumb-img { height: 120px; }
  .cert-badge-wrap { width: 80px; height: 80px; }
  .wrap { padding: 0 16px; }
  .page-header-inner { padding: 0 16px; }
}
