:root {
  --bg: #000;
  --paper: #0b0b0b;
  --paper-soft: #121212;
  --ink: #f6f6f6;
  --muted: #a7a7a7;
  --line: #262626;
  --accent: #f4b824;
  --accent-soft: rgba(244, 184, 36, 0.14);
  --danger: #ff8585;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Inter", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #ffd25a;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1280px, calc(100% - 44px));
  min-height: 88px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
}

.language-toggle,
.primary-button,
.ghost-button,
.icon-button,
.text-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.language-toggle {
  min-width: 136px;
  min-height: 44px;
  background: transparent;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(18px, 2.4vw, 42px);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  border-bottom: 3px solid transparent;
  color: #f2f2f2;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  padding: 35px 0 27px;
}

.nav a:hover,
.nav a.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.hero-section,
.section {
  background: #000;
}

.hero-section {
  min-height: calc(100vh - 88px);
  padding: 54px 0 78px;
}

.hero-inner {
  width: min(1280px, calc(100% - 44px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(0, 1fr);
  gap: clamp(46px, 7vw, 96px);
  align-items: center;
}

.portrait-frame {
  min-height: 680px;
  overflow: hidden;
  background: #111;
}

.portrait-photo {
  width: 100%;
  height: 100%;
  min-height: 680px;
  object-fit: cover;
  object-position: center top;
}

.hero-eyebrow,
.section-kicker,
.entry time,
.timeline-item time {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-copy-block h1 {
  margin-bottom: 30px;
  color: #fff;
  font-size: clamp(24px, 7vw, 52px);
  font-weight: 700;
  line-height: 1;
}

.hero-role,
.hero-affiliation {
  margin-bottom: 6px;
  color: #fff;
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.35;
}

.hero-affiliation {
  margin-bottom: 38px;
}

.profile-list {
  display: grid;
  gap: 18px;
  margin: 0 0 42px;
  padding: 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
}

.profile-list dt {
  color: #fff;
  font-size: 19px;
  font-weight: 900;
}

.profile-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.hero-summary {
  max-width: 780px;
  margin-bottom: 34px;
  color: #a8a8a8;
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.editor-actions,
.calendar-toolbar,
.task-panel-head,
.task-main,
.task-actions {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.primary-link,
.secondary-link,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 800;
  line-height: 1.2;
}

.primary-link,
.primary-button {
  background: var(--accent);
  color: #000;
}

.primary-link:hover,
.primary-button:hover {
  background: #ffd25a;
  color: #000;
}

.secondary-link,
.ghost-button {
  border: 1px solid var(--line);
  background: #111;
  color: #f5f5f5;
}

.section {
  padding: 86px 0;
}

.section > * {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.section-heading {
  position: relative;
  margin-bottom: 42px;
  text-align: center;
}

.section-heading::before {
  position: absolute;
  top: -38px;
  left: 50%;
  z-index: 0;
  color: rgba(255, 255, 255, 0.06);
  content: attr(data-bg);
  font-size: 84px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.section-heading > * {
  position: relative;
  z-index: 1;
}

.section-heading h2 {
  margin-bottom: 0;
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.25;
}

.timeline,
.entry-list,
.card-grid,
.link-grid,
.content-grid,
.gallery-grid,
.planner {
  display: grid;
  gap: 24px;
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-item,
.entry,
.project-card,
.resource-link,
.content-card,
.calendar-card,
.task-panel,
.gallery-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
}

.timeline-item h3,
.entry h3,
.project-card h3 {
  margin-bottom: 6px;
  color: #f5f5f5;
  font-size: 19px;
  line-height: 1.35;
}

.timeline-item p,
.entry p,
.project-card p,
.resource-link span {
  margin-bottom: 0;
  color: var(--muted);
}

.meta {
  margin-bottom: 8px;
  color: #d9d9d9;
  font-weight: 800;
}

.calendar-card,
.task-panel {
  padding: 28px;
}

.calendar-toolbar {
  justify-content: space-between;
  margin-bottom: 20px;
}

.calendar-title {
  color: #fff;
  font-size: 18px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.weekday-row {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-grid button {
  position: relative;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #080808;
  color: #f2f2f2;
  cursor: pointer;
  font: inherit;
}

.calendar-grid button:hover,
.calendar-grid .is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.calendar-grid .is-today {
  font-weight: 900;
}

.calendar-grid .has-record::after {
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transform: translateX(-50%);
}

.task-panel-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.selected-date {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.plan-source {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.editor-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.file-button input {
  display: none;
}

.template-hint {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #080808;
  padding: 14px 16px;
}

.template-hint code {
  color: var(--accent);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
}

.task-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.empty-state.warning {
  color: var(--danger);
}

.task-item {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  background: #080808;
}

.task-item.is-complete {
  background: #0d120c;
}

.task-item.is-active {
  border-color: rgba(244, 184, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(244, 184, 36, 0.1);
}

.task-main {
  justify-content: space-between;
  gap: 12px;
}

.task-copy {
  min-width: 0;
}

.task-copy h3 {
  margin-bottom: 8px;
  color: #f5f5f5;
  font-size: 18px;
  line-height: 1.45;
}

.task-copy p {
  margin: 8px 0 0;
  color: var(--muted);
}

.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-meta span {
  border-radius: 999px;
  background: var(--accent-soft);
  color: #e6e6e6;
  font-size: 13px;
  padding: 3px 9px;
}

.task-meta b {
  margin-right: 5px;
  color: var(--accent);
}

.task-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.is-complete .task-copy h3 {
  color: #7b8491;
  text-decoration: line-through;
}

.text-button {
  flex: 0 0 auto;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.archive-panel {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.archive-panel h3 {
  margin-bottom: 12px;
  color: #f5f5f5;
  font-size: 18px;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-item {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
}

.archive-item span {
  color: var(--muted);
  white-space: nowrap;
}

.entry {
  padding: 24px;
}

.compact {
  gap: 16px;
}

.resource-link {
  display: grid;
  gap: 10px;
  padding: 24px;
  color: var(--ink);
}

.content-card {
  display: grid;
  overflow: hidden;
  color: var(--ink);
}

.content-card:hover {
  border-color: rgba(244, 184, 36, 0.55);
  background: #101010;
}

.content-card-body {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.content-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.content-card time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-card strong {
  color: #f5f5f5;
  font-size: 18px;
  line-height: 1.35;
}

.content-card span:not(.resource-type) {
  color: var(--muted);
}

.content-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.span-full {
  grid-column: 1 / -1;
}

.span-half {
  min-width: 0;
}

.resource-type {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1;
  padding: 6px 10px;
  text-transform: uppercase;
}

.resource-link strong {
  color: #f5f5f5;
  font-size: 18px;
}

.resource-link:hover {
  border-color: rgba(244, 184, 36, 0.55);
  background: #101010;
}

.resource-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.resource-items li {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d8d8d8;
  font-size: 13px;
  line-height: 1;
  padding: 7px 10px;
}

.resource-video {
  border-left: 4px solid #f4b824;
}

.resource-pdf {
  border-left: 4px solid #c96dfd;
}

.resource-bundle {
  border-left: 4px solid #5cc8ff;
}

.resource-image {
  border-left: 4px solid #7ee787;
}

.resource-paper {
  border-left: 4px solid #ff8f70;
}

.resource-book {
  border-left: 4px solid #b7f277;
}

.resource-link {
  border-left: 4px solid #8da2fb;
}

.project-card {
  min-height: 210px;
  padding: 28px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tag-row span {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
}

.gallery-item {
  overflow: hidden;
  margin: 0;
}

.gallery-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.gallery-full {
  grid-column: 1 / -1;
}

.gallery-half {
  grid-column: span 3;
}

.gallery-third {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  display: flex;
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
  gap: 14px;
  justify-content: space-between;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #000;
}

@media (max-width: 1080px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav a {
    padding: 14px 0 16px;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-full,
  .span-half,
  .gallery-half,
  .gallery-third {
    grid-column: auto;
  }

  .gallery-full {
    grid-column: 1 / -1;
  }

  .portrait-frame,
  .portrait-photo {
    min-height: 460px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 124px;
  }

  .section > *,
  .site-footer,
  .header-inner,
  .hero-inner {
    width: min(100% - 28px, var(--container));
  }

  .hero-section {
    padding: 38px 0 56px;
  }

  .language-toggle {
    min-width: 100px;
    min-height: 34px;
    font-size: 22px;
  }

  .nav {
    gap: 20px;
  }

  .nav a {
    font-size: 15px;
  }

  .hero-copy-block h1 {
    font-size: 46px;
  }

  .hero-role,
  .hero-affiliation {
    font-size: 20px;
  }

  .hero-summary {
    font-size: 17px;
  }

  .section {
    padding: 62px 0;
  }

  .section-heading::before {
    top: -22px;
    font-size: 46px;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .timeline-item,
  .profile-list div {
    grid-template-columns: 1fr;
  }

  .profile-list div {
    gap: 2px;
  }

  .profile-list dt,
  .profile-list dd {
    font-size: 16px;
  }

  .task-panel-head,
  .task-main,
  .task-actions,
  .archive-item,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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