/* =============
   Base + Theme
   ============= */

:root {
  color-scheme: light dark;

  --bg: #0b0c10;
  --panel: #12131a;
  --text: #e7e9ee;
  --muted: #a8adbd;
  --border: #2a2f3a;

  --accent: #7aa2f7;
  --accent-2: #a78bfa;

  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;

  --max: 1100px;
  --gap: 1.25rem;
}

[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f6f7fb;
  --text: #10131a;
  --muted: #4f5665;
  --border: #d9deea;

  --accent: #2f6df6;
  --accent-2: #7c3aed;

  --shadow: 0 12px 30px rgba(13, 20, 33, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body.page {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transform: translateY(-200%);
  transition: transform 160ms ease;
  z-index: 999;
}

.skip-link:focus {
  transform: translateY(0);
}

a {
  color: inherit;
}

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem;
}

/* ==============
   Header / Nav
   ============== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  text-decoration: none;
}

.brand__mark {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.brand__text {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav__links {
  display: flex;
  gap: 0.85rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav__link {
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  color: var(--muted);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
}

.nav__link.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--border);
}

/* ================
   Buttons / Chips
   ================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;

  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: 0;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  font-weight: 650;
  box-shadow: var(--shadow);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.chip {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  color: var(--muted);
  padding: 0.45rem 0.8rem;
  font-weight: 600;
}

.chip.is-selected {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

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

.section {
  padding: 2rem 0;
}

.section__header {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.section__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

.section__subtitle {
  margin: 0;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

@media (max-width: 820px) {
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

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

  .nav__links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

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

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--gap);
  align-items: center;
  padding: 1.75rem 0 1rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.hero__subtitle {
  margin: 0.7rem 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.hero__cta {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.hero__meta {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: grid;
  gap: 0.25rem;
}

.hero__media {
  margin: 0;
  display: grid;
  justify-items: end;
}

.avatar {
  width: min(380px, 100%);
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

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

  .hero__media {
    justify-items: start;
  }
}

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

.card {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.card__title {
  margin: 0 0 0.5rem;
}

.card__text {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.list--numbered {
  padding-left: 1.25rem;
}

.muted {
  color: var(--muted);
  margin: 0.25rem 0 0.9rem;
}

/* =======================
   Filters + Project Grid
   ======================= */

.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0.35rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

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

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

.project {
  position: relative;
}

.project__link {
  display: grid;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.project__img {
  width: 100%;
  height: auto;
  display: block;
}

.project__body {
  padding: 0.9rem 0.95rem 1rem;
  display: grid;
  gap: 0.35rem;
}

.project__title {
  margin: 0;
  font-size: 1.05rem;
}

.project__desc {
  margin: 0;
  color: var(--muted);
}

.project__tags {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
}

/* Hover reveal overlay */
.project__reveal {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg) 0%, transparent),
    color-mix(in srgb, var(--bg) 55%, transparent),
    color-mix(in srgb, var(--bg) 85%, transparent)
  );
  opacity: 0;
  transition: opacity 180ms ease;
  padding: 1rem;
}

.project__reveal-text {
  margin: 0;
  color: var(--text);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  border-radius: 14px;
  padding: 0.75rem;
}

.project__link:hover .project__reveal,
.project__link:focus-visible .project__reveal {
  opacity: 1;
}

/* ==============
   Notice + Q/A
   ============== */

.notice {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.notice__title {
  margin: 0 0 0.25rem;
  font-weight: 750;
}

.notice__text {
  margin: 0;
  color: var(--muted);
}

.qa {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.5rem 0.75rem;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  margin-top: 0.7rem;
}

.qa__q {
  cursor: pointer;
  font-weight: 650;
}

.qa__a {
  color: var(--muted);
  margin: 0.6rem 0 0.2rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}
