/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg:           #080808;
  --bg-2:         #0f0f0f;
  --text:         #e8e8e8;
  --text-muted:   #666;
  --accent:       #1abc9c;
  --accent-dim:   rgba(26, 188, 156, 0.12);
  --border:       rgba(255, 255, 255, 0.07);
  --radius:       12px;
  --max-w:        1100px;
  --pad-section:  clamp(80px, 12vw, 140px);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 5vw, 64px);
  transition: padding 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.nav__links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav__links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s;
}

.nav__links a:hover { color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background layer */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Subtle grid */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* Ambient blobs — parallax via JS */
.hero__shape {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.hero__shape--1 {
  width: clamp(400px, 50vw, 700px);
  height: clamp(400px, 50vw, 700px);
  background: radial-gradient(circle, rgba(26,188,156,0.22) 0%, transparent 70%);
  top: -20%;
  right: -15%;
}

.hero__shape--2 {
  width: clamp(300px, 35vw, 500px);
  height: clamp(300px, 35vw, 500px);
  background: radial-gradient(circle, rgba(52,152,219,0.14) 0%, transparent 70%);
  bottom: -10%;
  left: -10%;
}

.hero__shape--3 {
  width: clamp(150px, 18vw, 260px);
  height: clamp(150px, 18vw, 260px);
  background: radial-gradient(circle, rgba(26,188,156,0.16) 0%, transparent 70%);
  top: 35%;
  left: 20%;
}

/* Content */
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 clamp(24px, 5vw, 40px);
}

.hero__greeting {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(44px, 9vw, 104px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease 0.5s forwards;
}

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

.hero__title {
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 52px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease 0.7s forwards;
}

.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease 0.9s forwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s, color 0.25s;
}

.btn--primary {
  background: var(--accent);
  color: #080808;
}

.btn--primary:hover {
  background: #17a589;
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn--outline:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
  transform: translateY(-2px);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  opacity: 0;
  animation: fadeUp 0.6s ease 1.3s forwards;
}

.hero__scroll span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--text-muted) 0%, transparent 100%);
  transform-origin: top;
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: var(--pad-section) 0;
  position: relative;
}

.about__inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(48px, 8vw, 100px);
  align-items: center;
}

.about__image-wrap {
  position: relative;
}

.about__image-accent {
  position: absolute;
  inset: -24px -24px 24px 24px;
  border: 1px solid rgba(26,188,156,0.2);
  border-radius: var(--radius);
  z-index: 0;
}

.about__image {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.4s;
}

.about__image:hover { filter: none; }

.about__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.about__content .section-title {
  margin-bottom: 28px;
}

.about__text {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 16px;
}

.about__github-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}

.about__github-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.about__github-link .arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.25s;
}

.about__github-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.about__github-link:hover .arrow {
  transform: translateX(4px);
}

/* Divider */
.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: clamp(24px, 5vw, 64px);
  right: clamp(24px, 5vw, 64px);
  height: 1px;
  background: var(--border);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: var(--pad-section) 0;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: clamp(24px, 5vw, 64px);
  right: clamp(24px, 5vw, 64px);
  height: 1px;
  background: var(--border);
}

.contact__inner {
  text-align: center;
}

.contact__inner .section-title {
  margin-bottom: 20px;
}

.contact__subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 64px;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 28px);
  flex-wrap: wrap;
}

.contact__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(28px, 4vw, 40px) clamp(28px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  color: var(--text-muted);
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s;
  cursor: pointer;
}

.contact__link:hover {
  color: var(--accent);
  border-color: rgba(26,188,156,0.35);
  background: var(--accent-dim);
  transform: translateY(-6px);
}

.contact__link-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact__link-icon svg {
  width: 28px;
  height: 28px;
}

.contact__link-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.contact__link-handle {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.7;
}

.contact__link:hover .contact__link-handle {
  opacity: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 32px clamp(24px, 5vw, 64px);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 0.9; transform: scaleY(0.6); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .about__inner {
    grid-template-columns: 1fr;
  }

  .about__image-wrap {
    max-width: 260px;
    margin: 0 auto;
  }

  .about__content {
    align-items: center;
    text-align: center;
  }

  .about__github-link {
    margin: 24px auto 0;
  }

  .nav__links {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .contact__links {
    flex-direction: column;
    align-items: center;
  }

  .contact__link {
    width: 100%;
    max-width: 300px;
    flex-direction: row;
    gap: 20px;
    padding: 20px 28px;
  }

  .contact__link-label,
  .contact__link-handle {
    text-align: left;
  }
}
