
/* =========================================================
   SQL DATA QUALITY & VALIDATION ENGINE
   Professional Portfolio Project Page
   Light + Dark Mode | Responsive Design
========================================================= */

/* ==============================
   1. THEME VARIABLES — LIGHT
============================== */

.dq-page {
  --dq-bg: #f7f9fe;
  --dq-card: #ffffff;
  --dq-card-alt: #f0f4fb;
  --dq-text: #17233b;
  --dq-heading: #101b33;
  --dq-muted: #61718b;
  --dq-border: #dfe6f2;
  --dq-primary: #6554f5;
  --dq-secondary: #3278f6;
  --dq-accent: #8b5cf6;
  --dq-soft-purple: #f0ebff;
  --dq-shadow: 0 12px 35px rgba(24, 45, 90, 0.055);
  --dq-hover: #f1f4fc;
  --dq-gradient: linear-gradient(120deg, #5267f7, #8751f7);

  background: var(--dq-bg);
  color: var(--dq-text);
  min-height: 100vh;
  padding: 35px 0 90px;
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.7;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ==============================
   2. DARK THEME
============================== */

/* Supports common theme classes and attributes */

html[data-theme="dark"] .dq-page,
body[data-theme="dark"] .dq-page,
html.dark .dq-page,
body.dark .dq-page,
body.dark-mode .dq-page,
html.dark-mode .dq-page,
[data-bs-theme="dark"] .dq-page {
  --dq-bg: #070e1c;
  --dq-card: #0e192b;
  --dq-card-alt: #132139;
  --dq-text: #dbe5f7;
  --dq-heading: #f2f5ff;
  --dq-muted: #9aaec9;
  --dq-border: #21314b;
  --dq-primary: #9383ff;
  --dq-secondary: #579aff;
  --dq-accent: #a78bfa;
  --dq-soft-purple: #242047;
  --dq-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  --dq-hover: #17253d;
  --dq-gradient: linear-gradient(120deg, #8c9aff, #8057ff);
}

/* ==============================
   3. GLOBAL PAGE STYLES
============================== */

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

.dq-page a {
  text-decoration: none;
}

.dq-page h1,
.dq-page h2,
.dq-page h3 {
  color: var(--dq-heading);
  line-height: 1.3;
}

.dq-page p {
  color: var(--dq-muted);
}

.dq-container {
  width: min(1380px, calc(100% - 60px));
  margin: 0 auto;
}

.dq-page section[id] {
  scroll-margin-top: 95px;
}

/* ==============================
   4. BACK TO PROJECTS
============================== */

.dq-back-nav {
  margin-bottom: 30px;
}

.dq-back-nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--dq-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.dq-back-nav a:hover {
  color: var(--dq-primary);
}

/* ==============================
   5. PROJECT HERO
============================== */

.dq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 55px;
  padding: 22px 0 55px;
}

.dq-hero-content {
  min-width: 0;
}

.dq-project-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(101, 84, 245, 0.16);
  border-radius: 8px;
  background: var(--dq-soft-purple);
  color: var(--dq-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.dq-hero h1 {
  max-width: 750px;
  margin: 22px 0 12px;
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -2.4px;
}

.dq-hero h1 span {
  display: block;
  background: var(--dq-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dq-hero h2 {
  margin: 0 0 20px;
  font-size: clamp(17px, 1.7vw, 23px);
  font-weight: 700;
}

.dq-hero-description {
  max-width: 610px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.95;
}

.dq-tags,
.dq-github-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dq-tags span,
.dq-github-tags span {
  padding: 6px 11px;
  border: 1px solid var(--dq-border);
  border-radius: 20px;
  background: var(--dq-card-alt);
  color: var(--dq-text);
  font-size: 10px;
  font-weight: 600;
}

.dq-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 29px;
}

/* ==============================
   6. BUTTONS
============================== */

.dq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 45px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.dq-btn:hover {
  transform: translateY(-3px);
}

.dq-btn-primary {
  background: linear-gradient(120deg, #4f61f6, #763df5);
  color: #ffffff;
  box-shadow: 0 9px 23px rgba(101, 84, 245, 0.18);
}

.dq-btn-primary:hover {
  color: #ffffff;
  box-shadow: 0 13px 28px rgba(101, 84, 245, 0.28);
}

.dq-btn-outline {
  border-color: var(--dq-primary);
  background: transparent;
  color: var(--dq-primary);
}

.dq-btn-outline:hover {
  background: var(--dq-soft-purple);
  color: var(--dq-primary);
}

/* ==============================
   7. SQL TERMINAL
============================== */

.dq-hero-terminal {
  position: relative;
  min-width: 0;
}

.dq-hero-terminal::before {
  content: "";
  position: absolute;
  inset: 15% 8%;
  z-index: 0;
  border-radius: 50%;
  background: #5b53f5;
  opacity: 0.12;
  filter: blur(60px);
}

.dq-terminal {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid #31415f;
  border-radius: 13px;
  background: #080f1c;
  box-shadow: 0 25px 60px rgba(12, 20, 45, 0.2);
}

.dq-terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 17px;
  border-bottom: 1px solid #253550;
  background: #111c2d;
  color: #b8c8df;
}

.dq-terminal-dots {
  display: flex;
  gap: 7px;
}

.dq-terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.dq-terminal-title {
  font-family: Consolas, monospace;
  font-size: 11px;
}

.dq-terminal-header > i {
  color: #8ca0bd;
}

.dq-terminal-body {
  padding: 22px;
  font-family: Consolas, "Courier New", monospace;
}

.dq-terminal-comment {
  margin-bottom: 15px;
  color: #29d39d;
  font-size: 12px;
}

.dq-terminal-body pre {
  margin: 0;
  overflow-x: auto;
  color: #d6e2f5;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.9;
  tab-size: 4;
}

.dq-terminal-body pre code {
  color: inherit;
  background: transparent;
}

.dq-terminal-body .sql-keyword {
  color: #ae8cff;
  font-weight: 700;
}

.dq-terminal-body .sql-function {
  color: #56c8ff;
}

.dq-terminal-divider {
  height: 1px;
  margin: 20px 0 14px;
  background: #283b57;
}

.dq-terminal-output-label {
  margin-bottom: 10px;
  color: #8da5c4;
  font-size: 10px;
}

.dq-terminal-result {
  overflow-x: auto;
}

.dq-terminal-result table {
  width: 100%;
  border-collapse: collapse;
  color: #dbe6fa;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.dq-terminal-result th,
.dq-terminal-result td {
  padding: 9px;
  border-bottom: 1px solid #23354e;
  text-align: left;
}

.dq-terminal-result th {
  color: #a9bbd5;
  font-weight: 600;
}

.dq-terminal-result td {
  color: #c1a6ff;
}

.dq-terminal-prompt {
  margin-top: 18px;
  color: #54dfa9;
  font-size: 12px;
}

.dq-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 5px;
  background: #54dfa9;
  vertical-align: middle;
  animation: dq-blink 1s steps(1) infinite;
}

@keyframes dq-blink {
  50% {
    opacity: 0;
  }
}

/* ==============================
   8. DATASET METRICS
============================== */

.dq-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.dq-metric-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-width: 0;
  padding: 23px 20px;
  border: 1px solid var(--dq-border);
  border-radius: 13px;
  background: var(--dq-card);
  box-shadow: var(--dq-shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.dq-metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--dq-primary);
}

.dq-metric-icon,
.dq-heading-icon,
.dq-workflow-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
}

.dq-metric-icon {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.dq-blue {
  background: #e8efff;
  color: #4369ee;
}

.dq-green {
  background: #dff8ed;
  color: #0b9d73;
}

.dq-purple {
  background: #f1e5ff;
  color: #8e48d9;
}

.dq-orange {
  background: #fff0e0;
  color: #e4812c;
}

.dq-metric-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dq-metric-content > span {
  margin-bottom: 5px;
  color: var(--dq-muted);
  font-size: 12px;
}

.dq-metric-content strong {
  color: var(--dq-heading);
  font-size: clamp(18px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
}

.dq-metric-content small {
  margin-top: 5px;
  color: var(--dq-muted);
  font-size: 10px;
}

/* ==============================
   9. PROJECT OVERVIEW
============================== */

.dq-overview-section {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 65px;
}

.dq-overview-main,
.dq-tech-panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--dq-border);
  border-radius: 14px;
  background: var(--dq-card);
  box-shadow: var(--dq-shadow);
}

.dq-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.dq-heading-icon {
  width: 37px;
  height: 37px;
  font-size: 16px;
}

.dq-section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
}

.dq-overview-main > p {
  margin-bottom: 15px;
  font-size: 13px;
  line-height: 1.95;
}

.dq-problem-box {
  margin-top: 23px;
  padding: 20px;
  border: 1px solid var(--dq-border);
  border-left: 3px solid var(--dq-primary);
  border-radius: 10px;
  background: var(--dq-card-alt);
}

.dq-problem-box h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 14px;
}

.dq-problem-box h3 i {
  color: var(--dq-primary);
}

.dq-problem-box p {
  margin: 0;
  font-size: 12px;
}

.dq-tech-panel ul {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dq-tech-panel li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dq-text);
  font-size: 12px;
}

.dq-tech-panel li i {
  color: var(--dq-primary);
}

/* ==============================
   10. SECTION TITLES
============================== */

.dq-section-title {
  margin-bottom: 25px;
}

.dq-section-eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--dq-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.dq-section-title h2 {
  margin: 0 0 10px;
  font-size: clamp(23px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.8px;
}

.dq-section-title p {
  max-width: 700px;
  margin: 0;
  font-size: 13px;
}

/* ==============================
   11. PROJECT WORKFLOW
============================== */

.dq-workflow-section {
  margin-bottom: 65px;
}

.dq-workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dq-workflow-card {
  min-width: 0;
  padding: 25px 21px;
  border: 1px solid var(--dq-border);
  border-radius: 13px;
  background: var(--dq-card);
  box-shadow: var(--dq-shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.dq-workflow-card:hover {
  transform: translateY(-5px);
  border-color: var(--dq-primary);
}

.dq-workflow-icon {
  width: 43px;
  height: 43px;
  margin-bottom: 20px;
  font-size: 19px;
}

.dq-step-number {
  display: block;
  margin-bottom: 8px;
  color: var(--dq-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.dq-workflow-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.dq-workflow-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
}

/* ==============================
   12. DATASET TABLE
============================== */

.dq-details-section {
  margin-bottom: 65px;
}

.dq-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--dq-border);
  border-radius: 13px;
  background: var(--dq-card);
  box-shadow: var(--dq-shadow);
}

.dq-data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 570px;
}

.dq-data-table th,
.dq-data-table td {
  padding: 18px 21px;
  border-bottom: 1px solid var(--dq-border);
  text-align: left;
  font-size: 12px;
}

.dq-data-table thead {
  background: var(--dq-card-alt);
}

.dq-data-table th {
  color: var(--dq-heading);
  font-weight: 750;
}

.dq-data-table td {
  color: var(--dq-muted);
}

.dq-data-table td:first-child {
  color: var(--dq-primary);
  font-weight: 700;
}

.dq-data-table td:first-child i {
  margin-right: 10px;
}

.dq-data-table td:last-child,
.dq-data-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.dq-data-table tbody tr:last-child td {
  border-bottom: none;
}

.dq-data-table tbody tr:hover {
  background: var(--dq-hover);
}

/* ==============================
   13. DATA QUALITY CHECKS
============================== */

.dq-checks-section {
  margin-bottom: 65px;
}

.dq-checks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dq-check-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--dq-border);
  border-radius: 12px;
  background: var(--dq-card);
  transition: transform 0.2s, border-color 0.2s;
}

.dq-check-item:hover {
  transform: translateY(-3px);
  border-color: var(--dq-primary);
}

.dq-check-item > i {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 10px;
  background: var(--dq-soft-purple);
  color: var(--dq-primary);
  font-size: 16px;
}

.dq-check-item h3 {
  margin: 0 0 7px;
  font-size: 13px;
}

.dq-check-item p {
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
}

/* ==============================
   14. GITHUB SECTION
============================== */

.dq-github-section {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 30px;
  border: 1px solid var(--dq-border);
  border-radius: 15px;
  background:
    radial-gradient(
      circle at 95% 15%,
      rgba(101, 84, 245, 0.08),
      transparent 40%
    ),
    var(--dq-card);
  box-shadow: var(--dq-shadow);
}

.dq-github-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 65px;
  height: 65px;
  border-radius: 16px;
  background: var(--dq-soft-purple);
  color: var(--dq-primary);
  font-size: 32px;
}

.dq-github-content {
  flex: 1;
  min-width: 0;
}

.dq-github-content h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.dq-github-content p {
  max-width: 650px;
  margin: 0 0 17px;
  font-size: 12px;
}

.dq-github-pending {
  flex-shrink: 0;
  cursor: default;
  opacity: 0.75;
}

.dq-github-pending:hover {
  transform: none;
}

/* ==============================
   15. DARK MODE ENHANCEMENTS
============================== */

html[data-theme="dark"] .dq-blue,
body.dark .dq-blue,
body.dark-mode .dq-blue {
  background: #172954;
  color: #80a1ff;
}

html[data-theme="dark"] .dq-green,
body.dark .dq-green,
body.dark-mode .dq-green {
  background: #103c35;
  color: #51dfae;
}

html[data-theme="dark"] .dq-purple,
body.dark .dq-purple,
body.dark-mode .dq-purple {
  background: #33224e;
  color: #c69cff;
}

html[data-theme="dark"] .dq-orange,
body.dark .dq-orange,
body.dark-mode .dq-orange {
  background: #48301d;
  color: #ffb16b;
}

/* ==============================
   16. RESPONSIVE DESIGN
============================== */

/* Medium laptops */

@media (max-width: 1200px) {
  .dq-hero {
    gap: 30px;
  }

  .dq-hero h1 {
    font-size: 46px;
  }

  .dq-metric-card {
    padding: 19px 15px;
    gap: 10px;
  }

  .dq-metric-icon {
    width: 40px;
    height: 40px;
  }
}

/* Tablets */

@media (max-width: 992px) {
  .dq-hero {
    grid-template-columns: 1fr;
  }

  .dq-hero h1 {
    max-width: 800px;
  }

  .dq-hero-terminal {
    max-width: 720px;
    width: 100%;
  }

  .dq-metrics,
  .dq-workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dq-overview-section {
    grid-template-columns: 1fr;
  }

  .dq-checks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dq-github-section {
    flex-wrap: wrap;
  }
}

/* Mobile devices */

@media (max-width: 600px) {
  .dq-page {
    padding: 25px 0 60px;
  }

  .dq-container {
    width: calc(100% - 28px);
  }

  .dq-back-nav {
    margin-bottom: 20px;
  }

  .dq-hero {
    gap: 28px;
    padding: 12px 0 35px;
  }

  .dq-hero h1 {
    margin-top: 16px;
    font-size: 36px;
    letter-spacing: -1.3px;
  }

  .dq-hero h2 {
    font-size: 17px;
  }

  .dq-hero-description {
    font-size: 12px;
  }

  .dq-hero-actions {
    gap: 10px;
  }

  .dq-btn {
    min-height: 42px;
    padding: 10px 13px;
    font-size: 11px;
  }

  .dq-terminal-body {
    padding: 15px;
  }

  .dq-terminal-body pre {
    font-size: 10px;
  }

  .dq-terminal-result table {
    font-size: 10px;
  }

  .dq-metrics,
  .dq-workflow-grid,
  .dq-checks-grid {
    grid-template-columns: 1fr;
  }

  .dq-metrics,
  .dq-overview-section,
  .dq-workflow-section,
  .dq-details-section,
  .dq-checks-section {
    margin-bottom: 40px;
  }

  .dq-overview-main,
  .dq-tech-panel {
    padding: 20px;
  }

  .dq-section-title h2 {
    font-size: 24px;
  }

  .dq-github-section {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .dq-github-content h2 {
    font-size: 19px;
  }

  .dq-github-pending {
    width: 100%;
  }
}

/* ==============================
   17. ACCESSIBILITY
============================== */

.dq-page a:focus-visible,
.dq-page button:focus-visible {
  outline: 3px solid var(--dq-primary);
  outline-offset: 4px;
}

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