/* Base styles */
:root {
  --primary: #2C3E50;
  --accent: #3498DB;
  --text: #2C3E50;
  --text-light: #718096;
  --bg-light: #f7fafc;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  color: var(--primary);
  margin-bottom: 4rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: var(--white);
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}

.scrolled .logo {
  color: var(--primary);
}

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

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

.scrolled .nav-links a {
  color: var(--text);
}

.nav-links a:hover {
  color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}

.scrolled .mobile-menu-btn {
  color: var(--primary);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

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

.profile-img {
  width: 10rem;
  height: 10rem;
  margin: 0 auto 2rem;
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.typing-text {
  display: inline-block;
  font-size: 1.25rem;
  margin-bottom: 2rem;
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3.5s steps(40, end),
             blink-caret 0.75s step-end infinite;
}

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

.social-links a {
  color: var(--white);
  transition: transform 0.3s ease;
}

.social-links a:hover {
  transform: scale(1.1);
}

/* About Section */
.about {
  padding: 5rem 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.education {
  margin-top: 2rem;
}

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

.education-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.progress-card {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1rem;
  transition: width 1s ease-out;
}

/* Skills Section */
.skills {
  padding: 5rem 0;
  background: var(--bg-light);
}

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

.skill-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.skill-card:hover {
  transform: scale(1.05);
}

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

.skill-header img {
  width: 3rem;
  height: 3rem;
}

/* Experience Section */
.experience {
  padding: 5rem 0;
  background: var(--white);
}

.experience-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.experience-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.experience-header svg {
  color: var(--accent);
  flex-shrink: 0;
}

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

.tech-tags span {
  padding: 0.25rem 0.75rem;
  background: rgba(52, 152, 219, 0.1);
  color: var(--accent);
  border-radius: 1rem;
  font-size: 0.875rem;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
  background: var(--bg-light);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background: #2980b9;
}

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

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

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent) }
}

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

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow);
  }

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

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

  .hero h1 {
    font-size: 2.5rem;
  }

  .typing-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 2rem;
  }

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

  .profile-img {
    width: 8rem;
    height: 8rem;
  }

  .skill-card {
    padding: 1rem;
  }
}