@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #fff;
  --text: #20232a;
  --muted: #737b88;
  --accent: #0878ed;
  --border: #e8ebf0;
  --shadow: 0 12px 32px rgba(25, 40, 65, .07);
}
body.dark {
  color-scheme: dark;
  --bg: #11151b;
  --surface: #1a2029;
  --text: #eff3f8;
  --muted: #a1adbd;
  --accent: #66adff;
  --border: #2b3542;
  --shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 'Poppins', sans-serif;
  transition: background .25s, color .25s;
}
a { color: inherit; }
.container { width: min(100% - 40px, 980px); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding-block: 24px; }
.brand { text-decoration: none; font-size: 1.3rem; font-weight: 700; letter-spacing: -.06em; }
.brand span { color: var(--accent); }
.toggle-btn {
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  padding: .55rem 1rem; font: inherit; font-size: .83rem; cursor: pointer;
}
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.intro { padding: clamp(38px, 8vw, 86px) 0 52px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .74rem; font-weight: 600; letter-spacing: .13em; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.2; letter-spacing: -.055em; }
.intro-copy { max-width: 560px; margin: 14px 0 0; color: var(--muted); font-size: 1.05rem; }
.section-heading { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.section-rule { height: 1px; flex: 1; background: var(--border); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(25, 40, 65, .12); }
.project-link { display: block; height: 100%; text-decoration: none; }
.project-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #eaf2fb; }
.project-card-body { padding: 20px 22px 22px; }
.project-date { color: var(--muted); font-size: .78rem; }
.project-card h3 { margin: 6px 0 8px; font-size: 1.13rem; line-height: 1.4; }
.project-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.read-more { display: inline-block; margin-top: 16px; color: var(--accent); font-size: .85rem; font-weight: 500; }
.loading { grid-column: 1 / -1; padding: 24px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); text-align: center; }
.error-message { color: #b42318; }
.footer { margin-top: auto; padding-block: 54px 22px; color: var(--muted); font-size: .8rem; }
.footer p { margin: 0; border-top: 1px solid var(--border); padding-top: 18px; }
.detail-main { padding-top: 38px; }
.back-link { color: var(--accent); font-size: .88rem; text-decoration: none; }
.detail-header { max-width: 760px; padding: 34px 0 24px; }
.detail-header h1 { margin-top: 8px; }
.detail-description { color: var(--muted); font-size: 1.05rem; }
.detail-content { max-width: 760px; }
.detail-content p { margin: 0 0 18px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: 10px 13px; color: var(--muted); font-size: .8rem; }
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 980px); }
  .intro { padding: 42px 0 38px; }
  .project-grid { grid-template-columns: 1fr; gap: 17px; }
  .project-card-body { padding: 17px 18px 19px; }
  .gallery { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
