:root {
  --page-background: #dfe9ff;
  --panel: #f5f8ff;
  --soft-panel: #edf3ff;
  --card-border: rgba(148, 163, 184, 0.25);
  --heading-color: #1f2a44;
  --subtext-color: #475569;
  --accent: #4f6ef7;
  --accent-deep: #2b4bd6;
  --bg-deep: #dfe9ff;
  --page-text: #101826;
  --shadow: none;
}

* {
.skill-line-break {
  flex-basis: 100%;
  height: 0;
}
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: var(--page-background);
  color: var(--page-text);
  min-height: 100vh;
}

body.dark-mode {
  --page-background: #172033;
  --panel: #1b2434;
  --soft-panel: #212d42;
  --card-border: rgba(148, 163, 184, 0.22);
  --heading-color: #edf3ff;
  --subtext-color: #dbe3f1;
  --accent: #8da2ff;
  --accent-deep: #c6d1ff;
  --bg-deep: #111827;
  --page-text: #edf3ff;
  --shadow: none;
}

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

body.site-body {
  position: relative;
  overflow-x: hidden;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 30px));
  margin: 18px auto 24px;
  display: grid;
  grid-template-columns: 1fr;
}

.glass-card {
  background: var(--panel);
  border: 1px solid var(--card-border);
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none !important;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 0;
  margin-bottom: 28px;
  opacity: 0;
  box-shadow: none !important;
  transform: translateY(-12px);
  animation: reveal-in 0.8s ease-out forwards;
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--heading-color);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 0;
  object-fit: cover;
  box-shadow: none;
  animation: fish-bob 3s ease-in-out infinite;
}

.hero-actions .primary-action,
.hero-actions .secondary-action {
  animation: fish-bob 3s ease-in-out infinite;
}

.hero-actions .secondary-action {
  animation-delay: 0.2s;
}

@keyframes fish-bob {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes text-bob {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

p, h1, h2, h3, h4, a, button, li, span {
  animation: text-bob 3s ease-in-out forwards;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button {
  color: var(--subtext-color);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 10px 14px;
  border: 1px solid transparent;
}

.site-nav button {
  border-radius: 8px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav .is-active {
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(99, 102, 241, 0.18);
}

.nav-icon {
  display: none;
}

.nav-home::before,
.nav-home::after,
.nav-info,
.nav-info::before,
.nav-heart,
.nav-heart svg {
  display: none !important;
}

.theme-toggle {
  border: 1px solid rgba(255,255,255,0.42);
  background: #1f2a44;
  color: #f8fafc;
  --toggle-background: #1f2a44;
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  position: relative;
}

body.dark-mode .theme-toggle {
  background: #e2e8f0;
  color: #0f172a;
  --toggle-background: #e2e8f0;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: currentColor;
}

body:not(.dark-mode) .theme-toggle::before {
  box-shadow: 0 -8px 0 -6px currentColor, 0 8px 0 -6px currentColor, 8px 0 0 -6px currentColor, -8px 0 0 -6px currentColor, 6px 6px 0 -6px currentColor, -6px -6px 0 -6px currentColor, 6px -6px 0 -6px currentColor, -6px 6px 0 -6px currentColor;
}

body.dark-mode .theme-toggle::before {
  box-shadow: none;
}

.theme-toggle::after {
  content: "";
  display: none;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 2px;
  width: 42px;
  min-height: 26px;
  padding: 3px;
  margin-top: 0;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--soft-panel);
  color: var(--subtext-color);
  font-family: inherit;
  font-size: 0.55rem;
  font-weight: 700;
  cursor: pointer;
}

.language-option {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  width: auto;
  height: 16px;
  border-radius: 5px;
}

.language-option.is-active {
  background: var(--accent);
  color: white;
}

.language-toggle.is-japanese .language-option:first-child,
.language-toggle:not(.is-japanese) .language-option:last-child {
  background: transparent;
  color: var(--subtext-color);
}

.language-toggle.is-japanese .language-option:last-child {
  background: var(--accent);
  color: white;
}

body.dark-mode .theme-toggle::after {
  display: block;
  position: absolute;
  top: calc(50% - 9px);
  left: calc(50% - 11px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--toggle-background);
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero {
  padding: 28px 26px 22px;
  border-radius: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-deep);
}

.intro-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: -6px;
}

.intro-heading h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--heading-color);
}

.fish-buddy {
  width: 42px;
  height: auto;
  animation: fish-bob 3s ease-in-out infinite;
}

.hero-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--subtext-color);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.primary-action, .secondary-action, .social-link, .project-card a, .site-footer a {
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 0;
  border: 1px solid var(--card-border);
  text-decoration: none;
  font-weight: 700;
}

.primary-action {
  background: var(--accent);
  color: white;
}

.secondary-action {
  background: rgba(255,255,255,0.15);
  color: var(--heading-color);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 0;
  background: rgba(255,255,255,0.12);
  color: var(--subtext-color);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.spotlight-shell {
  display: grid;
}

.spotlight-card {
  padding: 18px 20px;
}

.spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fun-fact-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fun-fact-label {
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.fun-fact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.14);
  border: 1px solid var(--card-border);
  border-radius: 0;
  color: var(--heading-color);
  cursor: pointer;
  text-align: center;
  max-width: min(100%, 500px);
  font-weight: 600;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px 18px;
  border-radius: 0;
  box-shadow: none !important;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-tag,
.project-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-tag {
  color: var(--accent-deep);
}

.project-card h2 {
  margin: 0;
  color: var(--heading-color);
  font-size: 1.2rem;
}

.project-card p {
  margin: 0;
  color: var(--subtext-color);
  line-height: 1.7;
}

.project-card a {
  margin-top: auto;
  text-decoration: none;
  color: var(--accent-deep);
  font-weight: 700;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 18px 22px;
  border-radius: 0;
  color: var(--subtext-color);
  box-shadow: none !important;
}

.site-footer a {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 700;
}

.about-page, .projects-page {
  gap: 18px;
}

.about-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: 26px;
  border-radius: 0;
  box-shadow: none !important;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.about-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--heading-color);
}

.about-copy p {
  margin: 0;
  color: var(--subtext-color);
  line-height: 1.8;
}

.profile-photo {
  width: 100%;
  max-width: 250px;
  border-radius: 0;
  margin: 0 auto;
  border: 1px solid var(--card-border);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  padding: 20px 18px;
  border-radius: 0;
  box-shadow: none !important;
}

.skills-card {
  grid-column: 1 / -1;
}

.info-card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--heading-color);
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--subtext-color);
  line-height: 1.8;
}

.info-card .interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 0;
  list-style: none;
  line-height: 1.2;
}

.interest-tag {
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  background: var(--soft-panel);
  color: var(--heading-color);
  font-size: 0.76rem;
  font-weight: 700;
}

.info-card .skills-list,
.info-card .interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 0;
  list-style: none;
  line-height: 1.2;
}

.skill-item,
.interest-item {
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--soft-panel);
  color: var(--heading-color);
  font-size: 0.76rem;
  font-weight: 700;
}

.skill-category {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.76rem;
  font-weight: 700;
}

.course-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 80px;
  opacity: 1;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.course-item.is-hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.course-item.is-open {
  max-height: 180px;
}

.course-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  min-height: 30px;
  max-width: 120px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--soft-panel);
  border: 1px solid var(--card-border);
  color: var(--heading-color);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  transition: max-width 0.28s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  z-index: 0;
}

.course-pill::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(79, 110, 247, 0.10);
  transition: width 0.25s ease;
  z-index: -1;
}

.course-code,
.course-name {
  display: inline-block;
  white-space: nowrap;
  font-size: inherit;
}

.course-code {
  opacity: 1;
  transition: opacity 0.2s ease, max-width 0.28s ease, margin-right 0.28s ease;
  max-width: 100px;
  overflow: hidden;
}

.course-name {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0;
  transition: max-width 0.28s ease, opacity 0.2s ease, margin-left 0.28s ease;
}

.course-pill.is-open {
  width: 100%;
  max-width: none;
  min-height: 42px;
  padding: 8px 12px;
  transform: translateY(-1px);
  border-color: rgba(79, 110, 247, 0.3);
  white-space: normal;
  line-height: 1.3;
}

.course-pill.is-open::before {
  width: 100%;
}

.course-pill.is-open .course-code {
  max-width: 100px;
  opacity: 1;
  margin-right: 8px;
  flex: 0 0 auto;
}

.course-pill.is-open .course-name {
  max-width: calc(100% - 108px);
  opacity: 1;
  margin-left: 0;
  white-space: normal;
  flex: 1 1 auto;
}

.course-summary {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--subtext-color);
  font-size: 0.78rem;
  line-height: 1.5;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding-top 0.2s ease;
}

.course-item.is-open .course-summary {
  max-height: 100px;
  opacity: 1;
  padding: 4px 12px 2px;
}

.page-intro {
  padding: 18px 0 0;
}

.page-intro h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--heading-color);
}

.project-detail-title {
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  line-height: 1.05;
  margin-bottom: 15px;
  margin-left: -5px;
}

.project-detail-card {
  padding: 28px 26px 26px;
}

.project-detail-card,
.spotlight-card,
.hero {
  border-radius: 0 !important;
  box-shadow: none !important;
}

a,
button,
.fun-fact {
  border-radius: 8px !important;
}

.project-detail-subtitle {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--heading-color);
}

.project-meta-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.project-role {
  margin: 0;
  font-weight: 700;
  color: var(--heading-color);
}

.blob {
  display: none !important;
}

@media (max-width: 860px) {
  .page-shell {
    margin-top: 10px;
  }

  .work-grid,
  .about-hero,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    margin-bottom: 18px;
  }

  .brand {
    flex-basis: 100%;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .site-nav {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 2px;
  }

  .site-nav a,
  .site-nav button {
    min-height: 32px;
    padding: 6px 5px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 980px) {
  .page-shell {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .site-header {
    position: sticky;
    top: 24px;
    min-height: calc(100vh - 48px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 14px 4px;
    margin-bottom: 0;
  }

  .brand {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .brand span {
    font-size: 0.66rem;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 14px;
  }

  .site-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    font-size: 0.56rem;
    text-align: center;
  }

  .nav-heart + span {
    margin-top: 4px;
  }

  .theme-toggle {
    min-width: 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    margin-top: auto;
    align-self: center;
  }

  .language-toggle {
    margin-top: 8px;
  }

  .site-footer {
    grid-column: 2;
  }
}

