/* ========================================
   lontra - スタイルシート
   Based on bravebird Portfolio Design
======================================== */

/* ========================================
   リセット & ベース設定
======================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Montserrat', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #fdfcfb 0%, #f8f9fa 50%, #faf9f8 100%);
  color: #2d3748;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100%;
  font-size: 16px;
  display: flex;
  font-weight: 400;
  animation: fadeIn 0.6s ease-in;
}

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

a {
  color: #00CED1;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

a:hover {
  color: #20B2AA;
}

img {
  max-width: 100%;
  display: block;
}

strong {
  font-weight: 600;
}

/* ========================================
   サイドバー
======================================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 2px 0 30px rgba(127, 255, 212, 0.08);
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  margin-bottom: 3rem;
}

.profile-image-wrapper {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.profile-image-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-image-link:hover {
  transform: translateY(-4px);
}

.profile-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(127, 255, 212, 0.2), rgba(0, 206, 209, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(127, 255, 212, 0.2);
}

.profile-icon svg {
  width: 50px;
  height: 50px;
  stroke: #00CED1;
}

.sidebar-title-link {
  text-decoration: none;
  display: block;
}

.sidebar-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.sidebar-title .name-first {
  color: #2d3748;
  transition: color 0.3s ease;
}

.sidebar-title .name-second {
  color: #00CED1;
  transition: color 0.3s ease;
}

.sidebar-title-link:hover .sidebar-title {
  transform: scale(1.02);
}

.sidebar-subtitle {
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.subtitle-line {
  display: block;
  font-family: 'Montserrat', sans-serif;
}

.subtitle-accent {
  color: #00CED1;
  font-weight: 600;
  margin-top: 0.2rem;
  font-size: 0.85rem;
}

.sidebar-nav {
  margin-top: 2rem;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.3rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.8rem 1.2rem;
  color: #4a5568;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  position: relative;
}

.sidebar-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 60%;
  background: linear-gradient(90deg, #7FFFD4 0%, transparent 100%);
  border-radius: 0 4px 4px 0;
  transition: width 0.3s ease;
  opacity: 0;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(127, 255, 212, 0.1);
  color: #00CED1;
  padding-left: 1.5rem;
}

.sidebar-nav a:hover::before,
.sidebar-nav a.active::before {
  width: 4px;
  opacity: 1;
}

/* ========================================
   日付表示
======================================== */
.current-date {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 50;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: #718096;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(127, 255, 212, 0.1);
}

.date-separator {
  color: #00CED1;
}

.date-weekday {
  margin-left: 0.3rem;
  color: #00CED1;
  font-weight: 700;
}

/* ========================================
   ダークモードトグル
======================================== */
.dark-mode-toggle {
  position: fixed;
  top: 2rem;
  right: 12rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(127, 255, 212, 0.15);
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  background: rgba(127, 255, 212, 0.2);
  transform: scale(1.1);
}

.dark-mode-toggle svg {
  width: 20px;
  height: 20px;
  fill: #718096;
  stroke: #718096;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.3s ease;
}

/* ========================================
   メインコンテンツ
======================================== */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 4rem 3rem 3rem 3rem;
  overflow-y: auto;
  min-height: 100vh;
}

/* ========================================
   ブログヘッダー
======================================== */
.blog-header {
  margin-bottom: 3rem;
  text-align: center;
}

.blog-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
  letter-spacing: 0.02em;
}

.blog-description {
  font-size: 1.1rem;
  color: #718096;
  font-weight: 500;
}

/* ========================================
   ブログカードグリッド
======================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(127, 255, 212, 0.08);
  border: 1px solid rgba(127, 255, 212, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(127, 255, 212, 0.2);
  border-color: rgba(127, 255, 212, 0.3);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.blog-card-date {
  font-size: 0.85rem;
  color: #718096;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.03em;
}

.blog-card-category {
  font-size: 0.75rem;
  color: #00CED1;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  background: rgba(127, 255, 212, 0.15);
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Montserrat', sans-serif;
}

.blog-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
}

.blog-card-title a {
  color: #1a202c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color: #00CED1;
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #00CED1;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.6rem 0;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.02em;
}

.blog-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.blog-card-link:hover {
  gap: 0.8rem;
  color: #20B2AA;
}

.blog-card-link:hover svg {
  transform: translateX(4px);
}

/* 準備中カード */
.blog-card-coming-soon {
  opacity: 0.7;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.5);
}

.blog-card-coming-soon:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(127, 255, 212, 0.08);
}

.blog-card-coming-soon .blog-card-title span {
  color: #718096;
}

/* ========================================
   ブログ記事ページ専用スタイル
======================================== */
.blog-article {
  max-width: 800px;
  padding-top: 2rem;
  margin: 0 auto;
}

.blog-article-header {
  margin-bottom: 3rem;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.blog-article-date {
  font-size: 0.9rem;
  color: #718096;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.03em;
}

.blog-article-category {
  font-size: 0.8rem;
  color: #00CED1;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  background: rgba(127, 255, 212, 0.15);
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Montserrat', sans-serif;
}

.blog-article-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  color: #1a202c;
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
}

.blog-article-excerpt {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #718096;
  padding-left: 1.5rem;
  border-left: 3px solid rgba(127, 255, 212, 0.4);
  margin-bottom: 2rem;
}

.blog-article-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(127, 255, 212, 0.1), rgba(0, 206, 209, 0.08));
  border-radius: 16px;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  overflow: hidden;
}

.blog-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-article-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #4a5568;
}

.blog-article-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
}

.blog-article-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a202c;
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
  position: relative;
  padding-bottom: 0.5rem;
}

.blog-article-content h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #7FFFD4 0%, #00CED1 100%);
  border-radius: 2px;
}

.blog-article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a202c;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-family: 'Noto Sans JP', serif;
}

.blog-article-content p {
  margin-bottom: 1.5rem;
}

.blog-article-content ul,
.blog-article-content ol {
  margin: 1.5rem 0 1.5rem 2rem;
}

.blog-article-content li {
  margin-bottom: 0.5rem;
}

.blog-article-content code {
  background: rgba(127, 255, 212, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9em;
  color: #00CED1;
}

.blog-article-content pre {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid rgba(127, 255, 212, 0.2);
}

.blog-article-content pre code {
  background: none;
  padding: 0;
  color: #2d3748;
}

.blog-article-content blockquote {
  border-left: 4px solid #7FFFD4;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(127, 255, 212, 0.05);
  border-radius: 0 8px 8px 0;
  color: #4a5568;
  font-style: italic;
}

.blog-article-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(127, 255, 212, 0.2);
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #00CED1;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  background: rgba(127, 255, 212, 0.08);
  border: 1px solid rgba(127, 255, 212, 0.2);
  transition: all 0.3s ease;
  font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
}

.blog-back-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.blog-back-link:hover {
  background: rgba(127, 255, 212, 0.15);
  border-color: rgba(127, 255, 212, 0.4);
  transform: translateX(-4px);
  color: #20B2AA;
}

.blog-back-link:hover svg {
  transform: translateX(-4px);
}

/* ========================================
   ダークモード
======================================== */
body.dark-mode {
  background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0f1419 100%);
  color: #e2e8f0;
}

body.dark-mode .sidebar {
  background: rgba(15, 27, 42, 0.95);
  box-shadow: 2px 0 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .sidebar-title .name-first {
  color: #f1f5f9;
}

body.dark-mode .sidebar-title .name-second {
  color: #7FFFD4;
}

body.dark-mode .sidebar-subtitle {
  color: #94a3b8;
}

body.dark-mode .subtitle-accent {
  color: #7FFFD4;
}

body.dark-mode .sidebar-nav a {
  color: #cbd5e1;
}

body.dark-mode .sidebar-nav a:hover,
body.dark-mode .sidebar-nav a.active {
  background: rgba(127, 255, 212, 0.15);
  color: #7FFFD4;
}

body.dark-mode .current-date {
  background: rgba(15, 27, 42, 0.8);
  color: #cbd5e1;
}

body.dark-mode .date-separator,
body.dark-mode .date-weekday {
  color: #7FFFD4;
}

body.dark-mode .dark-mode-toggle {
  background: rgba(15, 27, 42, 0.8);
}

body.dark-mode .dark-mode-toggle svg {
  fill: #cbd5e1;
  stroke: #cbd5e1;
}

body.dark-mode .blog-title {
  color: #f1f5f9;
}

body.dark-mode .blog-description {
  color: #94a3b8;
}

body.dark-mode .blog-card {
  background: rgba(15, 27, 42, 0.6);
  border-color: rgba(127, 255, 212, 0.2);
}

body.dark-mode .blog-card:hover {
  background: rgba(15, 27, 42, 0.8);
  border-color: rgba(127, 255, 212, 0.4);
}

body.dark-mode .blog-card-date {
  color: #94a3b8;
}

body.dark-mode .blog-card-category {
  color: #7FFFD4;
  background: rgba(127, 255, 212, 0.15);
}

body.dark-mode .blog-card-title a {
  color: #f1f5f9;
}

body.dark-mode .blog-card-title a:hover {
  color: #7FFFD4;
}

body.dark-mode .blog-card-excerpt {
  color: #cbd5e1;
}

body.dark-mode .blog-card-link {
  color: #7FFFD4;
}

body.dark-mode .blog-card-link:hover {
  color: #00CED1;
}

body.dark-mode .blog-card-coming-soon {
  background: rgba(15, 27, 42, 0.4);
  border-color: rgba(127, 255, 212, 0.2);
}

body.dark-mode .blog-card-coming-soon .blog-card-title span {
  color: #94a3b8;
}

/* ブログ記事ページのダークモード */
body.dark-mode .blog-article-title {
  color: #f1f5f9;
}

body.dark-mode .blog-article-date {
  color: #94a3b8;
}

body.dark-mode .blog-article-category {
  color: #7FFFD4;
  background: rgba(127, 255, 212, 0.15);
}

body.dark-mode .blog-article-excerpt {
  color: #cbd5e1;
  border-left-color: rgba(127, 255, 212, 0.4);
}

body.dark-mode .blog-article-content {
  color: #cbd5e1;
}

body.dark-mode .blog-article-content h1,
body.dark-mode .blog-article-content h2,
body.dark-mode .blog-article-content h3 {
  color: #f1f5f9;
}

body.dark-mode .blog-article-content pre {
  background: rgba(15, 27, 42, 0.6);
  border-color: rgba(127, 255, 212, 0.2);
}

body.dark-mode .blog-article-content pre code {
  color: #e2e8f0;
}

body.dark-mode .blog-article-content code {
  background: rgba(127, 255, 212, 0.15);
  color: #7FFFD4;
}

body.dark-mode .blog-article-content blockquote {
  background: rgba(127, 255, 212, 0.08);
  border-left-color: #7FFFD4;
  color: #cbd5e1;
}

body.dark-mode .blog-article-image {
  background: linear-gradient(135deg, rgba(127, 255, 212, 0.15), rgba(0, 206, 209, 0.1));
}

body.dark-mode .blog-article-footer {
  border-top-color: rgba(127, 255, 212, 0.2);
}

body.dark-mode .blog-back-link {
  background: rgba(127, 255, 212, 0.1);
  border-color: rgba(127, 255, 212, 0.25);
  color: #7FFFD4;
}

body.dark-mode .blog-back-link:hover {
  background: rgba(127, 255, 212, 0.2);
  border-color: rgba(127, 255, 212, 0.5);
  color: #00CED1;
}

body.dark-mode .profile-icon {
  background: linear-gradient(135deg, rgba(127, 255, 212, 0.25), rgba(0, 206, 209, 0.2));
  box-shadow: 0 8px 30px rgba(127, 255, 212, 0.3);
}

body.dark-mode .profile-icon svg {
  stroke: #7FFFD4;
}

/* ========================================
   レスポンシブ対応
======================================== */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 240px;
    padding: 3rem 2rem;
  }

  .current-date {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  .dark-mode-toggle {
    right: 10rem;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    padding: 2rem 1.5rem;
  }

  .main-content {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }

  .current-date {
    top: auto;
    bottom: 2rem;
    right: 1rem;
  }

  .dark-mode-toggle {
    top: auto;
    bottom: 2rem;
    left: 1rem;
    right: auto;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-article {
    padding-top: 1rem;
  }
}

/* アクセシビリティ: アニメーション削減 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

