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

:root {
  --bg: #07070d;
  --bg-alt: #0a0a16;
  --surface: #0e0e20;
  --surface-hover: #161630;
  --accent: #6c5ce7;
  --accent-dim: rgba(108, 92, 231, 0.12);
  --accent-light: #8b7cf7;
  --cyan: #00d4ff;
  --text: #f0f0f5;
  --text-secondary: #9898b8;
  --text-muted: #5c5c7a;
  --border: rgba(108, 92, 231, 0.1);
  --glass: rgba(14, 14, 32, 0.85);
  --radius: 16px;
  --radius-lg: 24px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
video { max-width: 100%; display: block; }

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

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ====== NAV ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 10px 28px;
  border-radius: 999px;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  background: var(--accent);
  color: #fff !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.nav-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.35);
}

.nav-cta::after { display: none !important; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 30% 10%, rgba(108, 92, 231, 0.12), transparent),
    radial-gradient(ellipse 50% 50% at 70% 90%, rgba(0, 212, 255, 0.06), transparent);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: orbFloat 10s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px; height: 500px;
  background: rgba(108, 92, 231, 0.2);
  top: -150px; right: -100px;
}

.orb-2 {
  width: 400px; height: 400px;
  background: rgba(0, 212, 255, 0.12);
  bottom: -100px; left: -80px;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-image-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 28px;
}

.hero-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  opacity: 0.5;
  animation: ringSpin 6s linear infinite;
}

@keyframes ringSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.hero-status {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  z-index: 2;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: pulseDot 2s ease infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(108, 92, 231, 0.3);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll span {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 999px;
  position: relative;
}

.hero-scroll span::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDown 1.8s ease infinite;
}

@keyframes scrollDown {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ====== SECTION ====== */
.section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ====== ABOUT ====== */
#about {
  padding-top: 40px;
  max-width: 720px;
}

.about-content {
  text-align: center;
}

.about-content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.inline-link {
  color: var(--accent-light);
  font-weight: 600;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 1px;
  transition: border-color 0.3s ease;
}

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

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.about-badges span {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
}

/* ====== PORTFOLIO ====== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}

.filter-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.3s ease;
}

.portfolio-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-dim);
}

.portfolio-item img,
.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-item:hover img,
.portfolio-item:hover video {
  transform: scale(1.06);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 7, 13, 0.92) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.portfolio-overlay strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.pdf-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-muted);
}

.lightbox-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: var(--text-secondary);
  text-align: center;
}

.lightbox-pdf p {
  font-size: 1.1rem;
}

.video-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
}

/* ====== SERVICES ====== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all 0.4s ease;
}

.service-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-dim);
  color: var(--accent-light);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ====== CONTACT ====== */
.contact-section {
  padding-bottom: 80px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.4s ease;
}

.contact-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-dim);
  color: var(--accent-light);
  margin-bottom: 12px;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 600;
}

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

/* ====== LIGHTBOX ====== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(7, 7, 13, 0.95);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 40px;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-media {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.8rem;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

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

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--glass);
    backdrop-filter: blur(24px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.4s ease;
    z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .mobile-toggle { display: flex; }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .hero-image-wrap {
    width: 170px;
    height: 170px;
  }

  .lightbox-nav { width: 40px; height: 40px; font-size: 1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 520px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 64px 16px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero-image-wrap { width: 150px; height: 150px; }
}

.portfolio-item.hidden { display: none; }
