:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FBF3E6;
  --surface: #FBF3E6;
  --ink: #1F2430;
  --muted: #5B6070;
  --line: #dcdacf;
  --accent: #E0552F;
  --card: #fffaf2;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14213D;
  --surface: #14213D;
  --ink: #FBF3E6;
  --muted: #AEB6C8;
  --line: #3D4A67;
  --accent: #E0552F;
  --card: #1c2b4b;
}

:root[data-theme="autumn"] {
  color-scheme: light;
  --bg: #f3e8d7;
  --surface: #fff7e9;
  --ink: #3c291e;
  --muted: #80634e;
  --line: #d8bea0;
  --accent: #E0552F;
  --card: #fff7e9;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color .2s, color .2s;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner {
  max-width: 960px;
  min-height: 92px;
  margin: auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand { display: block; }
.logo-variant {
  display: block;
  width: min(270px, calc(100vw - 48px));
  aspect-ratio: 460 / 130;
}
.logo-variant svg { display: block; width: 100%; height: 100%; }
.logo-variant img { display: block; width: 100%; height: 100%; }
:root[data-theme="dark"] .logo-light,
:root:not([data-theme="dark"]) .logo-dark { display: none; }

.theme-picker {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.theme-picker button {
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 12px/1 system-ui, sans-serif;
  cursor: pointer;
}

.theme-picker button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 0 2px 0 var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.content { max-width: 960px; margin: auto; padding: clamp(48px, 6vw, 72px) 24px 80px; }

.projects-header {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.projects-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.055em;
}

.projects-count { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.project-list { display: grid; gap: 16px; padding-top: 26px; }

.project-link {
  position: relative;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(14, 23, 30, .05);
  transition: transform .2s, border-color .2s, box-shadow .2s, background-color .2s;
}

.project-link::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.project-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(14, 23, 30, .12);
}

.project-image { display: block; width: 136px; height: 136px; object-fit: cover; border-radius: 10px; }
.project-details { display: block; min-width: 0; }
.project-title { display: block; font-size: clamp(20px, 2.1vw, 24px); line-height: 1.18; letter-spacing: -.03em; }
.project-description { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.project-arrow { color: var(--accent); font-size: 26px; line-height: 1; transition: transform .2s; }
.project-link:hover .project-arrow { transform: translate(2px, -2px); }

@media (max-width: 640px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-top: 12px; padding-bottom: 14px; }
  .content { padding-top: 48px; }
  .project-link { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .project-image { width: 96px; height: 96px; }
  .project-title { font-size: 18px; }
  .project-description { margin-top: 6px; font-size: 13px; }
  .project-arrow { display: none; }
}

@media (max-width: 380px) {
  .project-link { grid-template-columns: 80px minmax(0, 1fr); }
  .project-image { width: 80px; height: 80px; }
  .project-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
