/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary: #0f172a;
  --accent: #6366f1;
  --light: #f1f5f9;
  --dark: #1e293b;
  --highlight: #facc15;
  --bg-gradient: linear-gradient(135deg, #1e293b, #0f172a);
}

body {
  background: var(--bg-gradient);
  color: var(--light);
  line-height: 1.7;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 2rem 0;
}

/* HEADER */
header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.5s ease-in-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--highlight);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--highlight);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* HERO */
#hero {
  text-align: center;
  padding: 8rem 1rem;
  background: linear-gradient(to right, #0f172a, #1e293b);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

#hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--highlight);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#hero .typed-text {
  font-size: 1.5rem;
  height: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeIn 2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  background: var(--highlight);
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 50px;
  margin: 0.5rem;
  font-weight: bold;
  border: none;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s, background 0.3s;
  box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.btn:hover {
  transform: translateY(-3px);
  background: #fde047;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--light);
  color: var(--light);
}

.btn-secondary:hover {
  background: var(--light);
  color: var(--dark);
}

/* ABOUT */
#about, #projects, #skills, #contact {
  padding: 5rem 0;
  background: var(--primary);
  border-top: 1px solid #2c3e50;
}

section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--highlight);
}

.about-content {
  background: var(--dark);
  padding: 2rem;
  border-radius: 16px;
  max-width: 800px;
  margin: auto;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
  animation: fadeIn 1s ease-in;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--dark);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.project-card:hover {
  transform: scale(1.03);
}

.project-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* SKILLS */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.skills-list li {
  list-style: none;
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.skills-list li:hover {
  background: var(--highlight);
  color: var(--primary);
}

/* CONTACT */
#contact p, #contact a {
  text-align: center;
  color: var(--light);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

form {
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 15px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  background: #f8fafc;
  color: #111;
}

input:focus, textarea:focus {
  outline: 2px solid var(--accent);
}

button[type="submit"] {
  background: var(--accent);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

button[type="submit"]:hover {
  background: var(--highlight);
  color: var(--primary);
}

/* FOOTER */
footer {
  text-align: center;
  background: var(--dark);
  padding: 2rem;
  font-size: 0.95rem;
  color: #cbd5e1;
  border-top: 1px solid #334155;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
  #hero h2 {
    font-size: 2rem;
  }
  .btn {
    padding: 10px 20px;
  }
}
