/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nunito", sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Header Styles */
/* Header Content Wrapper */
.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  transition: flex-direction 0.3s, gap 0.3s;
}

header.header-small .header-content {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
}
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem 0;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: padding 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
}

header.header-small {
  padding: 0.5rem 0 0.5rem 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

header.header-small h1.cursive-font {
  font-size: 1.5rem;
  margin-bottom: 0;
  margin-right: 1.2rem;
  transition: font-size 0.3s cubic-bezier(.4,2,.6,1), margin 0.3s;
}

header.header-small p {
  font-size: 0.85rem;
  margin-bottom: 0;
  margin-top: 0;
  color: #888;
  transition: font-size 0.3s, color 0.3s;
}

header.header-small nav, header.header-small hr {
  display: none;
}

.cursive-font {
  font-family: "Playwrite PL", cursive;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 3rem;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  animation: fadeInDown 1s ease-out;
}

header p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 1.5rem;
  /* animation removed for stability */
}

/* Navigation */
nav {
  background: rgba(245, 247, 250, 0.95);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
  border-radius: 40px;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

nav li {
  display: flex;
}

nav a {
  display: block;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  color: #4b4b4b;
  text-decoration: none;
  font-size: 1.08rem;
  letter-spacing: 0.5px;
  background: transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
}

nav a:hover, nav a:focus {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

section, aside {
  background: rgba(255, 255, 255, 0.95);
  margin: 2rem 0;
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover, aside:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

h2:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* About Section */
#about img {
  float: left;
  margin: 0 2rem 1rem 0;
  border-radius: 50%;
  border: 5px solid #667eea;
  transition: transform 0.3s ease;
}

#about img:hover {
  transform: scale(1.1) rotate(5deg);
}

#about p {
  font-size: 1.1rem;
  text-align: justify;
  margin-bottom: 1rem;
}

/* Projects Section */
#projects {
  display: grid;
  gap: 2rem;
}

#projects article {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

#projects article:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
}

#projects h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

#projects img {
  border-radius: 10px;
  margin: 1rem 0;
  transition: transform 0.3s ease;
  max-width: 100%;
  height: auto;
}

#projects img:hover {
  transform: scale(1.05);
}

/* Skills Section */
#skills ul {
  list-style: none;
  display: grid;
  gap: 1rem;
}

#skills li {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#skills li:before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

#skills li:hover:before {
  animation: shimmer 0.6s ease;
}

#skills li:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Media Section */
#media {
  text-align: center;
}

#media audio, #media video {
  margin: 1rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Contact Form */
#contact form {
  max-width: 600px;
  margin: 0 auto;
}

#contact label {
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 0.5rem;
}

#contact input, #contact textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

#contact input:focus, #contact textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

#contact input[type="submit"] {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#contact input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Footer */
footer {
  background: #fff;
  color: #333;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem 1rem;
  margin-top: 3rem;
  border-top: 4px solid #fff3;
  box-shadow: 0 -4px 24px rgba(102, 126, 234, 0.12);
  position: relative;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

footer .footer-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s, transform 0.2s;
}

footer .footer-links a:hover {
  color: #ffe082;
  transform: translateY(-2px) scale(1.08);
}

footer .footer-icons {
  margin-bottom: 1.2rem;
}

footer .footer-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0 0.4rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.3rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

footer .footer-icons a:hover {
  background: #fff;
  color: #764ba2;
  transform: scale(1.15);
}

footer p {
  margin: 0.2rem 0;
  font-size: 1.1rem;
  opacity: 0.92;
}

footer a {
  color: inherit;
  text-decoration: underline dotted 2px #ffe08244;
  transition: color 0.2s;
  background: linear-gradient(90deg, #333 0%, #333 20%, #667eea 40%, #333 70%, #333 100%);
  background-size: 300% auto;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: footer-link-gradient 2s linear infinite;
}

@keyframes footer-link-gradient {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

footer a:hover {
  color: #764ba2;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .cursive-font {
    font-size: 2rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  nav a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  section, aside {
    padding: 2rem 1.5rem;
    margin: 1rem 0;
  }
  
  #about img {
    float: none;
    display: block;
    margin: 0 auto 2rem auto;
  }
  
  main {
    padding: 0 1rem;
  }

  footer .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
  footer .footer-icons {
    margin-bottom: 0.7rem;
  }
  footer {
    padding: 2rem 0.5rem 1rem 0.5rem;
  }
}

/* Remove default hr styling */
hr {
  display: none;
}