/* ===== Variables ===== */
:root {
  --bg: #0d0d0f;
  --bg-elevated: #16161a;
  --surface: #1c1c21;
  --text: #e8e8ed;
  --text-muted: #9898a6;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --font: 'Outfit', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  /* Security deterrents */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}

ul {
  list-style: none;
}

img, iframe, a {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(13, 13, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: padding var(--transition), background var(--transition);
}

.navbar.scrolled {
  padding: 0.6rem 0;
  background: rgba(13, 13, 15, 0.95);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--accent) !important;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.nav-cta:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-elevated);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
  }
  .nav-menu.active { right: 0; }
}

/* ===== Header / Hero ===== */
.header {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}

/* Custom Cursor Glow */
.cursor-glow {
  position: fixed;
  top: -200px;
  left: -200px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

.header-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-dim), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(0, 212, 170, 0.08), transparent);
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.title-line {
  display: block;
  animation: fadeUp 0.8s ease-out backwards;
}

.title-line:nth-child(1) { animation-delay: 0.1s; }
.title-line:nth-child(2) { animation-delay: 0.25s; }
.title-line:nth-child(3) { animation-delay: 0.4s; }

.title-line.accent {
  color: var(--accent);
}

.header-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease-out 0.5s backwards;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fadeUp 0.8s ease-out 0.65s backwards;
}

/* Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 10px 30px -10px var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-dim);
}

.btn-full {
  width: 100%;
}

/* Scroll indicator ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  animation: fadeUp 0.8s ease-out 0.9s backwards;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ===== Section common ===== */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* ===== Projects Carousel ===== */
.projects {
  background: var(--bg-elevated);
}

.carousel-wrapper {
  position: relative;
  padding: 0 3rem;
}

.carousel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  padding: 0 0.5rem;
}

.video-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: var(--bg);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-card h3 {
  padding: 1.25rem 1.5rem 0.25rem;
  font-size: 1.2rem;
}

.video-card p {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.carousel-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn svg {
  width: 24px;
  height: 24px;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), background var(--transition), transform var(--transition);
}

.carousel-dot:hover {
  opacity: 0.7;
}

.carousel-dot.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .carousel-wrapper { padding: 0 2.5rem; }
  .carousel-btn { width: 40px; height: 40px; }
  .carousel-btn svg { width: 20px; height: 20px; }
}

/* ===== About ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-text .btn {
  margin-top: 1rem;
}

.about-visual {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.about-card {
  flex: 1;
  min-width: 140px;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
}

.about-stat {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.about-card span:last-child {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .about-content { grid-template-columns: 1fr; }
}

/* ===== Testimonials ===== */
.testimonials {
  background: var(--bg-elevated);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial-card.reveal-scale.visible:nth-child(1) { transition-delay: 0.1s; }
.testimonial-card.reveal-scale.visible:nth-child(2) { transition-delay: 0.2s; }
.testimonial-card.reveal-scale.visible:nth-child(3) { transition-delay: 0.3s; }

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.testimonial-quote {
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: -0.5rem;
}

.testimonial-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.testimonial-author strong {
  display: block;
  font-size: 0.95rem;
}

.testimonial-author span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Scroll-triggered animations ===== */
.reveal, .reveal-up, .reveal-down, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
  will-change: opacity, transform;
}

.reveal { transform: translateY(30px); }
.reveal-up { transform: translateY(40px); }
.reveal-down { transform: translateY(-40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.9); }

.reveal.visible, .reveal-up.visible, .reveal-down.visible, .reveal-left.visible, .reveal-right.visible, .reveal-scale.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* ===== Contact ===== */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-info {
  text-align: center;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.contact-info a {
  color: var(--accent);
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-link {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-link:hover {
  color: var(--accent);
}

/* ===== Footer ===== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-links { justify-content: center; }
}
