@font-face {
  font-family: 'Luma Sans';
  src: url('/assets/lumaflow-sans.woff2') format('woff2');
  font-display: swap;
  font-style: normal;
  font-weight: 400 800;
}

:root {
  color-scheme: light;
  --paper: #f5f7fb;
  --surface: #fff;
  --mist: #e9eff8;
  --header: rgb(245 247 251 / 90%);
  --ink: #142238;
  --muted: #52627a;
  --accent: #294f7f;
  --outline: #dbe3ef;
  --focus: #426fae;
  --frame: #f7faff;
  --frame-line: #cad8e9;
  --visual-top: #e4ecf8;
  --visual-bottom: #bfcfe5;
  --measure: 1160px;
  font-family: 'Luma Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  scroll-padding-top: 92px;
  scroll-behavior: smooth;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #101827;
  --surface: #172235;
  --mist: #202f46;
  --header: rgb(16 24 39 / 91%);
  --ink: #f0f5ff;
  --muted: #b7c5da;
  --accent: #accdfa;
  --outline: #30425d;
  --focus: #a0c7fb;
  --frame: #18243a;
  --frame-line: #405777;
  --visual-top: #314966;
  --visual-bottom: #202f4c;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
}

body, .site-header, .project-card, .note, .learning-section {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.shell {
  width: min(var(--measure), calc(100% - 72px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 16px;
  padding: 9px 15px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  background: var(--header);
  border-bottom: 1px solid var(--outline);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 10px;
  background: linear-gradient(145deg, #4a6790, #1b3153 70%);
}

.brand-mark i {
  width: 16px;
  height: 11px;
  border-radius: 60% 40% 65% 35%;
  border: solid #d0e7ff;
  border-width: 2px 0;
  transform: rotate(-24deg);
}

.brand-name { display: flex; align-items: baseline; gap: 7px; font-size: 16px; font-weight: 750; white-space: nowrap; }
.brand-name span { color: var(--muted); font-size: 12px; font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  padding: 7px 13px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current='location'] { background: var(--mist); color: var(--ink); }

.theme-button {
  justify-self: end;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.theme-button:hover { background: var(--mist); }
.theme-icon { font: 20px/1 system-ui, sans-serif; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(420px, 48vw, 560px);
  overflow: hidden;
  margin-top: 24px;
  border-radius: 26px;
  color: #fff;
  background: #263a54;
  text-align: center;
}

.hero-media, .hero-media img, .hero::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-media { z-index: -2; }
.hero-media img { object-fit: cover; object-position: 50% 52%; }
.hero::before {
  z-index: -1;
  content: '';
  background:
    radial-gradient(ellipse at center, rgb(13 25 44 / 32%), transparent 74%),
    linear-gradient(180deg, rgb(17 29 48 / 16%), rgb(12 24 43 / 46%) 63%, rgb(12 24 43 / 42%));
}

.hero-content { max-width: 758px; padding: 30px; }
.hero h1 {
  margin: 0;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -.052em;
  text-shadow: 0 5px 32px rgb(10 22 42 / 32%);
}
.hero p {
  margin: 20px auto 0;
  max-width: 32em;
  color: #f3f7ff;
  font-size: clamp(15px, 2.1vw, 19px);
  text-wrap: balance;
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; margin-top: 29px; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 650;
  transition: background 160ms ease, transform 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible { outline-color: #fff; }
.button-primary { color: #152743; background: #f5f9ff; }
.button-primary:hover { background: #e0edff; }
.button-glass {
  border-color: rgb(242 248 255 / 57%);
  background: rgb(219 236 255 / 14%);
  color: white;
  backdrop-filter: blur(10px);
}
.button-glass:hover { background: rgb(219 236 255 / 24%); }

.content-section { margin-top: 72px; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-header h2, .learning-intro h2 { margin: 0; font-size: clamp(28px, 4vw, 41px); line-height: 1.2; letter-spacing: -.047em; font-weight: 750; }
.section-header p, .learning-intro p { margin: 0; color: var(--muted); font-size: 15px; }

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: 20px;
  background: var(--surface);
}
.project-visual {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px);
  background:
    radial-gradient(ellipse at 15% 12%, rgb(255 255 255 / 22%), transparent 65%),
    linear-gradient(145deg, var(--visual-top), var(--visual-bottom));
  min-height: 290px;
}
.project-preview {
  width: min(100%, 405px);
  overflow: hidden;
  border: 1px solid var(--frame-line);
  border-radius: 13px;
  background: var(--frame);
  box-shadow: 0 20px 32px rgb(17 37 74 / 18%);
  transform: rotate(-4deg);
}
.project-preview-bar { display: flex; padding: 10px 12px; gap: 4px; }
.project-preview-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--frame-line); }
.project-preview-image {
  height: clamp(100px, 15vw, 165px);
  margin-inline: 10px;
  border-radius: 7px;
  background: #263a54 url('/assets/lumaflow-lake-preview.webp') center 49% / cover no-repeat;
}
.project-preview-lines { display: grid; gap: 7px; padding: 13px 12px 17px; }
.project-preview-lines i { height: 5px; width: 62%; border-radius: 3px; background: var(--frame-line); }
.project-preview-lines i + i { width: 38%; }

.project-body { align-self: center; padding: clamp(24px, 4vw, 52px); }
.project-category, .note-topic { color: var(--accent); font-size: 13px; font-weight: 650; }
.project-body h3 { margin: 7px 0 11px; font-size: clamp(22px, 3vw, 35px); line-height: 1.25; font-weight: 760; letter-spacing: -.04em; }
.project-body p { margin: 0; color: var(--muted); font-size: 15px; }
.text-link { display: inline-flex; gap: 8px; align-items: baseline; margin-top: 20px; color: var(--accent); font-size: 14px; font-weight: 700; }
.text-link:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.note-list { display: grid; gap: 8px; }
.note { background: var(--surface); border: 1px solid var(--outline); border-radius: 13px; }
.note summary {
  display: grid;
  min-height: 70px;
  grid-template-columns: 64px 1fr 24px;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: inherit;
  cursor: pointer;
  list-style: none;
}
.note summary::-webkit-details-marker { display: none; }
.note summary:hover { background: var(--mist); }
.note-title { font-size: clamp(15px, 2.5vw, 17px); font-weight: 675; }
.note-action { position: relative; justify-self: end; width: 16px; height: 16px; color: var(--accent); }
.note-action::before, .note-action::after { position: absolute; top: 7px; left: 2px; width: 12px; height: 1.5px; background: currentcolor; content: ''; }
.note-action::after { transform: rotate(90deg); }
.note[open] .note-action::after { display: none; }
.note[open] summary { border-radius: 12px 12px 0 0; }
.note-body { padding: 0 24px 19px 98px; max-width: 850px; color: var(--muted); font-size: 15px; }
.note-body p { margin: 0 0 10px; }
.note-body p:last-child { margin-bottom: 0; }

.learning-section {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 40px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--outline);
  border-radius: 20px;
  background: var(--mist);
}
.learning-intro p { margin-top: 13px; max-width: 24em; }
.learning-list { margin: 0; padding-left: 24px; }
.learning-list li { padding: 10px 0 10px 6px; color: var(--muted); }
.learning-list li:first-child { padding-top: 0; }
.learning-list li:last-child { padding-bottom: 0; }
.learning-list li + li { border-top: 1px solid var(--outline); }
.learning-list li::marker { color: var(--accent); font-weight: 750; }
.learning-list strong { display: block; color: var(--ink); font-size: 16px; }
.learning-list span { display: block; margin-top: 2px; font-size: 14px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--outline);
  margin-top: 68px;
  padding-block: 24px 34px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .project-card { grid-template-columns: minmax(0, 1fr) minmax(0, .94fr); }
  .project-visual { min-height: 235px; }
  .content-section { margin-top: 52px; }
}

@media (max-width: 600px) {
  :root { scroll-padding-top: 116px; }
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: auto; grid-template-columns: 1fr auto; gap: 0 12px; padding-top: 10px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 0; padding: 5px 0 9px; }
  .site-nav a { text-align: center; flex: 1; padding-inline: 4px; font-size: 13px; }
  .theme-button { grid-column: 2; grid-row: 1; width: 37px; height: 37px; }
  .hero { margin-top: 15px; min-height: 445px; border-radius: 20px; }
  .hero-content { padding: 22px 16px; }
  .hero-media img { object-position: 50% 50%; }
  .hero h1 { font-size: clamp(43px, 11vw, 60px); }
  .hero p { margin-top: 15px; max-width: 20em; }
  .hero-actions { margin-top: 23px; }
  .button { font-size: 13px; }
  .section-header { display: block; margin-bottom: 17px; }
  .section-header p { margin-top: 7px; font-size: 14px; }
  .project-card, .learning-section { grid-template-columns: minmax(0, 1fr); }
  .project-visual { min-height: 207px; }
  .project-body { padding: 23px; }
  .note summary { grid-template-columns: 34px 1fr 17px; gap: 8px; padding: 12px; min-height: 62px; }
  .note-topic { font-size: 12px; }
  .note-body { padding: 4px 15px 18px; }
  .learning-section { gap: 22px; }
  .site-footer { margin-top: 43px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
