/* CEEN personal homepage + light project pages — clean / minimal */

:root {
  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #e6e9ef;
  --text: #1a1d24;
  --text-muted: #5c6570;
  --accent: #2a9d8f;
  --accent-soft: #e6f5f3;
  --accent-border: rgba(42, 157, 143, 0.28);
  --ink: #2c333d;
  --sans: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Consolas", "Liberation Mono",
    "Menlo", "Courier New", monospace;
  --radius: 10px;
  --max: 920px;
  --header-h: 60px;
  --shadow: 0 1px 2px rgba(26, 29, 36, 0.04), 0 8px 24px rgba(26, 29, 36, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(247, 248, 250, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.25rem;
}

.hero-inner {
  position: relative;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.hero h1,
.page-title {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--ink);
}

.lead {
  font-size: 1.15rem;
  max-width: 36rem;
  margin: 0 0 0.85rem;
  color: var(--text);
}

.sublead {
  max-width: 38rem;
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.sublead strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(42, 157, 143, 0.22);
}

.btn-primary:hover {
  background: #238a7e;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* About */
.about-strip {
  padding: 0 0 2rem;
}

.about-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.about-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  font-weight: 700;
  flex-shrink: 0;
}

.about-text {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.about-text strong {
  color: var(--ink);
  font-weight: 700;
}

/* Sections */
.section {
  padding: 2.75rem 0 3.5rem;
}

.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.45rem;
  color: var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 36rem;
}

/* Project cards (home) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.4rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.project-card h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.project-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  flex: 1;
}

.project-card-live:hover {
  border-color: var(--accent-border);
  box-shadow: 0 4px 20px rgba(42, 157, 143, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.project-card-live:hover h3 {
  color: var(--accent);
}

.project-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.4rem;
}

.card-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.15rem;
  font-weight: 700;
}

.card-progress {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #5b6b7c;
}


/* Light project detail cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.card > p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.detail-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text);
  font-size: 0.95rem;
}

.detail-list li + li {
  margin-top: 0.45rem;
}

.detail-list strong {
  color: var(--ink);
}

.disclaimer {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.disclaimer ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.disclaimer li + li {
  margin-top: 0.5rem;
}

.disclaimer strong {
  color: var(--ink);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.75rem;
  background: var(--bg);
}

.footer-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-meta {
  margin-top: 0.45rem !important;
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
}

.footer-meta a {
  color: var(--accent);
}


.footer-inner {
  text-align: center;
}

.footer-beian {
  margin-top: 0.85rem !important;
  font-size: 0.78rem !important;
  text-align: center;
  letter-spacing: 0.02em;
}

.footer-beian a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-beian a:hover,
.footer-beian a:focus {
  color: var(--accent);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 1.25rem;
  }

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

  .hero {
    padding: 3rem 0 2rem;
  }

  .about-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .project-card {
    transition: none;
  }
}

/* Project-page videos: keep native aspect ratio, never stretch */
.media-block {
  margin: 0;
  max-width: 52rem;
}

.media-block-aux {
  max-width: 40rem;
}

.media-block figcaption {
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.video-frame {
  width: 100%;
  margin: 0;
  background: #1a1d24;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}

.video-frame video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #1a1d24;
}

.video-frame-minimal video {
  aspect-ratio: 960 / 544;
}


.media-note {
  max-width: 52rem;
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.stills-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
  max-width: 52rem;
}

.stills-row figure {
  margin: 0;
}

.stills-row img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #1a1d24;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stills-row figcaption {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .stills-row {
    grid-template-columns: 1fr;
  }
}
