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

html {
  scroll-behavior: smooth;
}

:root {
  --color-bg: #0f172a;
  --color-bg-secondary: rgba(30, 41, 59, 0.5);
  --color-bg-card: rgba(51, 65, 85, 0.5);
  --color-bg-footer: #0f172a;
  --color-text: #ffffff;
  --color-text-secondary: #d1d5db;
  --color-accent: #22d3ee;
  --color-accent-secondary: #a855f7;
  --color-link: #22d3ee;
  --color-link-hover: #67e8f9;
  --color-btn-primary: linear-gradient(135deg, #06b6d4, #3b82f6);
  --color-btn-secondary: #22d3ee;
  --color-btn-outline: #a855f7;
  --color-scrollbar: #a855f7;
  --color-scrollbar-bg: #1e293b;
}
body.dark-mode {
  --color-bg: #f3f4f6;
  --color-bg-secondary: rgba(243, 244, 246, 0.7);
  --color-bg-card: rgba(229, 231, 235, 0.7);
  --color-bg-footer: #f3f4f6;
  --color-text: #1e293b;
  --color-text-secondary: #374151;
  --color-accent: #0ea5e9;
  --color-accent-secondary: #7c3aed;
  --color-link: #0ea5e9;
  --color-link-hover: #2563eb;
  --color-btn-primary: linear-gradient(135deg, #0ea5e9, #7c3aed);
  --color-btn-secondary: #0ea5e9;
  --color-btn-outline: #7c3aed;
  --color-scrollbar: #7c3aed;
  --color-scrollbar-bg: #e5e7eb;
}

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

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

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader {
  display: flex;
  gap: 20px;
}

.loader span {
  font-size: 3rem;
  font-weight: bold;
  color: #22d3ee;
  animation: bounce 1.5s infinite alternate;
}

.loader span:nth-child(2) {
  animation-delay: 0.3s;
}

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

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 1rem 0;
}

#header.scrolled {
  background: var(--color-bg-secondary);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-accent);
}

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

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-link);
  transition: width 0.3s ease;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding-bottom: 1rem;
}

.mobile-nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 1.5rem;
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: bold;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: 1rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.typing-text {
  color: white;
  font-weight: 600;
  min-width: 200px;
  text-align: left;
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

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

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

.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--color-btn-primary);
  color: var(--color-text);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.35);
}

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

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

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

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

.text-white { color: var(--color-text); }
.text-cyan { color: var(--color-accent); }
.text-purple { color: var(--color-accent-secondary); }
.text-blue { color: #3b82f6; }
.text-green { color: #10b981; }
.text-yellow { color: #f59e0b; }
.text-pink { color: #ec4899; }
.text-orange { color: #f97316; }
.text-red { color: #ef4444; }
.text-gray { color: var(--color-text-secondary); }
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #059669; }
.text-green-700 { color: #047857; }
.text-orange-600 { color: #ea580c; }

.gradient-text {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

section {
  padding: 5rem 0;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 4rem;
}

.about {
  background: var(--color-bg-secondary);
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

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

.image-container {
  width: 320px;
  height: 320px;
  position: relative;
}

.image-border {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.image-inner {
  position: absolute;
  inset: 8px;
  background: #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-image {
  width: 256px;
  height: 256px;
  background: #4b5563;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #9ca3af;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

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

.skills {
  background: var(--color-bg-secondary);
}

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

.skill-category h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1.5rem;
  text-align: center;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(100, 116, 139, 0.3);
  transition: all 0.3s ease;
}

.skill-item:hover {
  background: rgba(51, 65, 85, 0.7);
  transform: translateY(-2px);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-info i {
  font-size: 1.2rem;
}

.skill-info span {
  color: white;
  font-weight: 500;
}

.skill-percentage {
  color: #9ca3af;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: #4b5563;
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  border-radius: 4px;
  width: 0;
  transition: width 1s ease-in-out 0.3s;
}

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

.project-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(100, 116, 139, 0.3);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.5);
}

.project-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
  color: white;
}

.gradient-bg-green-blue {
  background: linear-gradient(135deg, #10b981, #2563eb);
}

.gradient-bg-purple-pink {
  background: linear-gradient(135deg, #a855f7, #ec4899);
}

.gradient-bg-cyan-purple {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
}

.project-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  transition: color 0.3s ease;
}

.project-card:hover .project-header h3 {
  color: #22d3ee;
}

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

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

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: #374151;
  color: #22d3ee;
  font-size: 0.875rem;
  border-radius: 9999px;
}

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

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: white;
}

.project-link.text-cyan {
  color: #22d3ee;
}

.project-link.text-cyan:hover {
  color: #67e8f9;
}

.achievements {
  background: var(--color-bg-secondary);
}

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

.achievement-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(100, 116, 139, 0.3);
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.5);
}

.achievement-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.achievement-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.gradient-bg-yellow-orange {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.gradient-bg-blue-cyan {
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
}

.gradient-bg-orange-red {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.achievement-text h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.achievement-card:hover .achievement-text h3 {
  color: #22d3ee;
}

.achievement-text p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #22d3ee, #a855f7);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: 1.5rem;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  border-radius: 50%;
  z-index: 10;
}

.timeline-content {
  margin-left: 5rem;
}

.education-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(100, 116, 139, 0.3);
  transition: all 0.3s ease;
}

.education-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.5);
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.education-icon-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.education-icon-info i {
  font-size: 1.5rem;
}

.education-icon-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
}

.education-icon-info p {
  color: var(--color-text-secondary);
}

.education-details {
  text-align: right;
}

.duration {
  color: #22d3ee;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.grade {
  color: #10b981;
  font-weight: 500;
}

.contact {
  background: var(--color-bg-secondary);
}

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

.contact-info h3 {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 1rem;
}

.contact-info > p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-method i {
  font-size: 1.5rem;
  color: #22d3ee;
  width: 24px;
}

.contact-method h4 {
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 0.5rem;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

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

.footer {
  background: var(--color-bg-footer);
  border-top: 1px solid #1e293b;
  padding: 3rem 0 1rem;
}

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

.footer-section h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
}

.footer-section p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-link);
}

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

.social-link {
  width: 40px;
  height: 40px;
  background: var(--color-bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
}

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

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--color-btn-primary);
  color: var(--color-text);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.35);
}

::-webkit-scrollbar {
  width: 12px;
  background: var(--color-scrollbar-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-link-hover);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-scrollbar) var(--color-scrollbar-bg);
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
  transition: outline 0.2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu.open {
    display: flex;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

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

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .timeline-line {
    left: 1rem;
  }

  .timeline-dot {
    left: 0.75rem;
  }

  .timeline-content {
    margin-left: 3rem;
  }

  .education-header {
    flex-direction: column;
    gap: 1rem;
  }

  .education-details {
    text-align: left;
  }
}

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

  section {
    padding: 3rem 0;
  }

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

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

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

  .project-card {
    min-width: auto;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.dark-mode-toggle {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 2.8rem;
  cursor: pointer;
  margin-left: 1rem;
  transition: color 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 0.4rem 0.8rem;
}
.dark-mode-toggle i {
  font-size: 1.5rem;
}
.dark-mode-toggle.mobile {
  width: 100%;
  justify-content: flex-start;
  font-size: 2.3rem;
  margin: 1rem 0 0 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--color-bg-card);
}
.dark-mode-toggle.mobile i {
  font-size: 1.5rem;
}
