:root {
  color-scheme: light dark;
  --background: #f7f6fb;
  --surface: #fff;
  --text: #262331;
  --muted: #6d687e;
  --accent: #6d4aff;
  --accent-soft: #eee9ff;
  --line: #e7e3ef;
  --success: #227047;
  --success-soft: #eaf6ee;
  --thumbnail: #f4f1fc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 6px; }
main:focus { outline: none; }
.container { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 21px; letter-spacing: -.6px; }
.brand img { border-radius: 50%; flex-shrink: 0; }
.language-nav { display: flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.language-nav a { padding: 7px 10px; color: var(--muted); border-radius: 20px; }
.language-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.language-nav a:hover, .site-footer a:hover { color: var(--accent); }
main { flex: 1; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 48px; padding: 72px 40px 88px; }
.hero-copy { max-width: 570px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: 1.5px; margin-bottom: 12px; }
.hero h1 { font-size: clamp(40px, 6vw, 60px); letter-spacing: -2px; line-height: 1.2; margin-bottom: 22px; }
.intro { color: var(--muted); font-size: 19px; max-width: 460px; }
.social-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 26px; font-size: 14px; font-weight: 600; }
.social-link:hover { color: var(--accent); }
.hero-avatar { width: 240px; height: 240px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 12px 40px #26233112; }
.projects { padding-bottom: 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading .eyebrow { font-size: 10px; margin-bottom: 4px; }
.section-heading h2 { font-size: 28px; letter-spacing: -1px; }
.section-heading > p { color: var(--muted); font-size: 14px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { min-width: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
a.project-card { display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s; }
a.project-card:hover { border-color: var(--accent); box-shadow: 0 8px 28px #6d4aff12; }
.thumbnail { height: 200px; display: grid; place-items: center; background: var(--thumbnail); border-radius: 23px 23px 0 0; overflow: hidden; }
.thumbnail img { width: 120px; height: 120px; object-fit: contain; }
.thumbnail:hover img { animation: wiggle .6s ease-in-out; }
.card-body { padding: 26px; }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-heading h3 { font-size: 21px; letter-spacing: -.5px; line-height: 1.5; }
.status { flex-shrink: 0; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 4px 9px; background: var(--accent-soft); color: var(--accent); }
.status-live { color: var(--success); background: var(--success-soft); }
.status-soon { color: var(--muted); background: var(--background); }
.card-body > p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 22px 0 0; }
.tags li { font-size: 12px; color: var(--muted); background: var(--background); border-radius: 7px; padding: 3px 9px; }
.project-card.is-soon { opacity: .65; }
.placeholder-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 28px; min-height: 340px; background: transparent; border-style: dashed; }
.placeholder-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-size: 30px; font-weight: 300; margin-bottom: 22px; }
.placeholder-card h3 { font-size: 19px; margin-bottom: 10px; letter-spacing: -.5px; }
.placeholder-card p { color: var(--muted); font-size: 14px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer small { font-size: inherit; }
.site-footer nav { display: flex; gap: 24px; }
.text-page { max-width: 700px; padding: 64px 0 100px; margin-inline: auto; }
.text-page h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -1px; line-height: 1.35; margin-bottom: 24px; }
.text-page h2 { font-size: 21px; margin-block: 36px 12px; }
.text-page p { color: var(--muted); }
.text-page .text-lead { font-size: 19px; }
.back-link { display: inline-block; color: var(--accent); font-weight: 650; margin-top: 36px; }
.error-page .error-code { color: var(--accent); font-size: 72px; font-weight: 800; margin-bottom: 16px; }
.error-translation { border-top: 1px solid var(--line); margin-top: 40px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 8px; left: 16px; transform: translateY(-200%); background: var(--surface); color: var(--accent); padding: 10px 16px; z-index: 1; }
.skip-link:focus { transform: translateY(0); }

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25%, 75% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}

@media (max-width: 700px) {
  .container { width: calc(100% - 40px); }
  .site-header { padding-block: 18px; }
  .brand { font-size: 18px; gap: 8px; }
  .language-nav { gap: 0; font-size: 12px; }
  .language-nav a { padding: 7px; }
  .hero { flex-direction: column-reverse; gap: 28px; text-align: center; padding: 40px 0 56px; }
  .hero-avatar { width: 176px; height: 176px; }
  .hero h1 { margin-bottom: 18px; }
  .intro { font-size: 17px; max-width: 340px; margin-inline: auto; }
  .social-link { margin-top: 22px; }
  .section-heading { display: block; margin-bottom: 22px; }
  .section-heading > p { margin-top: 8px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .card-body { padding: 24px; }
  .placeholder-card { min-height: 260px; }
  .projects { padding-bottom: 56px; }
  .site-footer { flex-wrap: wrap; gap: 10px; padding-block: 24px; }
  .text-page { padding-block: 44px 72px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #17151e;
    --surface: #221f2c;
    --text: #f2eefb;
    --muted: #b5aec6;
    --accent: #b49dff;
    --accent-soft: #33274f;
    --line: #393242;
    --success: #9bddb2;
    --success-soft: #24392e;
    --thumbnail: #2a2438;
  }
}

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