/* =========================================================
   JoxyDev
   Lightweight production theme
   ========================================================= */

:root {
  color-scheme: dark;

  --bg: #0b0f14;
  --bg-soft: #0f1621;

  --card: #111824;
  --card-hover: #151e2d;

  --text: #edf3fb;
  --muted: #98a6ba;

  --accent: #4da3ff;
  --accent-strong: #2388ef;
  --accent-soft: rgba(77, 163, 255, 0.12);

  --border: rgba(157, 184, 220, 0.14);
  --border-strong: rgba(77, 163, 255, 0.30);

  --success: #56d6a9;

  --shadow:
    0 12px 34px rgba(0, 0, 0, 0.18);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --max-width: 1080px;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f4f7fb;
  --bg-soft: #edf2f8;

  --card: #ffffff;
  --card-hover: #f9fbff;

  --text: #101722;
  --muted: #5c697b;

  --accent: #246fe5;
  --accent-strong: #155dc5;
  --accent-soft: rgba(36, 111, 229, 0.09);

  --border: rgba(15, 30, 50, 0.10);
  --border-strong: rgba(36, 111, 229, 0.25);

  --success: #087d59;

  --shadow:
    0 12px 30px rgba(40, 60, 90, 0.08);
}


/* =========================================================
   Reset
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  line-height: 1.6;

  color: var(--text);

  /*
   * Lightweight background:
   * no filter
   * no blur
   * no mix-blend-mode
   * no fixed background
   */
  background:
    radial-gradient(
      circle at 12% 8%,
      rgba(77, 163, 255, 0.10),
      transparent 32rem
    ),
    radial-gradient(
      circle at 88% 85%,
      rgba(83, 112, 255, 0.07),
      transparent 34rem
    ),
    var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  color: inherit;
}


/* =========================================================
   Accessibility
   ========================================================= */

:focus-visible {
  outline: 3px solid rgba(77, 163, 255, 0.42);
  outline-offset: 3px;
}

::selection {
  background: rgba(77, 163, 255, 0.28);
}


/* =========================================================
   Main layout
   ========================================================= */

.page-shell,
.container,
.wrap {
  width: min(
    calc(100% - 32px),
    var(--max-width)
  );

  margin-inline: auto;
}

.page-shell {
  padding:
    24px
    0
    42px;
}


/* =========================================================
   Top bar
   ========================================================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  min-height: 52px;

  margin-bottom: 64px;
}

.brand {
  color: var(--text);

  font-size: 18px;
  font-weight: 760;

  letter-spacing: -0.02em;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* =========================================================
   Language selector
   ========================================================= */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 5px;

  margin: 0;
  padding: 4px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--card);
}

.lang-btn {
  min-width: 38px;
  min-height: 36px;

  padding: 6px 8px;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: var(--muted);

  cursor: pointer;

  font-size: 12px;
  font-weight: 700;

  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.lang-btn.active {
  color: var(--text);
  background: var(--accent-soft);
}


/* =========================================================
   Theme toggle
   ========================================================= */

#themeToggle {
  position: static;

  width: 44px;
  height: 44px;

  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--card);
  color: var(--text);

  box-shadow: none;

  cursor: pointer;

  font-size: 21px;
  line-height: 1;

  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

#themeToggle::before,
#themeToggle::after {
  display: none !important;
}

#themeToggle:hover {
  border-color: var(--border-strong);
}

#themeToggle:active {
  transform: scale(0.96);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* =========================================================
   Hero
   ========================================================= */

.hero {
  max-width: 790px;

  margin-bottom: 82px;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;

  min-height: 30px;

  margin-bottom: 20px;
  padding: 5px 11px;

  border: 1px solid var(--border-strong);
  border-radius: 999px;

  background: var(--accent-soft);

  color: var(--accent);

  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin:
    0
    0
    18px;

  font-size:
    clamp(
      42px,
      9vw,
      78px
    );

  line-height: 0.98;

  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 710px;

  margin: 0;

  color: var(--muted);

  font-size:
    clamp(
      17px,
      2.5vw,
      20px
    );
}


/* =========================================================
   Sections
   ========================================================= */

.section {
  margin-bottom: 78px;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  margin:
    0
    0
    7px;

  font-size:
    clamp(
      25px,
      4vw,
      32px
    );

  letter-spacing: -0.025em;
}

.section-header p {
  margin: 0;

  max-width: 670px;

  color: var(--muted);
}


/* =========================================================
   Cards
   ========================================================= */

.grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(250px, 1fr)
    );

  gap: 16px;
}

.card,
.site-card {
  position: relative;

  padding: 22px;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);

  background: var(--card);

  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.015);

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.card h3,
.site-card h3 {
  margin:
    0
    0
    9px;

  font-size: 18px;

  letter-spacing: -0.015em;
}

.card p {
  margin: 0;

  color: var(--muted);

  font-size: 14px;
}


/* Only animate hover on devices that actually have hover */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-2px);

    border-color:
      var(--border-strong);

    background:
      var(--card-hover);

    box-shadow:
      var(--shadow);
  }
}


/* =========================================================
   Project status
   ========================================================= */

.project-card {
  display: flex;
  flex-direction: column;

  min-height: 175px;
}

.project-card p {
  flex: 1;
}

.project-status {
  align-self: flex-start;

  display: inline-flex;

  margin-top: 18px;
  padding: 5px 9px;

  border-radius: 999px;

  background: var(--accent-soft);

  color: var(--accent);

  font-size: 11px;
  font-weight: 760;

  letter-spacing: 0.02em;
  text-transform: uppercase;
}


/* =========================================================
   Social / contacts
   ========================================================= */

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding:
    8px
    14px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--card);

  color: var(--text);

  font-size: 14px;
  font-weight: 650;
}

a.social-link {
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

a.social-link:hover {
  border-color:
    var(--border-strong);

  background:
    var(--card-hover);
}

.social-link--inactive {
  cursor: default;

  color: var(--muted);
}

.social-icon {
  width: 28px;
  height: 28px;

  object-fit: contain;
}


/* =========================================================
   Shared/demo support
   ========================================================= */

.muted {
  color: var(--muted);
}

.row,
.controls,
.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  gap: 8px;

  margin-bottom: 12px;
}

select,
input,
textarea {
  padding: 8px 10px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--card);
  color: var(--text);
}

table {
  width: 100%;

  margin-top: 12px;

  border-collapse: collapse;
}

th,
td {
  padding: 8px;

  text-align: left;

  border-bottom:
    1px solid var(--border);

  color: var(--muted);
}

canvas {
  width: 100%;
  height: 70px;

  display: block;

  border-radius: 8px;

  background:
    rgba(7, 16, 24, 0.30);
}

.editor {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 12px;
}

#preview {
  min-height: 160px;

  padding: 12px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--card);
}

.dashboard-header {
  margin: 20px 0;
}

.site-title {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 12px;

  margin-bottom: 8px;
}

.badge-up,
.badge-down {
  padding: 5px 9px;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
}

.badge-up {
  background: rgba(86, 214, 169, 0.12);
  color: var(--success);
}

.badge-down {
  background: rgba(224, 74, 74, 0.12);
  color: #e05a5a;
}


/* =========================================================
   Footer
   ========================================================= */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  flex-wrap: wrap;

  gap: 12px;

  padding-top: 26px;

  border-top:
    1px solid var(--border);

  color: var(--muted);

  font-size: 13px;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 680px) {

  .page-shell,
  .container,
  .wrap {
    width:
      min(
        calc(100% - 24px),
        var(--max-width)
      );
  }

  .page-shell {
    padding-top: 12px;
  }

  .topbar {
    margin-bottom: 52px;
  }

  .hero {
    margin-bottom: 64px;
  }

  .section {
    margin-bottom: 60px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .editor {
    grid-template-columns: 1fr;
  }

  .card,
  .site-card {
    padding: 18px;
  }

}


/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}
