/* ═══════════════════════════════════════════════════════════════
   SLATE & EMERALD PRECISION — Design System
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  /* Surfaces */
  --surface:                #101415;
  --surface-dim:            #101415;
  --surface-bright:         #363a3b;
  --surface-container-lowest:#0b0f10;
  --surface-container-low:  #191c1e;
  --surface-container:      #1d2022;
  --surface-container-high: #272a2c;
  --surface-container-highest:#323537;
  --on-surface:             #e0e3e5;
  --on-surface-variant:     #bbcabf;
  --outline:                #86948a;
  --outline-variant:        #3c4a42;
  --surface-variant:        #323537;

  /* Primary — Emerald */
  --primary:                #4edea3;
  --on-primary:             #003824;
  --primary-container:      #10b981;
  --inverse-primary:        #006c49;

  /* Secondary — Muted Slate */
  --secondary:              #b9c7e0;
  --secondary-container:    #3c4a5e;

  /* Background */
  --background:             #101415;
  --on-background:          #e0e3e5;

  /* Error */
  --error:                  #ffb4ab;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --container-max:  1280px;
  --gutter:         24px;
  --margin-desktop: 64px;
  --margin-mobile:  20px;
  --stack-sm:       8px;
  --stack-md:       24px;
  --stack-lg:       80px;

  /* Radius */
  --r-sm:   0.25rem;
  --r:      0.5rem;
  --r-md:   0.75rem;
  --r-lg:   1rem;
  --r-xl:   1.5rem;
  --r-full: 9999px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--background);
  color: var(--on-surface);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ── Typography ── */
.headline-xl {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.headline-lg {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.headline-md {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}
.body-lg { font-size: 1.125rem; font-weight: 400; line-height: 1.6; }
.body-md { font-size: 1rem; font-weight: 400; line-height: 1.6; }
.label-sm {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.accent { color: var(--primary); }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease-out), filter 0.2s var(--ease-out), background 0.2s, border-color 0.2s;
}
.btn:hover { transform: scale(1.02); filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn--ghost {
  background: transparent;
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn--sm { padding: 10px 22px; font-size: 0.875rem; }
.btn--full { width: 100%; }

/* ── Chips ── */
.chip {
  display: inline-block;
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--r-sm);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }

/* ══════════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(16,20,21,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--outline-variant);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-right: auto;
  color: var(--on-surface);
}
.nav__links {
  display: flex;
  gap: 32px;
}
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--primary); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-surface);
  border-radius: var(--r-full);
  transition: transform 0.3s, opacity 0.3s;
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__drawer {
  display: none;
  flex-direction: column;
  background: var(--surface-container-low);
  border-bottom: 1px solid var(--outline-variant);
  padding: 16px var(--gutter);
  gap: 4px;
}
.nav__drawer.open { display: flex; }
.drawer-link {
  padding: 12px 0;
  font-weight: 500;
  color: var(--on-surface-variant);
  border-bottom: 1px solid var(--outline-variant);
  transition: color 0.2s;
}
.drawer-link:last-child { border-bottom: none; }
.drawer-link:hover { color: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 96px;
  overflow: hidden;
}
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--outline-variant) 1px, transparent 1px),
    linear-gradient(90deg, var(--outline-variant) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.12;
}
.hero__glow {
  position: absolute;
  border-radius: var(--r-full);
  filter: blur(120px);
  pointer-events: none;
}
.hero__glow--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(78,222,163,0.15) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.hero__glow--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(185,199,224,0.08) 0%, transparent 70%);
  bottom: -80px; left: -80px;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-block: var(--stack-lg);
  position: relative;
  z-index: 1;
}
.hero__eyebrow {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--stack-md);
}
.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px; height: 2px;
  background: var(--primary);
}
.hero__name {
  color: var(--on-surface);
  margin-bottom: 12px;
}
.hero__title {
  color: var(--on-surface-variant);
  margin-bottom: var(--stack-md);
}
.hero__bio {
  color: var(--on-surface-variant);
  max-width: 480px;
  margin-bottom: 40px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero__stats { display: flex; align-items: center; gap: 32px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; line-height: 1; }
.stat__label { color: var(--on-surface-variant); }
.stat__divider { width: 1px; height: 40px; background: var(--outline-variant); }

/* Photo */
.hero__photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__photo-ring {
  position: absolute;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(78,222,163,0.25);
  animation: pulseRing 3s ease-in-out infinite;
}
.hero__photo-ring { width: 420px; height: 420px; }
.hero__photo-ring--2 {
  width: 360px; height: 360px;
  border-color: rgba(78,222,163,0.12);
  animation-delay: 1.5s;
}
@keyframes pulseRing {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.04); opacity: 0.6; }
}
.hero__photo {
  width: 377px;
  height: 387px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 2px solid var(--outline-variant);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(78,222,163,0.1);
  position: relative;
  z-index: 2;
  transition: transform 0.4s var(--ease-out);
}
.hero__photo-wrap:hover .hero__photo { transform: translateY(-6px); }

.hero__badge {
  position: absolute;
  bottom: 20px;
  right: -10px;
  background: var(--surface-container-high);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-full);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
  backdrop-filter: blur(10px);
}
.hero__badge-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: var(--r-full);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.hero__scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounce 2s ease-in-out infinite;
  z-index: 2;
}
.hero__scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--outline);
  border-bottom: 2px solid var(--outline);
  transform: rotate(45deg);
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════ */
.section {
  padding-block: var(--stack-lg);
}
.section--alt {
  background: var(--surface-container-lowest);
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-label {
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}
.section-label::before, .section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--outline-variant);
}

/* ══════════════════════════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════════════════════════ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: center;
}
.about__img-wrap {
  position: relative;
}
.about__img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border-radius: var(--r-xl);
  border: 2px solid var(--outline-variant);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.about__img-decor {
  position: absolute;
  bottom: -16px;

  width: 60%;
  aspect-ratio: 1;
  border: 2px solid var(--outline-variant);
  border-radius: var(--r-xl);
  z-index: -1;
  background: linear-gradient(135deg, rgba(78,222,163,0.05) 0%, transparent 60%);
}
.about__para { color: var(--on-surface-variant); margin-bottom: var(--stack-md); }
.about__para strong { font-weight: 600; }
.about__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--stack-md); }
.about__cta { margin-top: 8px; }

/* ══════════════════════════════════════════════════════════════
   SKILLS
   ══════════════════════════════════════════════════════════════ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-card {
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.skill-card:hover {
  border-color: rgba(78,222,163,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(78,222,163,0.1);
  transform: translateY(-4px);
}
.skill-card__icon {
  width: 48px; height: 48px;
  color: var(--primary);
  margin-bottom: var(--stack-md);
}
.skill-card__icon svg { width: 100%; height: 100%; }
.skill-card__title { color: var(--on-surface); margin-bottom: 16px; font-size: 1.125rem; }
.skill-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════════════════════════════════════════════════════════
   PROJECTS
   ══════════════════════════════════════════════════════════════ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.project-card {
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.project-card:hover {
  border-color: rgba(78,222,163,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transform: translateY(-6px);
}
.project-card__img-wrap { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.project-card__img {
  width: 100%; height: 100%;
  transition: transform 0.5s var(--ease-out);
  background-size: cover;
  background-position: center;
}
.project-card:hover .project-card__img { transform: scale(1.06); }
.project-card__img--1 {
  background: linear-gradient(135deg, #1a3a2a 0%, #0d2418 40%, #10b981 100%);
  position: relative;
}
.project-card__img--1::after {
  content: '🛒';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; opacity: 0.4;
}
.project-card__img--2 {
  background: linear-gradient(135deg, #1a2030 0%, #0d1525 40%, #4edea3 100%);
}
.project-card__img--2::after {
  content: '📊';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; opacity: 0.4;
}
.project-card__img--3 {
  background: linear-gradient(135deg, #1a1530 0%, #0d0a20 40%, #b9c7e0 100%);
}
.project-card__img--3::after {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; opacity: 0.4;
}
.project-card__img--4 {
  background: linear-gradient(135deg, #1a2a1a 0%, #0d1a0d 40%, #4edea3 100%);
}
.project-card__img--4::after {
  content: '🤖';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; opacity: 0.4;
}
.project-card__overlay {
  
  position: absolute;
  inset: 0;
  background: rgba(16,20,21,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.project-card:hover .project-card__overlay { opacity: 1; }
.project-card__body { padding: 28px; }
.project-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.project-card__title { color: var(--on-surface); margin-bottom: 10px; font-size: 1.125rem; }
.project-card__desc { color: var(--on-surface-variant); }

/* ══════════════════════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════════════════════ */
.contact__sub {
  color: var(--on-surface-variant);
  max-width: 520px;
  margin-inline: auto;
  margin-top: var(--stack-md);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}
.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.contact__icon {
  width: 44px; height: 44px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.contact__icon svg { width: 20px; height: 20px; }
.contact__label { color: var(--outline); margin-bottom: 4px; }
.contact__link { color: var(--on-surface-variant); transition: color 0.2s; }
.contact__link:hover { color: var(--primary); }
.contact__socials { display: flex; gap: 12px; margin-top: 8px; }
.social-btn {
  width: 44px; height: 44px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: var(--on-surface-variant);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(78,222,163,0.08);
  transform: translateY(-2px);
}

/* Form */
.contact__form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { color: var(--outline); }
.form-input {
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r);
  padding: 14px 16px;
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input::placeholder { color: var(--outline); }
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78,222,163,0.1);
}
.form-textarea { min-height: 140px; resize: vertical; }

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 600;
  padding: 16px;
  background: rgba(78,222,163,0.08);
  border: 1px solid rgba(78,222,163,0.3);
  border-radius: var(--r);
}
.form-success svg { width: 20px; height: 20px; flex-shrink: 0; }
.form-success.show { display: flex; }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--outline-variant);
  padding-block: 32px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy { color: var(--on-surface-variant); }
.footer__top {
  width: 44px; height: 44px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: var(--on-surface-variant);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.footer__top svg { width: 18px; height: 18px; }
.footer__top:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { gap: 40px; }
  .about__grid { gap: 48px; }
}

@media (max-width: 768px) {
  :root { --stack-lg: 60px; }

  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; margin-left: auto; }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    padding-top: 40px;
  }
  .hero__text { order: 2; }
  .hero__photo-wrap { order: 1; }
  .hero__eyebrow { justify-content: center; }
  .hero__bio { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__stats { justify-content: center; }
  .hero__photo { width: 267px; height: 252px; }
  .hero__photo-ring { width: 300px; height: 300px; }
  .hero__photo-ring--2 { width: 260px; height: 260px; }
  .hero__badge { right: 10px; }

  .about__grid { grid-template-columns: 1fr; }
  .about__img { max-width: 100%; }
  .about__img-decor { display: none; }

  .skills__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }

  .section-label::before, .section-label::after { display: none; }
}

@media (max-width: 480px) {
  .hero__stats { gap: 20px; }
  .stat__num { font-size: 1.5rem; }
  .footer__inner { flex-direction: column; gap: 16px; text-align: center; }
}
