/* Base styles */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #6b7280;
  --background: #111827;
  --surface: #1f2937;
  --text: #f3f4f6;
  --text-secondary: #9ca3af;
  --border: rgba(75, 85, 99, 0.5);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.5;
}

/* Layout */
.min-h-screen {
  min-height: 100vh;
}

.bg-gradient {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

.max-w-7xl {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 0;
  transition: all 0.3s ease;
  background: transparent;
}

.fixed-header.scrolled {
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.5rem;
}

.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
  }
}

.desktop-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.cta-button {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.cta-button:hover {
  background: var(--primary-dark);
}

/* Mobile menu */
.mobile-menu-button {
  display: block;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

.mobile-menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: 0.3s;
}

.mobile-nav {
  display: none;
  padding: 1rem;
  background: var(--surface);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Hero section */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 48rem;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover {
  transform: scale(1.05);
}

.primary-button {
  background: var(--primary);
  color: white;
}

.secondary-button {
  background: var(--surface);
  color: var(--text);
}

/* Section styles */
.section {
  padding: 4rem 0;
  scroll-margin-top: 5rem;
}

.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: 2.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.heading-line {
  width: 5rem;
  height: 0.25rem;
  background: var(--primary);
  margin: 1rem auto 0;
  border-radius: 0.125rem;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: rgba(31, 41, 55, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.stat-card h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-card p {
  color: var(--text-secondary);
}

/* About content */
.about-content {
  background: rgba(31, 41, 55, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Clients marquee */
.clients-marquee {
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  animation: marquee 30s linear infinite;
  gap: 2rem;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* Skills section */
.skills-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-button {
  background: var(--surface);
  color: var(--text-secondary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-button.active {
  background: var(--primary);
  color: white;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-badge {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.skill-badge:hover {
  transform: scale(1.1);
}

/* Projects section */
.projects-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tab-button {
  background: var(--surface);
  color: var(--text-secondary);
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button.active {
  background: var(--primary);
  color: white;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: rgba(31, 41, 55, 0.4);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: scale(1.02);
  border-color: var(--primary);
}

/* Contact section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-info,
.contact-form {
  background: rgba(31, 41, 55, 0.4);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.contact-items {
  margin: 1rem 0;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-item .icon {
  font-size: 1.25rem;
}

.contact-item .label {
  color: var(--text-secondary);
  margin: 0;
}

.contact-item a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--primary);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.badge {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

/* Form styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.submit-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-button:hover {
  background: var(--primary-dark);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.copyright {
  color: var(--text-secondary);
  text-align: center;
}

.back-to-top {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: var(--text);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-in-out;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(31, 41, 55, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

.social {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.social svg {
  width: 14px;
}

.social:hover {
  color: #00F2FF;
  border-color: #00F2FF;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
  transform: translateY(-2px);
}

.project-card img {
  filter: brightness(1.2);
  opacity: 0.9;
  transition: 0.3s;
}

.project-card:hover img {
  opacity: 1;
  transform: scale(1.05);
}


/* Border tracing animations
*/

/* =========================
   Animated border glow
   ========================= */

.fancy-border {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

/* animated light */
.fancy-border::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;

  background: conic-gradient(from 0deg,
      transparent 0deg,
      transparent 120deg,
      #00F2FF,
      transparent 240deg,
      transparent 360deg);

  opacity: 0;
  transition: opacity 0.4s ease;
  animation: rotateBorder 3s linear infinite;
}

/* inner mask */
.fancy-border::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #050505;
  border-radius: inherit;
}

/* show glow on hover */
.fancy-border:hover::before {
  opacity: 1;
}

/* keep content above border */
.fancy-border>* {
  position: relative;
  z-index: 2;
}

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

.fancy-border:hover {
  transform: translateY(-4px) scale(1.02);
  transition: 0.3s;
}