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

:root {
  --bg:          #0a0a0f;
  --bg-2:        #11111a;
  --bg-card:     #14141f;
  --accent:      #e94560;
  --accent-2:    #7c3aed;
  --text:        #e2e2ef;
  --text-muted:  #6b6b8a;
  --border:      rgba(255,255,255,0.07);
  --radius:      12px;
  --radius-lg:   20px;
  --nav-h:       64px;
  --transition:  0.3s cubic-bezier(0.4,0,0.2,1);
  --font-sans:   'Inter', system-ui, sans-serif;
  --font-display:'Space Grotesk', system-ui, sans-serif;
}

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

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

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

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===========================
   LAYOUT
=========================== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; }

.section-header { margin-bottom: 56px; }

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

/* ===========================
   NAVIGATION
=========================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.nav__logo .dot { color: var(--accent); }

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

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav__links a:hover { color: #fff; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}

.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
}

.hero__glow--1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -100px; left: -100px;
}

.hero__glow--2 {
  width: 500px; height: 500px;
  background: var(--accent-2);
  bottom: -100px; right: -50px;
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 0 24px;
  max-width: 800px;
  animation: fadeUp 0.9s ease both;
}

.hero__eyebrow {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: #ff6b85;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233,69,96,0.35);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

/* ===========================
   ABOUT
=========================== */
.about {
  background: var(--bg-2);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: start;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
  max-width: 560px;
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.skill-tag {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  text-align: center;
  min-width: 160px;
}

.stat-card__number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===========================
   PROJECTS
=========================== */
.projects__filters {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* Project card */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.5s ease both;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(233,69,96,0.35);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.project-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-2);
}

.project-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.project-card__badge {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--subdomain {
  background: rgba(233,69,96,0.15);
  color: var(--accent);
  border: 1px solid rgba(233,69,96,0.3);
}

.badge--subfolder {
  background: rgba(124,58,237,0.15);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.3);
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card__tag {
  padding: 3px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.project-card__year {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}

.project-card__link:hover { gap: 10px; }

.project-card__link svg {
  width: 14px; height: 14px;
}

.project-card--hidden { display: none; }

/* Loading spinner */
.projects__loading {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===========================
   CONTACT
=========================== */
.contact {
  background: var(--bg-2);
}

.contact__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.contact__text {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 480px;
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  transition: color var(--transition);
}

.contact__email:hover { color: var(--accent); }

.contact__socials {
  display: flex;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: var(--transition);
}

.social-link svg { width: 20px; height: 20px; }

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(233,69,96,0.08);
  transform: translateY(-3px);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .nav__links { display: none; }

  .nav__burger { display: flex; }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(16px);
    padding: 24px;
    gap: 24px;
    border-bottom: 1px solid var(--border);
  }

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

  .about__stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .stat-card { flex: 1; min-width: 120px; }

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

  .section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .hero__cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
