/* Variables */
:root {
  --primary: #4e54c8;
  --secondary: #8f94fb;
  --dark-bg: #1a1a2e;
  --darker-bg: #16213e;
  --card-bg: #252540;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --border-color: rgba(255, 255, 255, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  background: var(--darker-bg);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
}

.logo a:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.logo h2 {
  color: var(--text-primary);
  font-size: 24px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: 0.5px;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 8px 15px;
  border-radius: 20px;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: rgba(78, 84, 200, 0.15);
  transform: translateY(-2px);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
  background: rgba(78, 84, 200, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(78, 84, 200, 0.2);
  transform: rotate(90deg);
}

/* Main Content */
.main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

/* Sections */
.section {
  margin-bottom: 50px;
}

.section-title {
  font-size: 28px;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
}

/* Profile */
.profile {
  display: flex;
  align-items: center;
  gap: 30px;
  background: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.profile-img {
  flex: 0 0 150px;
}

.profile-img img {
  width: 100%;
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.profile-info h1 {
  font-size: 32px;
  margin-bottom: 15px;
}

.profile-info p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 18px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--darker-bg);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

/* Cards */
.card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.card h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Portfolio/Projects */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.portfolio-item {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.portfolio-img {
  height: 200px;
  overflow: hidden;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-img img {
  transform: scale(1.05);
}

.portfolio-info {
  padding: 20px;
}

.portfolio-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.portfolio-info p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.blog-post {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.blog-img {
  height: 200px;
  overflow: hidden;
}

.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-post:hover .blog-img img {
  transform: scale(1.05);
}

.blog-info {
  padding: 20px;
}

.blog-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.blog-info p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.blog-date {
  font-size: 14px;
  color: var(--secondary);
  margin-bottom: 15px;
  display: block;
}

/* Contact */
.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(30, 30, 40, 0.7);
  color: var(--text-primary);
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.2);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-success {
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.alert-error {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

/* Footer */
.footer {
  background: var(--darker-bg);
  padding: 40px 0 20px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-about h3 {
  font-size: 24px;
  margin-bottom: 15px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-about p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-social h4 {
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-social .social-icons {
  justify-content: flex-start;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 12px 0;
  }
  
  .header .container {
    flex-direction: row;
    gap: 15px;
    position: relative;
  }
  
  .nav ul {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    text-align: center;
    background: var(--darker-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    margin-top: 15px;
  }
  
  .nav li {
    width: 100%;
  }
  
  .nav a {
    display: block;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
  .nav a:hover,
  .nav a.active {
    background: rgba(78, 84, 200, 0.2);
    transform: none;
  }
  
  .mobile-menu-btn {
    display: flex;
    z-index: 101;
  }
  
  .nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
  }
  
  .nav.active {
    display: block;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .profile {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-img {
    flex: 0 0 auto;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .portfolio-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .card, .profile {
    padding: 20px;
  }
}
