/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Custom Properties
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --accent: #00e87a;
  --accent-dim: rgba(0, 232, 122, 0.08);
  --accent-border: rgba(0, 232, 122, 0.2);
  --radius: 10px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1100px;
  --nav-h: 60px;
  --font-display: 'Cabinet Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-alt: #0e0e11;
  --surface: #18181b;
  --card: #1a1a1e;
  --card-hover: #222226;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #52525b;
  --glass: rgba(9, 9, 11, 0.82);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-alt: #f4f4f5;
  --surface: #ffffff;
  --card: #ffffff;
  --card-hover: #fafafa;
  --border: rgba(0, 0, 0, 0.07);
  --border-hover: rgba(0, 0, 0, 0.14);
  --text: #09090b;
  --text-2: #71717a;
  --text-3: #a1a1aa;
  --glass: rgba(250, 250, 250, 0.86);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  --accent: #059669;
  --accent-dim: rgba(5, 150, 105, 0.07);
  --accent-border: rgba(5, 150, 105, 0.18);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Reset
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Utilities
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.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: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Navigation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--nav-h);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.nav__link {
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover {
  color: var(--text);
  background: var(--surface);
}
.nav__link.is-active {
  color: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav__theme {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: grid;
  place-items: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.nav__theme:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.nav__theme svg { width: 16px; height: 16px; }

.nav__cta {
  padding: 8px 18px;
  background: var(--accent);
  color: #000;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.nav__cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  flex-shrink: 0;
}
.nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
  margin: 0 auto;
}
.nav__burger.is-open span:first-child {
  transform: rotate(45deg) translate(2.5px, 2.5px);
}
.nav__burger.is-open span:last-child {
  transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* Mobile menu */
.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 16px clamp(20px, 5vw, 48px) 24px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.nav__mobile.is-open {
  display: flex;
}
.nav__mobile a {
  padding: 12px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { color: var(--text); }
.nav__mobile-cta {
  margin-top: 8px;
  padding: 12px 0 !important;
  color: var(--accent) !important;
  font-weight: 600 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Buttons
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #000;
}
.btn--primary:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}
.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Hero
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
}
.hero .container {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
  width: 100%;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 40px;
}
.hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-bottom: 32px;
}
.hero__accent { color: var(--accent); }

.hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 400;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero__stats {
  display: flex;
  gap: clamp(32px, 5vw, 56px);
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 0.6875rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Sections
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section {
  padding: clamp(72px, 10vw, 128px) 0;
}
.section--alt { background: var(--bg-alt); }

.section__header {
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 500px;
  line-height: 1.75;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Projects Grid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.projects__more {
  margin-top: 48px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Project Cards
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

/* Accent top line on hover */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover::after { transform: scaleX(1); }

/* Visual preview */
.card__visual {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.card__watermark {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  opacity: 0.1;
  color: #fff;
  user-select: none;
  white-space: nowrap;
}

/* Badges */
.card__badges {
  position: absolute;
  top: 10px; right: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--live {
  background: rgba(0, 232, 122, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 232, 122, 0.25);
}
.badge__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
.badge--feat {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

/* Card body */
.card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card__category {
  font-size: 0.6875rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.card__desc {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

/* Tags */
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tag {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-3);
}

/* Card actions */
.card__actions {
  display: flex;
  gap: 16px;
}
.card__actions a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s;
}
.card__actions a:hover { color: var(--accent); }

/* Featured card */
.card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.card--featured .card__visual {
  width: 40%;
  height: auto;
  min-height: 280px;
}
.card--featured .card__watermark {
  font-size: 6rem;
}
.card--featured .card__body {
  padding: 32px;
  justify-content: center;
}
.card--featured .card__title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.card--featured .card__desc {
  font-size: 0.9375rem;
  max-width: 480px;
  margin-bottom: 20px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   About
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.about__text {
  color: var(--text-2);
  line-height: 1.8;
}
.about__text p + p { margin-top: 16px; }
.about__text strong { color: var(--text); font-weight: 600; }

.skills__group { margin-bottom: 32px; }
.skills__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}
.skill:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.cert {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
}
.cert__title {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 4px;
  display: block;
}
.cert__meta {
  font-size: 0.75rem;
  color: var(--text-3);
  display: block;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Contact
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.contact__card {
  max-width: 640px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
}

.contact__intro {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 28px;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.contact__item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.contact__label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.contact__value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Footer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-3);
}
.footer__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.9375rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.footer__logo span { color: var(--accent); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Animations
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Responsive — Tablet
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 900px) {
  .card--featured {
    flex-direction: column;
  }
  .card--featured .card__visual {
    width: 100%;
    height: 180px;
    min-height: unset;
  }
  .card--featured .card__body {
    padding: 24px;
  }
  .card--featured .card__title {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .hero__title {
    font-size: clamp(2.8rem, 11vw, 5rem);
  }
  .hero__stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .projects__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card--featured {
    grid-column: 1;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Responsive — Small Mobile
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }
  .hero__badge {
    font-size: 0.75rem;
    padding: 5px 12px 5px 8px;
  }
  .hero__actions {
    flex-direction: column;
    margin-bottom: 40px;
  }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__stats {
    gap: 20px;
  }
  .stat__num { font-size: 1.25rem; }
  .stat__label { font-size: 0.625rem; }

  .section { padding: clamp(56px, 8vw, 80px) 0; }
  .section__header { margin-bottom: 40px; }

  .card__visual { height: 110px; }
  .card__watermark { font-size: 3.5rem; }
  .card__body { padding: 16px; }
  .card__title { font-size: 1rem; }
  .card__desc { font-size: 0.875rem; }
  .tag { font-size: 0.625rem; padding: 2px 8px; }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Accessibility
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}
