/* ==========================================================================
   komikomi.arrows.jp - Personal Portfolio & Atelier
   Developer: Hiroyuki Komiya (@komikomi650)
   Theme: Warm Indie Developer / Craftsman Dark Mode
   ========================================================================== */

/* --- 1. Variables & Global Tokens --- */
:root {
  --bg-deep: #0a0d14;
  --bg-surface: #101622;
  --bg-card: rgba(18, 25, 38, 0.75);
  --bg-card-hover: rgba(24, 34, 52, 0.9);
  --bg-alt: #0d121c;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(56, 189, 248, 0.45);

  --accent-cyan: #38bdf8;
  --accent-emerald: #34d399;
  --accent-indigo: #818cf8;
  --accent-amber: #fbbf24;
  --accent-coconala: #ff5722;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container-max: 1080px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.75;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(56, 189, 248, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 30%, rgba(52, 211, 153, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 85%, rgba(129, 140, 248, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.3;
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   2. Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  height: 68px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-handle {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.brand-role {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text-main);
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.social-icon-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.header-coconala-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.3);
  color: #ff7043;
  font-size: 0.78rem;
  font-weight: 600;
}

.header-coconala-tag:hover {
  background: rgba(255, 87, 34, 0.22);
}

/* ==========================================================================
   3. Hero Section
   ========================================================================== */
.hero-section {
  padding: 80px 0 60px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--accent-emerald);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.25;
}

.text-highlight {
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-bio {
  font-size: 1.12rem;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 12px;
}

.hero-bio-sub {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--accent-cyan);
  color: #0b1320;
}

.btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-coconala {
  background: var(--accent-coconala);
  color: #ffffff;
}

.btn-coconala:hover {
  background: #f4511e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.35);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.hero-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-item {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Personal Profile Card */
.profile-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-letter {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.profile-realname {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.profile-nick {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

.profile-tagline {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.profile-quote {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--accent-emerald);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 22px;
  line-height: 1.6;
}

.profile-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.86rem;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.fact-label {
  color: var(--text-dim);
  white-space: nowrap;
}

.fact-val {
  color: var(--text-secondary);
  font-weight: 500;
  text-align: right;
  line-height: 1.5;
}

.profile-terminal-snippet {
  background: #080b11;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
}

.terminal-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.terminal-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.term-green {
  color: var(--accent-emerald);
}

.term-dim {
  color: var(--text-dim);
}

/* ==========================================================================
   4. Common Section Layout
   ========================================================================== */
.section-block {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-intro {
  margin-bottom: 48px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.section-heading {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 680px;
}

/* ==========================================================================
   5. Philosophy Section
   ========================================================================== */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: var(--transition-smooth);
}

.philosophy-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--bg-card-hover);
}

.phil-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.philosophy-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--text-main);
}

.philosophy-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   6. Works Section
   ========================================================================== */
.works-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-smooth);
}

.work-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.work-card.highlight {
  border-color: rgba(56, 189, 248, 0.25);
  background: linear-gradient(180deg, rgba(22, 32, 50, 0.8) 0%, rgba(18, 25, 38, 0.75) 100%);
}

.work-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.work-cat-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.work-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--accent-emerald);
  font-size: 0.74rem;
  font-weight: 600;
}

.work-title {
  font-size: 1.45rem;
  margin-bottom: 16px;
  color: var(--text-main);
}

.work-story {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.story-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.work-story p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.work-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.work-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.work-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.work-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.work-link.primary {
  color: var(--accent-cyan);
}

.work-link.coconala {
  color: #ff7043;
}

.work-note-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ==========================================================================
   7. Toolkit Section
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tool-group {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
}

.tool-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-group-icon {
  font-size: 1.3rem;
}

.tool-group-header h4 {
  font-size: 1.1rem;
  color: var(--text-main);
}

.tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
}

.tool-list li strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.tool-list li span {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   8. Logs & Channels Section
   ========================================================================== */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.channel-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-card-hover);
}

.channel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.channel-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.note-badge {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-emerald);
}

.x-badge {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
}

.tiktok-badge {
  background: rgba(129, 140, 248, 0.12);
  color: var(--accent-indigo);
}

.coconala-badge {
  background: rgba(255, 87, 34, 0.12);
  color: #ff7043;
}

.channel-arrow {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.channel-card:hover .channel-arrow {
  color: var(--text-main);
  transform: translateX(4px);
}

.channel-card h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.channel-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.channel-link-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.channel-card:hover .channel-link-text {
  color: var(--accent-cyan);
}

/* ==========================================================================
   9. Contact Section
   ========================================================================== */
.contact-box {
  background: linear-gradient(180deg, rgba(22, 32, 50, 0.9) 0%, rgba(14, 20, 32, 0.9) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.contact-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  margin-bottom: 16px;
}

.contact-title {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 16px;
}

.contact-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 36px auto;
}

.contact-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.contact-subtext {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ==========================================================================
   10. Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  background-color: var(--bg-deep);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-domain {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.86rem;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   11. Responsive Media Queries
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .philosophy-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-links {
    display: none; /* simple mobile cleanup */
  }

  .contact-box {
    padding: 40px 24px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .contact-buttons {
    flex-direction: column;
    width: 100%;
  }

  .contact-buttons .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
