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

:root {
  --primary-color: #00d4ff;
  --secondary-color: #7c3aed;
  --background-dark: #0a0a0a;
  --background-light: #111111;
  --surface-dark: #1a1a1a;
  --surface-light: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #666666;
  --border-color: #333333;
  --success-color: #10b981;
  --error-color: #ef4444;
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.2);
  --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--background-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader { text-align: center; }

.loader-circle {
  width: 50px;
  height: 50px;
  border: 3px solid var(--surface-dark);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition-medium);
  border-bottom: 1px solid var(--border-color);
}

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

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

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

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

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

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-fast);
}
.nav-link:hover::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: var(--transition-fast);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-light) 100%);
}

.hero-container {
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.greeting {
  display: block;
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.name {
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.title {
  display: block;
  color: var(--text-primary);
  font-size: 2rem;
}

.hero-profile {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.hero-profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-medium);
  transition: var(--transition-medium);
  display: block;
  margin: 0 auto;
}

.hero-profile-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-heavy);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-medium);
  cursor: pointer;
  display: inline-block;
  font-size: 1rem;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
  background: var(--surface-dark);
  color: var(--text-primary);
  border: 2px solid var(--primary-color);
  transition: var(--transition-medium);
}

.btn-resume {
  background: var(--surface-dark);
  color: var(--text-primary);
  border: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-medium);
}

.btn-resume i { font-size: 0.9rem; }

.btn:hover, .btn-primary:hover, .btn-secondary:hover, .btn-small:hover, .btn-resume:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary:hover, .btn-small:hover, .btn-resume:hover {
  background: var(--primary-color);
  color: white;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  margin: 0 auto 10px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(-10px) rotate(45deg); }
  60% { transform: translateY(-5px) rotate(45deg); }
}

section { padding: 100px 0; }

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about { background: var(--background-light); }

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

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

.about-image {
  display: flex;
  justify-content: center;
}

.image-placeholder {
  width: 300px;
  height: 300px;
  background: var(--surface-dark);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary-color);
  border: 2px solid var(--border-color);
  transition: var(--transition-medium);
}

.image-placeholder:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-color);
}

.profile-image {
  width: 300px;
  height: 300px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  transition: var(--transition-medium);
  box-shadow: var(--shadow-medium);
  display: block;
  margin: 0 auto;
}

.profile-image:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
  border-color: var(--primary-color);
}

.skills { background: var(--background-dark); }

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

.skill-card {
  background: var(--surface-dark);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: var(--transition-medium);
  border: 1px solid var(--border-color);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-color);
}

.skill-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: var(--surface-light);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 1s ease;
}

.projects { background: var(--background-light); }

.tools { background: var(--background-dark); }

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

.tool-card {
  background: var(--surface-dark);
  padding: 0.8rem;
  border-radius: 12px;
  text-align: center;
  transition: var(--transition-medium);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-color);
}

.tool-icon {
  width: 45px;
  height: 45px;
  background: var(--surface-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-color);
  border: 2px solid var(--border-color);
  transition: var(--transition-medium);
}

.tool-card:hover .tool-icon {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.tool-card h3 {
  font-size: 0.85rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}

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

.project-card {
  background: var(--surface-dark);
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition-medium);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-color);
  z-index: 2;
}

.project-image {
  height: 200px;
  background: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-color);
  position: relative;
  z-index: 1;
}

.project-content {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
  background: var(--surface-dark);
}

.project-content h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.4;
  font-size: 0.9rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: var(--surface-light);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.contact { background: var(--background-dark); }

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-email i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.contact-email a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

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

.social-link {
  width: 55px;
  height: 55px;
  background: var(--surface-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-medium);
  border: 1px solid var(--border-color);
  font-size: 1.3rem;
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.contact-form {
  background: var(--surface-dark);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.footer {
  background: var(--surface-dark);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

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

.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-medium);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: var(--transition-slow);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: var(--transition-slow);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

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

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--background-dark);
    width: 100%;
    text-align: center;
    transition: var(--transition-medium);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
  }

  .nav-menu.active { left: 0; }
  .nav-menu li { margin: 1rem 0; }

  .hero-title { font-size: 2.5rem; }
  .name { font-size: 2.5rem; }
  .title { font-size: 1.5rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .about-content { grid-template-columns: 1fr; gap: 2rem; }
  .contact-content { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { 
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .skills-grid::-webkit-scrollbar { display: none; }
  .skill-card { min-width: 250px; flex-shrink: 0; scroll-snap-align: start; }
  .section-title { font-size: 2rem; }
  .scroll-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
  
  .project-card { padding: 0.75rem; }
  .project-image { height: 120px; }
  .project-content h3 { font-size: 1rem; margin-bottom: 0.4rem; }
  .project-content p { font-size: 0.85rem; line-height: 1.3; margin-bottom: 0.6rem; }
  .project-tech { margin-bottom: 0.75rem; }
  .tech-tag { font-size: 0.7rem; padding: 2px 6px; }
  
  .hero-profile-image {
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary-color);
    transition: none;
  }
  
  .hero-profile-image:hover { transform: none; }
  
  .profile-image {
    width: 250px;
    height: 250px;
    border: 2px solid var(--primary-color);
    transition: none;
  }
  
  .profile-image:hover { transform: none; }

  .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
  }
  
  .tool-card { padding: 0.6rem; }
  .tool-icon { width: 40px; height: 40px; font-size: 1rem; }
  .tool-card h3 { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 15px; }
  .hero-title { font-size: 2rem; }
  .name { font-size: 2rem; }
  .title { font-size: 1.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .section-title { font-size: 1.8rem; }
  .image-placeholder { width: 250px; height: 250px; font-size: 3rem; }
  
  .hero-profile-image {
    width: 80px;
    height: 80px;
    border: 2px solid var(--primary-color);
    transition: none;
  }

  .hero-profile-image:hover { transform: none; }
}
