* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-gradient: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  --secondary-gradient: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  --accent-gradient: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
  --dark-bg: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #4a5568 100%);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(226, 232, 240, 0.2);
  --text-primary: #f7fafc;
  --text-secondary: #e2e8f0;
  --text-accent: #cbd5e0;
  --shadow-glow: 0 8px 32px rgba(26, 32, 44, 0.4);
  --shadow-strong: 0 15px 35px rgba(0, 0, 0, 0.6);
  
  --mobile-text-primary: #ffffff;
  --mobile-text-secondary: #f7fafc;
  --mobile-text-accent: #ffffff;
  --mobile-glass-bg: rgba(0, 0, 0, 0.8);
  --mobile-glass-border: rgba(255, 255, 255, 0.4);
  --mobile-highlight-bg: rgba(255, 255, 255, 0.3);
  --mobile-card-bg: rgba(0, 0, 0, 0.9);
  --mobile-dark-bg: rgba(0, 0, 0, 0.95);
}

body {
  background: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  padding: 2rem 1rem;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(74, 85, 104, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(113, 128, 150, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(226, 232, 240, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

/* Header */
.profile-header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.8s ease-out;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--text-accent);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(203, 213, 224, 0.3);
  transition: all 0.3s ease;
}

.avatar:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(203, 213, 224, 0.5);
}

.header-text {
  flex: 1;
}

.name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.title {
  font-size: 1.1rem;
  color: var(--text-accent);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.status {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.focus-areas {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-top: 1.8rem;
  border-top: 1px solid var(--glass-border);
}

.focus-tag {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 0.7rem 1.3rem;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.focus-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 242, 254, 0.3);
}

/* Sections */
.section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--glass-border);
  animation: slideInUp 0.8s ease-out;
  transition: all 0.3s ease;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--glass-border);
  position: relative;
  letter-spacing: 0.02em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--accent-gradient);
}

.bio-text {
  line-height: 2;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.subsection-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.5rem 0 1.5rem;
}

.highlight {
  background: rgba(226, 232, 240, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid rgba(226, 232, 240, 0.25);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Projects */
.project-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.project-tag {
  background: var(--primary-gradient);
  color: var(--text-primary);
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(45, 55, 72, 0.4);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  border: 1px solid rgba(226, 232, 240, 0.1);
}

.project-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 55, 72, 0.6);
  background: var(--secondary-gradient);
}

.project-section {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 1.8rem;
  border-left: 4px solid var(--text-accent);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: 1.2rem;
}

.project-text {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 1rem;
}

.project-list {
  list-style: none;
  padding: 0;
}

.project-list li {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  padding-left: 2rem;
  position: relative;
}

.project-list li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--text-accent);
  font-weight: bold;
}

.tech-stack-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-badge-sm {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
}

.github-link-section {
  text-align: center;
  margin-top: 2rem;
}

.github-repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--primary-gradient);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.github-repo-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Tech Stack */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.tech-badge {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

/* Main Project Styles */
.main-project {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid var(--glass-border);
}

.main-project::before {
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Subsystem Cards */
.subsystem-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border-left: 4px solid #667eea;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.subsystem-card:hover {
  transform: translateX(5px);
  border-left-color: var(--text-accent);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.subsystem-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.subsystem-desc {
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.subsystem-features {
  margin-top: 1.5rem;
}

.subsystem-features strong {
  color: var(--text-accent);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.8rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.feature-list li {
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.feature-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-accent);
  font-weight: bold;
  font-size: 1.2rem;
}

.github-repo-link-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary-gradient);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.github-repo-link-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Results Section */
.results-section {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
  border-left: 4px solid var(--text-accent);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.result-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.result-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.2);
}

.result-number {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 0.5rem;
}

.result-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Simple Project Card */
.project-card-simple {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.project-card-simple:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

.project-title-simple {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.project-desc-simple {
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Learning */
.learning-summary {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.learning-books {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  padding: 2rem;
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.book-category {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.book-simple-list {
  list-style: none;
  padding: 0;
}

.book-simple-list li {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  padding-left: 2rem;
  position: relative;
}

.book-simple-list li:before {
  content: "📚";
  position: absolute;
  left: 0;
}

/* Experience */
.experience-list {
  margin-top: 1rem;
}

.experience-item {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 1.8rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #48bb78;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.experience-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.2);
}

.experience-header {
  margin-bottom: 1.2rem;
}

.experience-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.experience-period {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.experience-desc {
  color: var(--text-secondary);
  line-height: 2;
  font-size: 1rem;
}

/* Qualifications */
.qualifications {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.qualification-item {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: all 0.3s ease;
}

.qualification-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
  border-color: var(--text-accent);
}

.qualification-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.qualification-info {
  flex: 1;
}

.qualification-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.qualification-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Contact */
.contact-text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 2;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.contact-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.contact-link.github {
  background: var(--primary-gradient);
  border: 1px solid rgba(226, 232, 240, 0.2);
}

.contact-link.email {
  background: var(--secondary-gradient);
  border: 1px solid rgba(226, 232, 240, 0.2);
}

.link-icon {
  font-size: 1.2rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4rem;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px 20px 0 0;
}

.tech-fw {
  background: rgba(113, 128, 150, 0.1);
  border-color: rgba(113, 128, 150, 0.3);
}

/* Responsive */
/* iPad mini専用調整（縦向き・横向き両対応） */
@media (min-width: 481px) and (max-width: 1133px) {
  body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2d3748 100%);
  }

  .profile-header, .section {
    background: rgba(0, 0, 0, 0.88) !important;
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(22px) !important;
  }

  /* すべての本文テキストを白寄りに */
  .bio-text, .project-text, .experience-desc, 
  .subsystem-desc, .project-desc-simple,
  .learning-summary, .contact-text {
    color: #f8f8f8 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.85) !important;
    font-weight: 500 !important;
    line-height: 1.9 !important;
  }
  
  .feature-list li, .project-list li, .book-simple-list li {
    color: #f3f3f3 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 500 !important;
  }

  /* 見出し系を完全な白に */
  .name {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.85) !important;
    font-weight: 700 !important;
  }
  
  .title, .meta, .status {
    color: #f8f8f8 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.75) !important;
  }

  .section-title {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.85) !important;
    font-weight: 700 !important;
  }
  
  .project-title, .project-title-simple, .subsection-title,
  .subsystem-title, .project-subtitle, .book-category, 
  .experience-title, .qualification-name {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
  }

  /* カード背景を濃く */
  .project-card, .subsystem-card, .project-card-simple, 
  .learning-books, .experience-item, .qualification-item,
  .result-item, .project-section, .results-section {
    background: rgba(0, 0, 0, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(18px) !important;
  }

  /* タグ・バッジの視認性向上 */
  .tech-badge, .tech-badge-sm, .focus-tag, .project-tag {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.75) !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
  }

  .result-number {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 700 !important;
  }

  .result-label, .experience-period, .qualification-date {
    color: #f0f0f0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.75) !important;
  }

  .highlight {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.85) !important;
    font-weight: 700 !important;
  }

  /* ボタン・リンクの視認性 */
  .github-repo-link, .github-repo-link-sm, .contact-link {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2d3748 100%);
  }

  .profile-header, .section {
    padding: 2rem 1.5rem;
    background: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(20px) !important;
  }

  /* タブレット用のテキスト強化 */
  .bio-text, .project-text, .experience-desc, 
  .subsystem-desc, .project-desc-simple,
  .learning-summary, .contact-text {
    color: #f5f5f5 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 500 !important;
  }
  
  .feature-list li, .project-list li, .book-simple-list li {
    color: #f0f0f0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
  }

  .name {
    font-size: 1.6rem;
    color: #ffffff !important;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.8) !important;
  }
  
  .title, .meta, .status {
    color: #f5f5f5 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
  }

  .section-title {
    font-size: 1.3rem;
    color: #ffffff !important;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.8) !important;
  }
  
  .project-title, .project-title-simple, .subsection-title,
  .subsystem-title, .project-subtitle, .book-category, .experience-title {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
  }

  .project-card, .subsystem-card, .project-card-simple, 
  .learning-books, .experience-item {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
  }

  .tech-badge, .tech-badge-sm, .focus-tag, .project-tag {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
  }

  .result-number {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
  }

  .result-label {
    color: #f0f0f0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
  }

  .highlight {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .project-card {
    padding: 1.8rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

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

  .focus-areas {
    gap: 0.8rem;
  }

  .focus-tag {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .subsystem-card {
    padding: 1.5rem;
  }

  .subsystem-title {
    font-size: 1.05rem;
  }

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

  .result-number {
    font-size: 1.2rem;
  }

  .github-repo-link-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  body {
    background: #000000;
  }

  /* すべてのセクションの背景を強化 */
  .profile-header, .section {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(25px) !important;
    padding: 1.5rem !important;
  }
  
  /* すべてのテキストを白ベースに */
  .bio-text, .project-text, .experience-desc, 
  .subsystem-desc, .project-desc-simple,
  .learning-summary, .contact-text {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9) !important;
    font-weight: 500 !important;
    line-height: 1.8 !important;
  }
  
  .feature-list li, .project-list li, .book-simple-list li {
    color: #f0f0f0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 500 !important;
  }

  .name {
    font-size: 1.5rem;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
    font-weight: 700 !important;
  }
  
  .title, .meta, .status {
    color: #f5f5f5 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  }

  .section-title {
    font-size: 1.3rem;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
    font-weight: 700 !important;
  }
  
  .project-title, .project-title-simple, .subsection-title {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
  }
  
  .subsystem-title, .project-subtitle, .book-category, .experience-title {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
  }

  .project-card {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    padding: 1.5rem !important;
    backdrop-filter: blur(20px) !important;
  }

  .subsystem-card {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-left: 4px solid #ffffff !important;
    backdrop-filter: blur(15px) !important;
    padding: 1.3rem !important;
  }
  
  .project-card-simple, .learning-books, .experience-item, 
  .qualification-item, .result-item {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(15px) !important;
  }
  
  .results-section, .project-section {
    background: rgba(0, 0, 0, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
  }

  .tech-badge-sm, .tech-badge, .focus-tag, .project-tag {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
  }
  
  .result-number {
    color: #ffffff !important;
    font-size: 1.3rem !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 700 !important;
  }

  .result-label {
    color: #f0f0f0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
  }
  
  .experience-period, .qualification-date {
    color: #e0e0e0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  }
  
  .qualification-name {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
  }
  
  .highlight {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9) !important;
  }

  .github-repo-link {
    padding: 0.8rem 1.3rem;
    font-size: 0.9rem;
  }

  .contact-link {
    padding: 0.8rem 1.3rem;
    font-size: 0.9rem;
  }

  .tech-stack-inline {
    gap: 0.4rem;
  }

  .tech-badge-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .result-item {
    padding: 0.8rem;
  }

  .github-repo-link-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }

  .subsystem-card {
    padding: 1rem;
  }

  .learning-books {
    padding: 1.2rem;
  }

  .project-card-simple {
    padding: 1rem;
  }
}
/* ==================== モーダルスタイル ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content {
  margin: 3% auto;
  display: block;
  max-width: 90%;
  max-height: 85%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: modalZoomIn 0.4s ease-out;
}

@keyframes modalZoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 25px;
  right: 45px;
  color: var(--text-primary);
  font-size: 50px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 2001;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.close:hover,
.close:focus {
  color: var(--text-accent);
  transform: rotate(90deg);
  background: rgba(255, 255, 255, 0.2);
}

.demo-thumbnail {
  cursor: pointer;
  transition: all 0.4s ease;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  border: 2px solid var(--glass-border);
  box-shadow: var(--shadow-glow);
}

.demo-thumbnail:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-strong), 0 0 30px rgba(102, 126, 234, 0.4);
  border-color: var(--text-accent);
}

.demo-label {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-accent);
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.demo-container {
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

/* レスポンシブ対応（iPad mini） */
@media (min-width: 481px) and (max-width: 1133px) {
  .modal-content {
    max-width: 85%;
    max-height: 80%;
  }
  
  .close {
    top: 20px;
    right: 30px;
    font-size: 45px;
  }
  
  .demo-thumbnail {
    border-color: rgba(255, 255, 255, 0.35);
  }
  
  .demo-label {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
  }
}

/* タブレット対応 */
@media (max-width: 768px) {
  .modal-content {
    margin: 5% auto;
    max-width: 92%;
    max-height: 75%;
  }
  
  .close {
    top: 15px;
    right: 20px;
    font-size: 40px;
    width: 45px;
    height: 45px;
  }
  
  .demo-container {
    padding: 1rem;
  }
  
  .demo-label {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  }
}

/* スマホ対応 */
@media (max-width: 480px) {
  .modal {
    background-color: rgba(0, 0, 0, 0.98);
  }
  
  .modal-content {
    margin: 10% auto;
    max-width: 95%;
    max-height: 70%;
  }
  
  .close {
    top: 10px;
    right: 15px;
    font-size: 35px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
  }
  
  .demo-container {
    padding: 0.8rem;
    margin: 1.5rem 0;
  }
  
  .demo-thumbnail {
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
  }
  
  .demo-label {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9) !important;
    font-weight: 600 !important;
    font-size: 0.9rem;
  }
}