/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --background: #0f0f23;
  --surface: #1a1a2e;
  --surface-light: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: #27272a;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);

  /* Spacing */
  --container-padding: clamp(1rem, 5vw, 2rem);
  --section-padding: clamp(3rem, 8vw, 6rem);
  --card-padding: clamp(1rem, 3vw, 2rem);

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Animations */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

html {
  scroll-behavior: smooth;
  font-size: clamp(14px, 1.5vw, 16px);
}

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
  overflow: hidden;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.loading-logo {
  margin-bottom: 2rem;
  position: relative;
}

.logo-text {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  animation: logoGlow 2s ease-in-out infinite alternate;
  position: relative;
}

.logo-text::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

.loading-bar {
  width: min(250px, 80vw);
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  margin: 0 auto 2rem;
  overflow: hidden;
  position: relative;
}

.loading-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  animation: loading 2.5s ease-in-out;
  position: relative;
}

.loading-progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
  animation: shimmer 1.5s ease-in-out infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  animation: pulse 2s ease-in-out infinite;
  font-weight: 500;
}

/* Added missing keyframes for loading animations */
@keyframes logoGlow {
  from {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    transform: scale(1);
  }
  to {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8));
    transform: scale(1.02);
  }
}

@keyframes loading {
  0% {
    width: 0%;
    transform: translateX(-100%);
  }
  50% {
    width: 70%;
    transform: translateX(0%);
  }
  100% {
    width: 100%;
    transform: translateX(0%);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header.scrolled {
  background: rgba(15, 15, 35, 0.98);
  box-shadow: var(--shadow-lg);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--container-padding);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-accent {
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: 50%;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--primary);
  }
  100% {
    box-shadow: 0 0 20px var(--primary);
  }
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

.nav-link:hover::after {
  width: 100%;
}

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

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.hero-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 20px 30px, rgba(99, 102, 241, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(139, 92, 246, 0.3), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(6, 182, 212, 0.3), transparent);
  background-repeat: repeat;
  background-size: 100px 100px;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 800px;
  padding: 0 var(--container-padding);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  opacity: 0;
  animation: slideUp 1s ease-out forwards;
}

.title-line:nth-child(2) {
  animation-delay: 0.2s;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.5s forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  opacity: 0;
  animation: fadeIn 1s ease-out 0.8s forwards;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* About Section */
.about {
  padding: var(--section-padding) 0;
  background: var(--surface);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 3rem;
}

.about-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface-light);
  border-radius: 50px;
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  width: 100%;
  max-width: 300px;
  justify-content: center;
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 1.5rem;
}

/* Projects Section */
.projects {
  padding: var(--section-padding) 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(50px);
  will-change: transform;
  backface-visibility: hidden;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  will-change: transform;
  backface-visibility: hidden;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.project-link:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.project-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.project-content {
  padding: var(--card-padding);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-team {
  margin-bottom: 1rem;
}

.team-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

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

.team-members a {
  text-decoration: none;
}

.member {
  background: var(--surface-light);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: color 0.2s;
  cursor: pointer;
  text-decoration: none !important;
}

.member:hover {
  color: #0077ff;
  text-decoration: underline !important;
}

.team-member {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.stack-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--surface-light);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

/* Statistics Section */
.statistics {
  padding: var(--section-padding) 0;
  background: var(--surface);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--surface-light);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

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

.stat-card .stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-weight: 600;
}

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

.footer-content {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-info p {
  color: #ccc;
  margin-bottom: 0.5rem;
}

.footer-info p a {
  color: #ccc;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-info p a:hover {
  color: var(--primary);
}

.footer-info .slogan {
  font-style: italic;
  color: #999;
}

.footer-text p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.address-button {
  display: inline-block;
  padding: 1rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all var(--transition-normal);
  margin: 0.5rem 0;
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.address-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.address-button span {
  display: block;
  font-size: 0.9rem;
}

.address-button span:first-child {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

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

.social-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.5rem;
  transition: color var(--transition-fast);
}

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

.footer-copy {
  color: var(--text-muted);
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .about-features {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    margin: 0;
  }

  .project-image {
    height: 200px;
  }

  .project-content {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .section-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .about-description {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .projects-grid {
    gap: 1rem;
    margin-top: 2rem;
  }

  .project-card {
    border-radius: 15px;
  }

  .project-image {
    height: 180px;
  }

  .project-content {
    padding: 1rem;
  }

  .project-title {
    font-size: 1.3rem;
  }

  .project-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .stack-tags {
    gap: 0.25rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
  }

  .stat-icon {
    font-size: 2.5rem;
  }

  .stat-card .stat-number {
    font-size: 2.5rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-section {
    min-width: auto;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .project-card {
    margin: 0 -0.5rem;
    border-radius: 12px;
  }

  .project-image {
    height: 160px;
  }

  .project-content {
    padding: 1rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-description {
    font-size: 0.85rem;
  }

  .about-description {
    font-size: 0.95rem;
  }

  .feature-item {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  .feature-icon {
    font-size: 1.3rem;
  }
}

@media (max-width: 350px) {
  .hero-content {
    padding: 0 0.5rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .container {
    padding: 0 0.5rem;
  }

  .project-card {
    margin: 0;
  }

  .project-content {
    padding: 0.8rem;
  }

  .project-link {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-icon {
    font-size: 2rem;
  }

  .stat-card .stat-number {
    font-size: 2rem;
  }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.4);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: #ffffff;
    --text-secondary: #ffffff;
  }
}


