:root {
  color-scheme: light dark;

  --bg-a: #dbeafe;
  --bg-b: #eff6ff;
  --bg-c: #ffffff;

  --text: #0b1220;
  --muted: #53657d;
  --muted-2: #72849c;

  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-hover: #ffffff;

  --border: rgba(59, 130, 246, 0.24);
  --border-strong: rgba(37, 99, 235, 0.36);

  --accent: #2563eb;
  --accent-2: #06b6d4;
  --accent-soft: rgba(37, 99, 235, 0.10);

  --pill-bg: rgba(37, 99, 235, 0.10);
  --pill-text: #1d4ed8;

  --shadow: 0 24px 70px rgba(30, 64, 175, 0.14);
  --shadow-hover: 0 30px 90px rgba(30, 64, 175, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-a: #031124;
    --bg-b: #071d3a;
    --bg-c: #0b2447;

    --text: #ecf5ff;
    --muted: #b8c8dc;
    --muted-2: #8ea4bd;

    --surface: rgba(10, 25, 48, 0.70);
    --surface-strong: rgba(15, 32, 58, 0.88);
    --surface-hover: rgba(20, 43, 75, 0.96);

    --border: rgba(96, 165, 250, 0.22);
    --border-strong: rgba(147, 197, 253, 0.34);

    --accent: #93c5fd;
    --accent-2: #67e8f9;
    --accent-soft: rgba(147, 197, 253, 0.12);

    --pill-bg: rgba(96, 165, 250, 0.16);
    --pill-text: #bfdbfe;

    --shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
    --shadow-hover: 0 30px 90px rgba(0, 0, 0, 0.38);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(14, 165, 233, 0.35), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(34, 197, 94, 0.22), transparent 28%),
    linear-gradient(180deg, var(--bg-a) 0%, var(--bg-b) 46%, var(--bg-c) 100%);
  color: var(--text);
}

a { color: inherit; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.page-glow {
  position: fixed;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.5;
  z-index: -1;
}

.page-glow-one {
  width: 420px;
  height: 420px;
  left: -120px;
  top: 120px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.20);
}

.page-glow-two {
  width: 380px;
  height: 380px;
  right: -120px;
  top: 420px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.18);
}

.hero { padding: 22px 0 36px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(16px);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.lang-btn .flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--pill-bg);
  color: var(--pill-text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  transition: opacity 160ms ease;
}

.brand:hover {
  opacity: 0.78;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.20);
}

.brand span { display: grid; gap: 1px; }

.brand strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 0.80rem;
}

.hero-content {
  padding: 58px 0 22px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.93;
  letter-spacing: -0.075em;
}

.subtitle {
  max-width: 760px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 0 0 42px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  color: inherit;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 38%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 42%);
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
  box-shadow: var(--shadow-hover);
}

.visual, .content, .card-footer {
  position: relative;
  z-index: 1;
}

.visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.visual img {
  display: block;
  max-width: 230px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.dosing-logo {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.50), rgba(255, 255, 255, 0.20)),
    var(--accent-soft);
}

@media (prefers-color-scheme: dark) {
  .dosing-logo {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
      rgba(15, 23, 42, 0.44);
  }
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill, .status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
}

.pill {
  background: var(--pill-bg);
  color: var(--pill-text);
}

.status {
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.28);
}

@media (prefers-color-scheme: dark) {
  .status { background: rgba(255, 255, 255, 0.04); }
}

.project-card h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.project-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.62;
  font-size: 0.97rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted-2);
  font-size: 0.86rem;
}

.arrow {
  color: var(--accent);
  font-size: 1.18rem;
  font-weight: 900;
  transition: transform 180ms ease;
}

.project-card:hover .arrow {
  transform: translateX(3px);
}

.footer {
  padding: 10px 0 40px;
  color: var(--muted-2);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 980px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, 1180px); }

  .brand small { display: none; }

  .lang-label { display: none; }

  .lang-btn { padding: 6px 9px; }

  .hero-content { padding: 42px 0 18px; }

  .projects {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-card {
    min-height: auto;
    padding: 20px;
  }

  .visual { height: 96px; }
}
