:root {
  --bg: #0a0a0b;
  --bg-elev: #101013;
  --surface: #151518;
  --surface-2: #1c1c20;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f6;
  --text-dim: #a1a1a6;
  --text-faint: #6e6e73;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --radius: 14px;
  --max: 1160px;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.scrolled { border-color: var(--border); }

.nav__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.nav__logo-mark { color: var(--accent); }
.nav__logo:hover { border-color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 36px; }
.nav__links a { font-size: 14px; font-weight: 500; color: var(--text-dim); transition: color 0.25s ease; }
.nav__links a:hover { color: var(--text); }

.nav__links--cta {
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 999px;
  transition: border-color 0.25s ease, background 0.25s ease !important;
}
.nav__links--cta:hover { border-color: var(--accent); background: var(--accent-soft); }

.nav__toggle { display: none; flex-direction: column; gap: 6px; padding: 10px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 12px 24px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.nav__mobile a { padding: 14px 0; font-weight: 600; color: var(--text); font-family: var(--font-display); border-bottom: 1px solid var(--border); }

/* ---------- HERO ---------- */
.hero { padding: 176px 0 120px; position: relative; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(64px, 9vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero__name span { display: block; }

.hero__intro {
  margin-top: 34px;
  max-width: 540px;
  font-size: 19px;
  color: var(--text-dim);
  font-weight: 400;
}
.hero__support {
  margin-top: 18px;
  max-width: 540px;
  font-size: 15px;
  color: var(--text-faint);
}

.hero__actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #2f6fe0; transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-faint); transform: translateY(-2px); }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
}
.hero__meta li {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero__visual { display: flex; flex-direction: column; gap: 24px; }

.photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 4 / 5;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.photo__frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 70%, rgba(10,10,11,0.55));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.photo::before {
  content: "";
  position: absolute;
  top: -24px; right: -24px;
  width: 160px; height: 160px;
  background: var(--accent);
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
}

.hero__caption {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-faint);
}
.hero__caption-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

/* ---------- SECTIONS ---------- */
.section { padding: 110px 0; }
.section--alt { background: var(--bg-elev); }

.section__head { max-width: 620px; margin-bottom: 64px; }
.section__head--center { text-align: center; margin-left: auto; margin-right: auto; }

.section__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section__desc { margin-top: 20px; font-size: 17px; color: var(--text-dim); }

/* ---------- PROJECTS ---------- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease;
}
.project:hover { transform: translateY(-6px); border-color: var(--accent-soft); }

.project__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project:hover .project__media img { transform: scale(1.05); }

.project__media-label {
  position: absolute;
  bottom: 14px; left: 14px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: rgba(10,10,11,0.7);
  backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.project__body { padding: 26px; }
.project__title { font-family: var(--font-display); font-size: 23px; font-weight: 700; margin-bottom: 10px; }
.project__desc { font-size: 15px; color: var(--text-dim); margin-bottom: 20px; }
.project__tech { display: flex; flex-wrap: wrap; gap: 8px; }
.project__tech li {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #a9c9ff;
  padding: 5px 12px;
  border-radius: 999px;
}
.project__link {
  display: inline-flex;
  align-items: center;
  margin-top: 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.project__link:hover { background: #2f6fe0; transform: translateY(-2px); }
.project__media--empty {
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.12), transparent 55%),
    var(--surface-2);
}

/* ---------- CERTIFICATES ---------- */
.certificates { background: var(--bg-elev); }

.certs__list { display: flex; flex-direction: column; }

.cert {
  display: grid;
  grid-template-columns: 160px 72px 1fr;
  gap: 28px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--border);
}
.cert:last-child { border-bottom: 1px solid var(--border); }

.cert__img-wrap {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.cert__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert__cell--num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  padding-top: 4px;
}

.cert__title { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.cert__desc { font-size: 15px; color: var(--text-dim); max-width: 560px; }

.cert__cell--org {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 6px;
}

/* ---------- CONTACT ---------- */
.contact__list {
  display: flex;
  flex-direction: column;
  max-width: 620px;
  margin: 0 auto;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.contact__link:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

.contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.contact__link:hover .contact__icon { color: var(--accent); border-color: var(--accent); }

.contact__label { font-size: 15px; font-weight: 600; color: var(--text); min-width: 84px; }
.contact__value { font-size: 15px; color: var(--text-dim); margin-left: auto; }

/* ---------- FOOTER ---------- */
.footer { padding: 48px 0; border-top: 1px solid var(--border); }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__name { font-family: var(--font-display); font-weight: 600; }
.footer__copy { font-size: 14px; color: var(--text-faint); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__visual { order: -1; max-width: 440px; }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 150px 0 80px; }
  .section { padding: 80px 0; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__mobile.open { display: flex; }
  .projects__grid { grid-template-columns: 1fr; }
  .cert { grid-template-columns: 56px 1fr; gap: 14px 20px; align-items: start; }
  .cert__img-wrap { grid-column: 1 / -1; max-width: 340px; }
  .contact__value { display: none; }
  .contact__label { margin-left: auto; text-align: right; }
  .footer__inner { flex-direction: column; text-align: center; }
}

/* ---------- LIGHTBOX ---------- */
.project__media img,
.cert__img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.open .lightbox__backdrop { opacity: 1; }

.lightbox__figure {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 88vh;
  margin: 0;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lightbox.open .lightbox__figure { opacity: 1; transform: scale(1); }

.lightbox__figure img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #f5f5f6;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.05); }

body.lightbox-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; animation: none !important; }
}
