@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap");

/* Projects visual system: dark technical style with controlled accent colors. */

:root {
  --color-bg: #0a0e1a;
  --color-surface: rgba(17, 24, 39, 0.74);
  --color-surface-strong: rgba(5, 10, 18, 0.84);
  --color-primary: #7c6fdc;
  --color-accent: #1d9bf0;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-accent: rgba(29, 155, 240, 0.42);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.34);
  --font-body: "Inter", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", Arial, sans-serif;
  --content-width: 1180px;
  --radius-pill: 999px;
  --radius-card: 8px;
  --transition-fast: 0.22s ease;
  --transition-medium: 0.24s ease;
}

/* Base reset: removes default browser spacing and keeps element sizing predictable. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    linear-gradient(rgba(10, 14, 26, 0.76), rgba(10, 14, 26, 0.9)),
    url("../img/DATA_8.jpg") center / cover fixed;
}

body.has-ambient-glow::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(
      760px circle at var(--ambient-x, 50vw) var(--ambient-y, 36vh),
      rgba(29, 155, 240, 0.075),
      rgba(124, 111, 220, 0.045) 34%,
      transparent 72%
    );
  opacity: 0.82;
  pointer-events: none;
}

/* Visible focus: keeps keyboard navigation accessible and polished. */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.web-stat-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Page wrapper: controls width and vertical rhythm. */

.page {
  position: relative;
  z-index: 1;
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 42px;
}

/* Top navigation: primary links across the website. */

.top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 58px;
}

.top-nav a {
  min-width: 104px;
  padding: 12px 22px;
  border: 1px solid rgba(124, 111, 220, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(124, 111, 220, 0.78);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition:
    transform var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #081018;
}

/* Hero section: introduces the Projects page with clearer hierarchy. */

.hero {
  text-align: center;
  margin-bottom: 38px;
}

.eyebrow {
  color: var(--color-accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero h1 {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.54);
}

.hero h1 span {
  color: var(--color-primary);
}

.hero p {
  max-width: 840px;
  margin: 22px auto 0;
  color: var(--color-text-muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

/* Project grid: creates the responsive card layout. */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 36px;
}

/* Project cards: reusable blocks for certifications, labs, and engineering areas. */

.project-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 292px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--transition-medium),
    border-color var(--transition-medium),
    box-shadow var(--transition-medium),
    background-color var(--transition-medium);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      420px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
      rgba(29, 155, 240, 0.16),
      rgba(124, 111, 220, 0.08) 38%,
      transparent 70%
    );
  opacity: 0;
  transition: opacity var(--transition-medium);
  pointer-events: none;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-accent);
  background: rgba(8, 15, 28, 0.9);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.42),
    0 0 30px rgba(29, 155, 240, 0.1);
}

.project-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.status {
  padding: 6px 10px;
  border: 1px solid rgba(29, 155, 240, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(29, 155, 240, 0.09);
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-card h2 {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.34rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--color-text-muted);
  line-height: 1.68;
  margin-bottom: 18px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tags span {
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: rgba(124, 111, 220, 0.22);
  color: var(--color-text);
  font-size: 0.84rem;
  font-weight: 800;
}

.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(29, 155, 240, 0.36);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.1), rgba(124, 111, 220, 0.1)),
    rgba(5, 10, 18, 0.42);
  color: #b7f7ff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  box-shadow: 0 0 16px rgba(29, 155, 240, 0.05);
  transition:
    transform var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 155, 240, 0.72);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.18), rgba(124, 111, 220, 0.18)),
    rgba(5, 10, 18, 0.58);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(29, 155, 240, 0.1);
}

.card-link.is-featured {
  border-color: rgba(29, 155, 240, 0.62);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.24), rgba(125, 211, 252, 0.18)),
    rgba(5, 10, 18, 0.46);
  color: #e2f4ff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 22px rgba(29, 155, 240, 0.16);
}

.card-link.is-featured:hover {
  border-color: rgba(29, 155, 240, 0.84);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.32), rgba(125, 211, 252, 0.24)),
    rgba(5, 10, 18, 0.58);
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 28px rgba(29, 155, 240, 0.22);
}

.card-link.is-disabled {
  position: relative;
  gap: 8px;
  padding-left: 13px;
  border-color: rgba(245, 158, 11, 0.28);
  cursor: default;
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.10), rgba(124, 111, 220, 0.12), rgba(245, 158, 11, 0.10)),
    rgba(5, 10, 18, 0.48);
  color: #f3f8ff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 18px rgba(245, 158, 11, 0.06);
}

.card-link.is-disabled::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, var(--color-primary));
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.34);
}

.card-link.is-disabled:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.44);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.14), rgba(124, 111, 220, 0.15), rgba(245, 158, 11, 0.13)),
    rgba(5, 10, 18, 0.56);
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 22px rgba(245, 158, 11, 0.09);
}

/* Footer: simple ownership information. */

.page-footer {
  margin-top: 44px;
  text-align: center;
  color: var(--color-text-muted);
}

/* Tablet layout: two-column project grid. */

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile layout: improves readability and background behavior on phones. */

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  body.has-ambient-glow::before {
    display: none;
  }

  .page {
    width: 100%;
    padding: 28px 14px 32px;
  }

  .top-nav {
    gap: 8px;
    margin-bottom: 34px;
  }

  .top-nav a {
    min-width: 86px;
    padding: 10px 14px;
    font-size: 0.86rem;
  }

  .hero {
    margin-bottom: 28px;
  }

  .eyebrow {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 14vw, 3.35rem);
    line-height: 0.98;
  }

  .hero p {
    margin-top: 16px;
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }

  .project-card {
    min-height: auto;
    padding: 22px;
  }

  .card-top {
    margin-bottom: 14px;
  }

  .project-card h2 {
    font-size: 1.2rem;
  }

  .project-card p {
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .tags {
    gap: 7px;
  }

  .tags span {
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .page-footer {
    margin-top: 30px;
    font-size: 0.85rem;
  }
}

/* Reduced motion: respects users who prefer less animation. */

@media (prefers-reduced-motion: reduce) {
  .top-nav a,
  body.has-ambient-glow::before,
  .project-card,
  .project-card::before,
  .card-link {
    transition: none;
  }

  .top-nav a:hover,
  .project-card:hover,
  .card-link:hover {
    transform: none;
  }
}
