@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Inter:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&display=swap');

:root {
  /* Anthropic-inspired palette */
  --bg: #faf9f5;
  --bg-elevated: #ffffff;
  --bg-dark: #141413;
  --bg-dark-elevated: #1f1e1d;

  --text-primary: #1f1e1d;
  --text-secondary: #5e5d59;
  --text-muted: #b0aea5;
  --text-on-dark: #f0eee6;
  --text-on-dark-secondary: #b0aea5;

  --accent-terracotta: #d97757;
  --accent-terracotta-light: #e8a08a;
  --accent-amber: #c9a96e;
  --accent-amber-light: #e8d5a8;

  --border: #e8e6dc;
  --border-dark: #3d3d3a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-none: none;
  --shadow-subtle: 0 1px 2px rgba(31, 30, 29, 0.04);
  --shadow-soft: 0 4px 20px rgba(31, 30, 29, 0.06);

  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --font-hand: 'Great Vibes', cursive;
}

[data-theme="dark"] {
  --bg: #141413;
  --bg-elevated: #1f1e1d;
  --bg-dark: #faf9f5;
  --bg-dark-elevated: #ffffff;

  --text-primary: #f0eee6;
  --text-secondary: #b0aea5;
  --text-muted: #5e5d59;
  --text-on-dark: #1f1e1d;
  --text-on-dark-secondary: #5e5d59;

  --accent-terracotta: #e8a08a;
  --accent-terracotta-light: #d97757;
  --accent-amber: #e8d5a8;
  --accent-amber-light: #c9a96e;

  --border: #3d3d3a;
  --border-dark: #e8e6dc;

  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--accent-terracotta), var(--accent-amber));
  z-index: 1001;
  transition: width 0.08s ease-out;
}

/* ===== ARTISTIC BACKGROUND TEXT ===== */
body::before {
  content: 'Yuiko';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--font-hand);
  font-size: clamp(200px, 28vw, 400px);
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.02em;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 120px;
  position: relative;
}

.container-wide {
  max-width: 1100px;
}

/* ===== HEADER / PROFILE ===== */
.profile-header {
  text-align: center;
  margin-bottom: 64px;
  animation: fadeInUp 0.8s ease-out;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 28px;
  border: 2px solid var(--border);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

@keyframes avatar-pulse {
  0% {
    box-shadow: 0 0 0 0px rgba(217, 119, 87, 0.4), 0 0 10px rgba(217, 119, 87, 0.1);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(217, 119, 87, 0), 0 0 20px rgba(217, 119, 87, 0.2);
  }
  100% {
    box-shadow: 0 0 0 0px rgba(217, 119, 87, 0), 0 0 10px rgba(217, 119, 87, 0.15);
  }
}

.avatar:hover {
  transform: scale(1.04);
  border-color: var(--accent-terracotta);
  animation: avatar-pulse 2s infinite ease-in-out;
}

.name {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.bio {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
  font-weight: 400;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== LINKS ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s ease;
  border: 1px solid var(--border);
  font-family: var(--font-sans);
}

.link-btn:hover {
  color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
  background: rgba(217, 119, 87, 0.04);
}

/* ===== META INFO (institution, identity, etc) ===== */
.meta-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.meta-tag {
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
}

.meta-tag:hover {
  color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
}

.emails {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

.emails a {
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: color 0.25s ease;
}

.emails a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-terracotta);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.emails a:hover {
  color: var(--accent-terracotta);
}

.emails a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ===== SECTIONS ===== */
.section {
  margin-bottom: 56px;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* ===== ABOUT / INTRO ===== */
.introduction {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.85;
  white-space: pre-wrap;
  font-weight: 400;
}

/* ===== NEWS (Timeline style) ===== */
.news-list {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 12px;
}

.news-list::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: var(--border);
}

.news-item {
  position: relative;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 12px 0 12px 20px;
  border-bottom: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-item::before {
  content: '';
  position: absolute;
  left: -16.5px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-muted);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.news-item:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

.news-item:hover::before {
  border-color: var(--accent-terracotta);
  background: var(--accent-terracotta);
  box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.2);
}

.news-date {
  color: var(--accent-terracotta);
  font-size: 12px;
  font-weight: 600;
  margin-right: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  display: inline-block;
}

.news-text {
  color: inherit;
}

/* ===== ARTICLES / TWEETS ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-item {
  display: block;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-terracotta);
  box-shadow: 0 12px 24px -10px rgba(217, 119, 87, 0.15), var(--shadow-soft);
}

.article-item:hover .article-title {
  color: var(--accent-terracotta);
}

.article-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
  transition: color 0.25s ease;
}

.article-summary {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.6;
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ===== EXPERIENCES (Timeline style) ===== */
.experiences-list {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 12px;
}

.experiences-list::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: var(--border);
}

.experience-item {
  position: relative;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 12px 0 12px 20px;
  border-bottom: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.experience-item::before {
  content: '';
  position: absolute;
  left: -16.5px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-muted);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.experience-item:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

.experience-item:hover::before {
  border-color: var(--accent-terracotta);
  background: var(--accent-terracotta);
  box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.2);
}

/* ===== RESEARCH TAGS ===== */
.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-tag {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: default;
}

.research-tag:hover {
  color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
  background: rgba(217, 119, 87, 0.04);
}

/* ===== CONTROLS (Glassmorphic Capsule) ===== */
.controls, .nav-controls {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(250, 249, 245, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(232, 230, 220, 0.6);
  border-radius: 100px;
  padding: 4px;
  box-shadow: 0 8px 32px 0 rgba(31, 30, 29, 0.06), var(--shadow-subtle);
  transition: all 0.3s ease;
}

[data-theme="dark"] .controls,
[data-theme="dark"] .nav-controls {
  background: rgba(31, 30, 29, 0.75);
  border-color: rgba(61, 61, 58, 0.6);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), var(--shadow-subtle);
}

.control-btn, .nav-btn {
  background: transparent;
  border: none;
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  outline: none;
}

.control-btn:hover, .nav-btn:hover {
  color: var(--accent-terracotta);
  background: rgba(217, 119, 87, 0.08);
}

.control-btn:active, .nav-btn:active {
  transform: scale(0.96);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
}

/* ===== SHARE ===== */
.share-btn {
  position: fixed;
  bottom: 80px;
  right: 32px;
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-btn:hover {
  color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
  border: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container {
    padding: 60px 20px 80px;
  }

  .name {
    font-size: 28px;
  }

  .bio {
    font-size: 15px;
  }

  .section-title {
    font-size: 20px;
  }

  .controls, .nav-controls {
    top: 12px;
    right: 12px;
    padding: 2px;
  }

  .control-btn, .nav-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .back-to-top,
  .share-btn {
    right: 20px;
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .share-btn {
    bottom: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
