:root {
  --bg: #050607;
  --fg: #f7f9fb;
  --muted: #c7d0da;
  --accent: #ffffff;
  --card: linear-gradient(135deg, #0a0b0d, #070708);
  --border: #1b1d22;
  --pill: rgba(255, 255, 255, 0.04);
  --pill-border: #22242a;
  --title-glow: 0 0 26px rgba(255, 255, 255, 0.55), 0 0 54px rgba(255, 255, 255, 0.32);
  --line: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  font-family: "Space Grotesk", "Inter", "Helvetica Neue", Arial, sans-serif;
}

body.light {
  --bg: #f7f9fb;
  --fg: #0d1117;
  --muted: #4b5563;
  --accent: #0ea5e9;
  --card: linear-gradient(135deg, #ffffff, #eef2f7);
  --border: #d8e1ea;
  --pill: rgba(0, 0, 0, 0.04);
  --pill-border: #d0d7e2;
  --title-glow: 0 0 22px rgba(14, 165, 233, 0.25);
  --line: linear-gradient(180deg, rgba(14, 165, 233, 0.35), rgba(14, 165, 233, 0));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  min-height: 100vh;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
}

a {
  color: var(--fg);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  font-size: 0.9rem;
}

.hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  gap: 1rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(255, 255, 255, 0.1);
  width: 100%;
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  text-shadow: var(--title-glow);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero .meta {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.resume-grid {
  display: grid;
  gap: 1.4rem;
  margin: 1.8rem auto 0;
  width: 100%;
  max-width: 1200px;
}

.resume-section {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem 1.25rem 1.1rem;
  background: var(--card);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 14px 44px rgba(0, 0, 0, 0.35);
}

.resume-section h2 {
  margin: 0 0 0.65rem 0.2rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

.resume-list {
  display: grid;
  gap: 0.9rem;
}

.resume-item {
  padding: 0.8rem 0.75rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.resume-item .emphasize {
  color: var(--fg);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
  font-size: 1.05rem;
}

.resume-item .topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1rem;
}

.resume-item .subline {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.resume-item ul {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.resume-item+.resume-item {
  margin-top: 0.2rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.32rem 0.6rem;
  font-size: 0.8rem;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}

.glow-title {
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.55), 0 0 36px rgba(184, 241, 255, 0.3);
}

.summary {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  line-height: 1.55;
}

.double-col {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-container {
  max-width: 1200px;
  width: calc(100% - 2rem);
  margin: 0 auto;
}

.mosaic {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.2rem;
  width: 100%;
}

.mosaic-hero {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: none;
  aspect-ratio: 16 / 9;
  background: #000;
}

.mosaic-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.mosaic-grid {
  display: grid;
  gap: 0.3rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.mosaic-grid.four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .mosaic-grid.four-cols {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 600px) {

  .mosaic-grid,
  .mosaic-grid.four-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mosaic-tile {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  aspect-ratio: 3 / 4;
  box-shadow: none;
}

.mosaic-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
  border-radius: 10px;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}

.lightbox-backdrop.active {
  display: flex;
}

.lightbox-backdrop img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: #000;
}

.video-embed {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}

.video-embed iframe {
  width: 100%;
  height: 0;
  padding-bottom: 61%;
}

.video-embed video {
  width: 100%;
  display: block;
  border-radius: 12px;
  height: auto;
  background: #000;
}

.pill {
  display: inline-flex;
  gap: 0.35em;
  align-items: center;
  padding: 0.35em 0.65em;
  border-radius: 999px;
  background: var(--pill);
  border: 1px solid var(--pill-border);
  color: var(--fg);
  font-size: 0.8rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.back {
  text-decoration: none;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}