/* Work showcase uses the same brand tokens and radii as premium.css. */
:root,
:root[data-theme="dark"] {
  --ew-bg: #07090b;
  --ew-surface: #111418;
  --ew-surface-soft: #171b20;
  --ew-ink: #f7f8f8;
  --ew-copy: #abb2bd;
  --ew-line: rgba(255, 255, 255, 0.12);
  --ew-accent: #22c7e8;
  --ew-accent-soft: rgba(34, 199, 232, 0.1);
  --ew-radius: 18px;
  --page: var(--ew-bg);
  --surface: var(--ew-surface);
  --ink: var(--ew-ink);
  --muted: var(--ew-copy);
  --line: var(--ew-line);
  --accent: var(--ew-accent);
  --blue: var(--ew-accent);
  --tint: var(--ew-accent-soft);
  --shadow: none;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  --ew-bg: #f5f8f7;
  --ew-surface: #fff;
  --ew-surface-soft: #edf2f1;
  --ew-ink: #111c20;
  --ew-copy: #52636c;
  --ew-line: rgba(17, 28, 32, 0.14);
  --ew-accent: #0089a4;
  --ew-accent-soft: rgba(0, 137, 164, 0.07);
}

body { font-size: 15px; line-height: 1.6; }
.wrap { width: min(1180px, calc(100% - 48px)); }
.header-inner { width: min(1440px, calc(100% - 64px)); gap: 12px; }
.site-header { height: 78px; background: rgba(5, 8, 10, 0.94); backdrop-filter: blur(18px); }
[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.94); }
.brand { font-size: 18px; font-weight: 700; }
.brand img { width: 44px; height: 44px; }
.primary-nav { gap: 0; border: 1px solid var(--line); padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, 0.024); }
[data-theme="light"] .primary-nav { background: rgba(10, 24, 29, 0.024); }
.primary-nav a { font-size: 13px; padding: 11px 13px; border-radius: 9px; line-height: 1.4; font-weight: 600; }
.primary-nav .active, .primary-nav a:not(.project-cta):hover { background: rgba(255, 255, 255, 0.07); }
[data-theme="light"] .primary-nav .active, [data-theme="light"] .primary-nav a:not(.project-cta):hover { background: rgba(10, 24, 29, 0.07); }
.primary-nav .active:after { height: 2px; bottom: 5px; }
.primary-nav .project-cta { margin-left: 6px; background: #bcc6c9; color: #080d10; font-weight: 600; padding-inline: 19px; min-height: 40px; }
.primary-nav .project-cta:hover { background: #d2dadd; color: #080d10; }
[data-theme="light"] .primary-nav .project-cta { background: #344247; color: #fff; }
[data-theme="light"] .primary-nav .project-cta:hover { background: #1b2b30; }
.header-actions { gap: 10px; }
.icon-button { border-radius: 12px; width: 42px; height: 42px; }
.account { border-radius: 50%; border-color: transparent; }
.hero-inner { min-height: 440px; }
.hero-copy { width: 60%; padding-block: 48px 72px; }
h1 { font-size: 48px; font-weight: 700; line-height: 1.1; }
h2 { font-size: 30px; font-weight: 700; }
h1, h2, .project-card h3 { font-weight: var(--site-heading-weight, 700); }
h1 span { color: var(--accent); }
.eyebrow, .project-category { font-family: "JetBrains Mono", ui-monospace, monospace; }
.hero-copy .eyebrow span { background: var(--accent); }
.hero-copy .eyebrow > .eyebrow-text { width: auto; height: auto; border-radius: 0; background: none; }
.hero-description { font-size: 16px; }
.hero-description { white-space: pre-line; }
.hero-disciplines { font-size: 11px; font-weight: 500; }
.showcase-hero { background-color: #f4f5f5; }
[data-theme="dark"] .showcase-hero { background-color: #07090b; }
.hero-caption { border-radius: 8px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.button { border-radius: 12px; min-height: 48px; font-size: 13px; padding: 13px 20px; font-weight: 500; }
.primary, [data-theme="dark"] .primary { color: #080d10; background: #e4eaec; box-shadow: none; }
.primary:hover, [data-theme="dark"] .primary:hover { background: #fff; box-shadow: none; }
[data-theme="light"] .primary { color: #fff; background: #344247; }
[data-theme="light"] .primary:hover { background: #1b2b30; }
.secondary { background: transparent; }
.secondary:hover { background: var(--tint); }
.category-bar { border-radius: 18px; padding: 6px; box-shadow: none; }
.category-bar { grid-template-columns: repeat(var(--category-count, 8), minmax(110px, 1fr)); overflow-x: auto; }
.category { min-height: 68px; padding: 8px 4px; gap: 6px; font-size: 12px; line-height: 1.3; color: var(--muted); font-weight: 600; }
.category:not(:last-child) { border-right: 0; }
.category:not(:last-child)::before { content: ""; position: absolute; right: 0; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.category:first-child { border-radius: 12px 0 0 12px; }
.category:last-child { border-radius: 0 12px 12px 0; }
.category svg { width: 26px; height: 26px; color: var(--muted); }
.category.active, .category.active svg { color: var(--accent); }
.category.active:after { bottom: -6px; background: var(--accent); border-radius: 2px; }
.platform-logo { display: block; height: 26px; width: 38px; flex-shrink: 0; object-fit: contain; }
.platform-logo:not(img):not(.lvgl-logo) { mask-position: center; mask-repeat: no-repeat; mask-size: contain; }
.espressif-logo { mask-image: url('./assets/platforms/espressif-symbol.svg'); background: #e7352c; }
.st-logo { mask-image: url('./assets/platforms/stmicroelectronics.svg'); background: #c6d4ee; width: 45px; }
[data-theme="light"] .st-logo { background: #03234b; }
.raspberry-logo { mask-image: url('./assets/platforms/raspberrypi.svg'); background: #e33e6c; }
[data-theme="light"] .raspberry-logo { background: #c51a4a; }
.drone-logo { mask-image: url('./assets/platforms/drone.svg'); background: var(--ink); }
.lvgl-logo { width: 88px; padding: 3px 5px; border-radius: 5px; background: #fff; }
.lvgl-logo img { width: 100%; height: 100%; object-fit: contain; }
.projects-section { padding-top: 44px; }
.section-title { border-color: var(--accent); }
.section-title > p:last-child { font-size: 14px; }
.search-box { border-radius: 12px; }
.search-box input { font-size: 13px; }
.collection-toolbar { font-size: 12px; }
.sort-label select { font-size: 12px; }
.project-grid { gap: 18px; }
.project-card { border-radius: var(--ew-radius); background: var(--surface); box-shadow: none; }
.project-card:hover { border-color: var(--accent); box-shadow: none; transform: translateY(-3px); }
.project-image, [data-theme="dark"] .project-image { background: #080c0f; }
[data-theme="light"] .project-image { background: #f0f3f2; }
.image-placeholder { color: var(--muted); }
.project-content { padding: 25px; }
.project-card h3 { font-size: 20px; font-weight: 700; }
.project-category { font-size: 10px; line-height: 1.6; }
.project-description { font-size: 13px; line-height: 1.75; }
.project-tags { gap: 7px; }
.project-tags span { border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: transparent; padding: 4px 9px; font-size: 10px; }
.project-badge, [data-theme="dark"] .project-badge { top: auto; left: auto; bottom: 14px; right: 14px; border-radius: 999px; background: #071013e8; color: #38d3ef; border: 1px solid #22c7e859; padding: 4px 8px; font-size: 8px; }
[data-theme="light"] .project-badge { background: #fffef2; color: #006f85; border-color: #0089a455; }
.project-link { font-size: 13px; color: var(--accent); }
.empty-state, .error-state { border-radius: var(--ew-radius); }
.project-inquiry h2 { font-size: 28px; }
.project-inquiry p:last-child { font-size: 14px; }
.account img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.project-badge.personal { color: #f6bd66; border-color: #f6bd6659; }
[data-theme="light"] .project-badge.personal { color: #855512; border-color: #85551259; }
.project-link { margin-top: auto; }
.load-more-row { display: flex; justify-content: center; margin-top: 24px; }
.load-more-row:has([hidden]) { display: none; }
.footer { font-size: 12px; }
.footer { display: block; padding-block: 40px 24px; }
.footer > .work-footer-main { display: grid; grid-template-columns: 2fr 1fr 1.2fr 1fr; gap: 48px; }
.work-footer-main nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.work-footer-main h2 { font-size: 13px; margin-bottom: 10px; }
.work-footer-main nav a { display: inline-flex; align-items: center; gap: 6px; line-height: 1.7; }
.work-footer-main nav svg { width: 13px; height: 13px; }
.work-footer-brand > p { margin-block: 14px; max-width: 300px; font-size: 13px; line-height: 1.8; }
.work-footer-email { color: var(--accent); }
.footer > .work-footer-bottom { display: flex; flex-wrap: wrap; gap: 22px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 32px; font-size: 11px; }
.work-footer-bottom > span:nth-child(2) { margin-right: auto; }
.footer .brand img { width: 32px; height: 32px; }

@media (min-width: 1600px) {
  .hero-inner { min-height: 460px; }
}
@media (max-width: 1200px) {
  .header-inner { width: calc(100% - 40px); }
  .primary-nav a { padding-inline: 9px; font-size: 12px; }
  .primary-nav .project-cta { padding-inline: 12px; }
  .brand { font-size: 16px; }
  .brand img { width: 36px; height: 36px; }
  .category { font-size: 11px; }
}
@media (max-width: 1050px) {
  .primary-nav { display: none; position: absolute; top: 78px; left: 20px; right: 20px; margin: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 28px #0002; }
  [data-theme="light"] .primary-nav { background: var(--surface); }
  .primary-nav.open { display: flex; flex-wrap: wrap; gap: 5px; }
  .primary-nav a { font-size: 13px; }
  .menu-toggle { display: grid; }
  .header-actions { margin-left: auto; }
  .hero-copy { width: 66%; }
  h1 { font-size: 42px; }
  .category-bar { overflow: auto; grid-template-columns: repeat(var(--category-count, 8), minmax(110px, 1fr)); }
}
@media (max-width: 950px) {
  .site-header { height: 74px; }
  .primary-nav { top: 74px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { min-height: 440px; }
  .hero-copy { padding-block: 40px 65px; }
}
@media (max-width: 600px) {
  .wrap, .header-inner { width: calc(100% - 32px); }
  .site-header { height: 68px; }
  .brand { font-size: 15px; }
  .brand img { width: 32px; height: 32px; }
  .icon-button { width: 36px; height: 36px; border-radius: 10px; }
  .account { display: grid; border-radius: 50%; }
  .header-actions { gap: 6px; }
  .primary-nav { top: 68px; }
  .primary-nav .project-cta { display: flex; margin-left: 0; }
  .hero-inner { min-height: 350px; }
  .hero-copy { width: 100%; padding: 30px 0 24px; }
  h1 { font-size: 35px; }
  .hero-description { font-size: 13px; }
  .hero-disciplines { font-size: 9px; }
  .button { min-height: 44px; font-size: 11px; padding: 11px 13px; }
  .category-bar { grid-template-columns: repeat(var(--category-count, 8), 110px); border-radius: 16px; }
  .category { font-size: 11px; min-height: 60px; padding-block: 6px; gap: 5px; }
  .platform-logo, .category svg { height: 24px; }
  .category svg { width: 24px; }
  .lvgl-logo { width: 78px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { border-radius: 18px; }
  .project-content { padding: 22px; }
  .section-title > p:last-child { font-size: 12px; }
  .collection-toolbar, .sort-label select { font-size: 10px; }
  .project-inquiry h2 { font-size: 24px; }
  .footer > .work-footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .work-footer-brand { grid-column: 1 / -1; }
  .work-footer-bottom > span:nth-child(2) { width: 100%; }
}
