:root {
  --bg: #070b0f;
  --bg-2: #0b1118;
  --panel: rgba(15, 22, 31, 0.78);
  --panel-solid: #111924;
  --panel-2: rgba(20, 31, 44, 0.74);
  --text: #eef7f5;
  --muted: #9fb5b1;
  --line: rgba(126, 255, 225, 0.18);
  --line-soft: rgba(255, 255, 255, 0.09);
  --accent: #37f0cd;
  --accent-2: #78ffe1;
  --accent-dark: #05372f;
  --warning: #f5cf6f;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --max: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 18% -4%, rgba(55, 240, 205, 0.16), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(79, 130, 255, 0.12), transparent 32rem),
    linear-gradient(180deg, #060a0e 0%, #091015 46%, #06090d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  z-index: -1;
}

a { color: inherit; text-decoration: none; }

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

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(6, 10, 14, 0.74);
  border-bottom: 1px solid var(--line-soft);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(55,240,205,0.20), rgba(255,255,255,0.04));
  color: var(--accent-2);
  box-shadow: 0 0 32px rgba(55, 240, 205, 0.12);
  font-weight: 900;
}

.brand strong { display: block; font-size: 15px; letter-spacing: 0.01em; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 13px;
  border-radius: 999px;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-weight: 900;
  font-size: 24px;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-1px); border-color: rgba(120, 255, 225, 0.45); background: rgba(255,255,255,0.075); }
.button.primary { background: linear-gradient(135deg, var(--accent), #68ffe2); color: #04100e; border-color: transparent; box-shadow: 0 18px 50px rgba(55,240,205,0.19); }
.button.ghost { color: var(--accent-2); }

.hero {
  padding: 74px 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 38px;
  align-items: center;
}

.kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 900;
  font-size: 12px;
}

.eyebrow { color: #a8d9d1; display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 18px rgba(55,240,205,0.9); }

h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -0.05em; }

.hero h1 {
  font-size: clamp(54px, 8vw, 50px);
  max-width: 820px;
}

.hero h1 .muted-line { display: block; }
.hero h1 .title-line { display: block; color: var(--accent-2); }

.lead {
  margin: 24px 0 0;
  color: #c6dbd7;
  max-width: 720px;
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.large { margin-top: 18px; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(55,240,205,0.10);
  border: 1px solid rgba(55,240,205,0.20);
  color: #7effe1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hero-tags { margin-top: 24px; }

.proof-board {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.02)),
    rgba(9, 15, 21, 0.76);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
}

.proof-board::after {
  content: "";
  position: absolute;
  inset: auto -20% -38% -20%;
  height: 55%;
  background: radial-gradient(circle, rgba(55,240,205,0.14), transparent 68%);
  pointer-events: none;
}

.proof-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 900;
}

.window-dots { display: flex; gap: 6px; }
.window-dots span {
  width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.25);
}
.window-dots span:nth-child(1) { background: #ff6f7d; }
.window-dots span:nth-child(2) { background: #ffd56f; }
.window-dots span:nth-child(3) { background: var(--accent); }

.proof-mosaic {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 180px 126px 126px;
  gap: 12px;
  z-index: 1;
}

.proof-tile {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: #0e151d;
}

.proof-tile.large { grid-row: span 2; }
.proof-tile.wide { grid-column: span 2; }

.proof-tile img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.82;
  filter: blur(1.1px) saturate(1.05);
  transform: scale(1.02);
}

.proof-tile:hover img { filter: blur(0); opacity: 1; }

.proof-tile-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(4, 8, 12, 0.68);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.section { padding: 56px 0; }
.section.compact { padding-top: 20px; }

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: clamp(34px, 4.3vw, 48px);
  max-width: 760px;
}

.section-header p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 460px;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 34px;
}

.stat-card {
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(255,255,255,0.045);
}
.stat-card strong { display: block; font-size: 26px; letter-spacing: -0.04em; }
.stat-card span { display: block; margin-top: 8px; color: var(--muted); line-height: 1.35; font-size: 13px; }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.skill-card,
.detail-card,
.credential-card,
.contact-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0,0,0,0.22);
}

.skill-card { padding: 24px; }
.skill-card h3 { font-size: 22px; }
.skill-card p { color: var(--muted); line-height: 1.65; margin: 14px 0 0; }

.skill-cloud-panel {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 25, 22, 0.58);
}

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

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(8, 20, 25, 0.76);
  box-shadow: 0 20px 60px rgba(0,0,0,0.26);
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 255, 225, 0.45);
  background: rgba(10, 28, 33, 0.88);
}

.project-image-link { display: block; height: 230px; background: #081016; border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.project-image-link img { width: 100%; height: 100%; object-fit: cover; filter: blur(0.6px) saturate(1.05); opacity: 0.92; transform: scale(1.01); }
.project-card:hover .project-image-link img { filter: blur(0); opacity: 1; }

.project-card-body { padding: 22px; }
.project-card h3 { font-size: 28px; letter-spacing: -0.06em; }
.project-card p:not(.eyebrow) { color: #b9ceca; line-height: 1.65; margin: 15px 0 18px; }

.credential-section {
  display: grid;
  grid-template-columns: auto;
  gap: 18px;
  align-items: stretch;
}

.credential-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 28px;
  text-align: -webkit-center;
}
.credential-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(15deg, rgba(5, 13, 18, 0.88) 0%, rgba(5, 13, 18, 0.72) 40%, rgba(5, 13, 18, 0.22) 100%), url("../img/projects/degree-blurred.webp") center/cover no-repeat;
  filter: saturate(0.9);
  transform: scale(1.02);
}
.credential-card > * { position: relative; z-index: 1; max-width: 420px; }
.credential-card h2 { font-size: clamp(34px, 4vw, 54px); }
.credential-card p { color: #c2d8d4; line-height: 1.7; }

.proof-note {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.045);
  padding: 28px;
}
.proof-note h3 { font-size: 28px; }
.proof-note ul { margin: 18px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }

.contact-card {
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(55,240,205,0.08), rgba(255,255,255,0.035));
}
.contact-card h2 { font-size: clamp(34px, 4vw, 54px); max-width: 780px; }
.contact-card p { color: var(--muted); line-height: 1.7; max-width: 720px; }

.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 40px;
  padding: 28px 0;
  color: var(--muted);
}
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-row a { color: var(--accent-2); font-weight: 900; }

.page-hero {
  padding: 70px 0 26px;
}
.page-hero h1 { font-size: clamp(48px, 7vw, 52px); max-width: 980px; }
.page-hero p { color: #c5dbd8; max-width: 780px; line-height: 1.7; font-size: 20px; }

.project-workbench {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

.project-tabs {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 10px;
}

.project-tab {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
  color: var(--text);
  text-align: left;
  padding: 16px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.project-tab:hover { transform: translateX(3px); border-color: rgba(120,255,225,0.28); }
.project-tab.active { background: rgba(55,240,205,0.11); border-color: rgba(120,255,225,0.45); }
.project-tab span { display: block; color: var(--accent-2); font-size: 12px; font-weight: 900; margin-bottom: 8px; }
.project-tab strong { display: block; font-size: 16px; }
.project-tab small { display: block; color: var(--muted); margin-top: 5px; }

.project-panels { min-width: 0; }
.project-detail-panel { display: none; }
.project-detail-panel.active { display: block; }

.project-detail-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(8, 20, 25, 0.78);
  padding: 24px;
  box-shadow: var(--shadow);
}
.project-detail-hero h2 { font-size: clamp(36px, 4.8vw, 66px); }
.project-detail-hero p:not(.eyebrow) { color: #c6dbd7; line-height: 1.7; font-size: 17px; }

.proof-image {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line-soft);
  background: #081016;
}
.proof-image img { width: 100%; height: 100%; object-fit: cover; transition: filter 160ms ease, opacity 160ms ease; }
.hero-proof-image { min-height: 380px; }
.hero-proof-image img { filter: blur(0.6px) saturate(1.05); opacity: 0.96; }
.proof-image:hover img { filter: blur(0); opacity: 1; }

.project-detail-grid {
  display: grid;
  grid-template-columns: auto;
  gap: 16px;
  margin-top: 18px;
}
.detail-card { padding: 24px; }
.detail-card h3 { font-size: 26px; }
.detail-card ul { margin: 16px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.detail-card p { color: var(--muted); line-height: 1.75; }
.replace-card { border-color: rgba(245,207,111,0.22); background: rgba(245,207,111,0.045); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.gallery-grid .proof-image { min-height: 230px; }
.gallery-grid .proof-image img { filter: blur(0.85px); opacity: 0.9; }
.gallery-grid .proof-image:hover img { filter: blur(0); opacity: 1; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1020px) {
  .hero-grid,
  .credential-section,
  .project-workbench,
  .project-detail-hero {
    grid-template-columns: 1fr;
  }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .skill-grid,
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-tabs { position: static; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .container { width: min(100% - 24px, var(--max)); }
  .nav { height: auto; padding: 14px 0; align-items: flex-start; }
  .brand span { display: none; }
  .nav-links { flex-wrap: wrap; justify-content: end; }
  .nav-links a { padding: 8px 9px; }
  .hero { padding-top: 44px; }
  .proof-board { min-height: 420px; }
  .proof-mosaic { grid-template-columns: 1fr; grid-template-rows: repeat(4, 120px); }
  .proof-tile.large,
  .proof-tile.wide { grid-row: auto; grid-column: auto; }
  .stats-grid,
  .skill-grid,
  .project-grid,
  .project-tabs,
  .project-detail-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .section-header { display: block; }
  .section-header p { margin-top: 16px; }
  .contact-card { grid-template-columns: 1fr; }
  .hero-proof-image { min-height: 260px; }
}


/* Brand logo image */
.brand-mark {
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


/* In-page image preview */
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox.active {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 8, 12, 0.86);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  max-height: 92vh;
  margin: 0;
  border: 1px solid rgba(64, 224, 208, 0.24);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(8, 16, 22, 0.96);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.65), 0 0 55px rgba(45, 234, 207, 0.12);
}

.lightbox-frame img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  background: #050b10;
}

.lightbox-frame figcaption {
  padding: 12px 18px 14px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line-soft);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(64, 224, 208, 0.28);
  color: var(--text);
  background: rgba(5, 12, 17, 0.78);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

.lightbox-close:hover {
  border-color: rgba(64, 224, 208, 0.65);
  color: var(--accent);
}

.proof-image[data-lightbox-src] {
  cursor: zoom-in;
}


/* Clickable project cards */
.project-card[data-project-card-id] {
  cursor: pointer;
}

.project-card[data-project-card-id]:focus-visible {
  outline: 2px solid var(--accent, #37f5d1);
  outline-offset: 4px;
}

/* Contact and footer link groups */
.contact-actions,
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links {
  justify-content: flex-end;
}
