/* ==========================================================================
   クリーン・プロフェッショナル - 信頼感 × シンプル × 洗練
   ========================================================================== */

/* Google Fonts - Noto Sans JP */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Colors - Light Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-accent: #f1f3f4;

  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6b7280;

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;

  --border-color: #e5e7eb;
  --border-dark: #d1d5db;

  /* Typography */
  --font-main: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Transitions */
  --transition-fast: 150ms ease;
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
html {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.8;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  margin: 0 auto;
  max-width: 48rem;
  padding: var(--spacing-2xl) var(--spacing-xl);
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

/* Title Header */
header#title-block-header {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 2px solid var(--text-primary);
}

h1.title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.02em;
}

h1.title::before {
  content: '>_ ';
  color: var(--accent-primary);
  font-weight: 400;
}

/* Section Headers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

h1 {
  font-size: 1.375rem;
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
}

h1::before {
  content: '# ';
  color: var(--accent-primary);
  font-weight: 400;
}

h2 {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

h2::before {
  content: '## ';
  color: var(--text-muted);
}

h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

h3::before {
  content: '/// ';
  color: var(--text-muted);
  font-weight: 400;
}

/* Paragraphs */
p {
  margin: var(--spacing-md) 0;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

a:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

a:visited {
  color: #6b21a8;
}

/* Header links */
h1 a, h2 a, h3 a {
  color: inherit;
  border-bottom: none;
}

h1 a:hover, h2 a:hover, h3 a:hover {
  color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */
ul, ol {
  padding-left: 1.25rem;
  margin: var(--spacing-md) 0;
}

li {
  margin: var(--spacing-sm) 0;
  color: var(--text-secondary);
  padding-left: var(--spacing-xs);
}

/* Nested lists */
li > ul, li > ol {
  margin-top: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

/* Date entries styling */
ul > li {
  position: relative;
}

/* Year/date items - subtle emphasis */
body > ul > li,
#登壇とスライド + ul > li,
h1 + ul > li {
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--bg-accent);
}

body > ul > li:last-child,
#登壇とスライド + ul > li:last-child,
h1 + ul > li:last-child {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Code
   -------------------------------------------------------------------------- */
code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875em;
  background-color: var(--bg-secondary);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: var(--spacing-md);
  overflow-x: auto;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Blockquote
   -------------------------------------------------------------------------- */
blockquote {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) var(--spacing-lg);
  border-left: 3px solid var(--accent-primary);
  background-color: var(--accent-light);
  color: var(--text-secondary);
  border-radius: 0 4px 4px 0;
}

/* --------------------------------------------------------------------------
   Horizontal Rule
   -------------------------------------------------------------------------- */
hr {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: var(--spacing-2xl) 0;
}

/* --------------------------------------------------------------------------
   Images
   -------------------------------------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Table of Contents
   -------------------------------------------------------------------------- */
#TOC {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

#TOC ul {
  margin: 0;
  padding-left: var(--spacing-md);
}

#TOC li {
  list-style: none;
  padding: var(--spacing-xs) 0;
  border-bottom: none;
}

#TOC a {
  color: var(--text-secondary);
}

#TOC a:hover {
  color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding: var(--spacing-lg) var(--spacing-md);
    font-size: 0.9375rem;
  }

  h1.title {
    font-size: 1.5rem;
  }

  h1 {
    font-size: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   Accessibility - Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  body {
    max-width: none;
    padding: 0;
  }

  a {
    color: var(--text-primary);
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--text-muted);
  }

  h1::before, h2::before, h3::before, h1.title::before {
    content: none;
  }
}

/* --------------------------------------------------------------------------
   Selection
   -------------------------------------------------------------------------- */
::selection {
  background-color: var(--accent-light);
  color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   Focus Visible
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

footer hr {
  margin-bottom: var(--spacing-lg);
}

footer p {
  margin: var(--spacing-sm) 0;
  color: var(--text-muted);
}

footer a {
  color: var(--text-secondary);
  margin: 0 var(--spacing-xs);
}

footer a:hover {
  color: var(--accent-primary);
}

/* Contact Button */
.contact-button {
  display: inline-block;
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--accent-primary);
  color: #ffffff !important;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.contact-button:hover {
  background-color: var(--accent-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.contact-button:visited {
  color: #ffffff !important;
}
