/* ===========================================
   chinguDachi GitHub Pages
   Colors: Coral (#FF6B6B) + Indigo (#6366F1)
   Fonts: Pretendard + Noto Sans JP
   =========================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

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

:root {
  --coral: #FF6B6B;
  --coral-light: #FF8A8A;
  --coral-dark: #E85555;
  --indigo: #6366F1;
  --indigo-light: #818CF8;
  --indigo-dark: #4F46E5;
  --bg: #FFFFFF;
  --bg-surface: #FAFAFA;
  --text: #18181B;
  --text-secondary: #71717A;
  --text-muted: #A1A1AA;
  --border: #E4E4E7;
  --success: #10B981;
  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 800px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard Variable', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Language Toggle --- */
.lang-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.lang-toggle button {
  padding: 6px 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.lang-toggle button:first-child {
  border-radius: 8px 0 0 8px;
}

.lang-toggle button:last-child {
  border-radius: 0 8px 8px 0;
}

.lang-toggle button.active {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

.lang-toggle button:hover:not(.active) {
  background: var(--bg-surface);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero-logo {
  font-size: 48px;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--coral), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 500;
}

.hero .tagline {
  font-size: 18px;
  color: var(--text);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.badge--coral {
  background: #FFF1F1;
  border-color: #FFD4D4;
  color: var(--coral-dark);
}

.badge--indigo {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: var(--indigo-dark);
}

.badge--green {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #059669;
}

/* --- Sections --- */
section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

section .section-desc {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 16px;
}

/* --- Feature Cards --- */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.feature-card .icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* --- Translation Flow --- */
.flow-diagram {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 24px;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
}

.flow-step + .flow-step {
  border-top: 1px dashed var(--border);
}

.flow-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--indigo));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.flow-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.flow-content p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Tech Stack Table --- */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.tech-table th,
.tech-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.tech-table th {
  font-weight: 600;
  color: var(--text);
  background: var(--bg-surface);
}

.tech-table td:first-child {
  font-weight: 500;
  color: var(--indigo);
}

/* --- Architecture --- */
.arch-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 24px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
}

/* --- Roadmap --- */
.roadmap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.roadmap-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.roadmap-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.roadmap-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--coral);
}

.roadmap-dot--active {
  background: var(--coral);
}

.roadmap-line {
  width: 2px;
  height: 40px;
  background: var(--border);
}

.roadmap-content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  flex: 1;
}

.roadmap-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.roadmap-content .phase-time {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.roadmap-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Blog Preview --- */
.blog-list {
  list-style: none;
  margin-top: 24px;
}

.blog-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-list li:last-child {
  border-bottom: none;
}

.blog-title {
  font-weight: 500;
  color: var(--text);
}

.blog-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* --- Developer --- */
.developer {
  text-align: center;
  padding-top: 40px;
}

.dev-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 3px solid var(--border);
}

.dev-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.dev-role {
  color: var(--text-secondary);
  font-size: 14px;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

footer a {
  color: var(--coral);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* --- Responsive: Tablet --- */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

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

  section h2 {
    font-size: 24px;
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 48px 0 36px;
  }

  .hero-logo {
    font-size: 36px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero .subtitle {
    font-size: 13px;
  }

  .hero .tagline {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .badges {
    gap: 6px;
  }

  .badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  section {
    padding: 36px 0;
  }

  section h2 {
    font-size: 22px;
  }

  section .section-desc {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-card .icon {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .feature-card h3 {
    font-size: 16px;
  }

  .flow-diagram {
    padding: 20px;
  }

  .flow-step {
    gap: 12px;
  }

  .flow-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .flow-content h4 {
    font-size: 14px;
  }

  .flow-content p {
    font-size: 13px;
  }

  /* Tech table: horizontal scroll on mobile */
  .tech-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tech-table th,
  .tech-table td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .roadmap-item {
    gap: 12px;
  }

  .roadmap-content {
    padding: 16px;
  }

  .roadmap-content h3 {
    font-size: 15px;
  }

  .roadmap-content p {
    font-size: 13px;
  }

  .blog-list li {
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .blog-title {
    font-size: 14px;
  }

  .dev-avatar {
    width: 80px;
    height: 80px;
  }

  .dev-name {
    font-size: 18px;
  }

  footer {
    padding: 28px 0;
    font-size: 13px;
  }

  .lang-toggle button {
    padding: 8px 20px;
    font-size: 14px;
  }
}

/* --- Language visibility --- */
[data-lang="ja"] { display: none; }

body.lang-ja [data-lang="ko"] { display: none; }
body.lang-ja [data-lang="ja"] { display: revert; }
