:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --secondary-color-footer: #2c3e50;
  --text-color: #333;
  --bg-color: #f9f9f9;
  --card-bg: #fff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --transition: all 0.3s ease;
}

.dark-mode {
  --primary-color: #1abc9c;
  --secondary-color: #ecf0f1;
  --secondary-color-footer: #aeaeae;
  --text-color: #ecf0f1;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(30, 30, 30, 0.9);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
  line-height: 1.6;
  overflow-x: hidden;
}

.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.1);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.2);
  animation: float 15s infinite linear;
}

@keyframes float {
  0% { transform: translateY(0) translateX(0) rotate(0deg); }
  100% { transform: translateY(-100vh) translateX(100px) rotate(360deg); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 20px;
}

.theme-toggle:hover {
  color: var(--primary-color);
  transform: rotate(30deg);
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 24px;
}

/* Hero Section */
#home {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 300px;
  padding-right: 40px;
}

.typed-container {
    min-height: 140px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    overflow: hidden;
}

.hero-text h1 {
    display: flex;
    flex-direction: column;
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.3;
    width: 100%;
}

.static-text {
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 5px;
    display: block;
    color: var(--primary-color);
    white-space: nowrap;
}

.typed-text-container {
    display: inline-block;
    min-width: 100%;
}

#typed {
    min-height: 1.2em;
    display: block;
    font-size: clamp(1.6rem, 5.5vw, 2.8rem);
    color: var(--secondary-color);
    font-weight: 600;
    white-space: normal;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

#typed::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color);
    margin-left: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-text h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.hero-text p {
  margin-bottom: 30px;
  font-size: 18px;
}

/* Global Button Styles */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), #2ecc71);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.hero-text .btn-group .btn {
    min-width: 180px;
}

.timeline-content .btn {
    margin-top: 15px;
}

.certificate-btn-container .btn {
    padding: 10px 25px;
    font-size: 14px;
}

.contact-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 10px;
}

.dark-mode .btn {
    color: white;
}

.dark-mode .btn-outline {
    color: var(--primary-color);
}

.dark-mode .btn-outline:hover {
    color: white;
}

.hero-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
  position: relative;
}

.hero-image img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 30px var(--shadow-color);
  transition: var(--transition);
}

.hero-image:hover img {
  transform: scale(1.05);
}

/* About Section */
#about {
  padding: 100px 0;
  background-color: var(--card-bg);
  position: relative;
  overflow: hidden;
}

#about::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--primary-color), #2ecc71);
  opacity: 0.1;
  top: -50px;
  right: -50px;
  z-index: 0;
}

#about::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: linear-gradient(45deg, var(--primary-color), #9b59b6);
  opacity: 0.1;
  bottom: -50px;
  left: -50px;
  z-index: 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 36px;
  color: var(--primary-color);
  display: inline-block;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
}

.about-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.about-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
  position: relative;
}

.hexagon-container {
  position: relative;
  width: 300px;
  height: 346px;
  margin: 0 auto;
}

.hexagon {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(52, 152, 219, 0.3) 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 1;
}

.about-image img {
  position: relative;
  width: 92%;
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 2;
  transform: translate(4%, 4%);
  box-shadow: none;
}

.decoration {
  position: absolute;
  top: -20px;
  right: -30px;
  z-index: 0;
}

.circle, .square, .triangle {
  position: absolute;
  background: rgba(52, 152, 219, 0.1);
}

.circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  top: 0;
  right: 0;
}

.square {
  width: 50px;
  height: 50px;
  bottom: 30px;
  right: 50px;
}

.triangle {
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid rgba(52, 152, 219, 0.1);
  top: 100px;
  right: -20px;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text h3 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.about-text p {
  margin-bottom: 15px;
}

/* Skills Section */
#skills {
    padding: 100px 0;
    background-color: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.skill-category {
    background-color: var(--bg-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px var(--shadow-color);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.skill-header h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin: 0;
}

.skill-percent {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 18px;
}

.skill-bar-container {
    width: 100%;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.skill-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), #2ecc71);
    border-radius: 5px;
    position: relative;
    transition: width 1s ease-in-out;
}

.skill-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 100%;
    animation: shine 2s infinite;
}

@keyframes shine {
  0% { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

.sub-skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.sub-skill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px 10px;
  background-color: var(--card-bg);
  border-radius: 10px;
  transition: var(--transition);
  box-shadow: 0 5px 15px var(--shadow-color);
  overflow: hidden;
  z-index: 1;
}

.sub-skill::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.sub-skill:hover::before {
  opacity: 0.1;
}

.sub-skill i {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--primary-color);
  transition: var(--transition);
}

.sub-skill:hover i {
  transform: scale(1.2);
  color: #2ecc71;
}

.sub-skill span {
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.sub-skill span::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.sub-skill:hover span::after {
  width: 100%;
}

/* Experience Section */
#experience {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
}

.timeline-card {
  padding: 20px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-card.left {
  left: 0;
}

.timeline-card.right {
  left: 50%;
}

.timeline-content {
  padding: 30px;
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 10px 30px var(--shadow-color);
  position: relative;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary-color), #2ecc71);
}

.timeline-card.left .timeline-content {
  border-left: 4px solid var(--primary-color);
  margin-right: 30px;
}

.timeline-card.right .timeline-content {
  border-right: 4px solid var(--primary-color);
  margin-left: 30px;
}

.timeline-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 0 0 8px var(--bg-color);
}

.timeline-card.left .timeline-icon {
  right: -90px;
  top: 40px;
}

.timeline-card.right .timeline-icon {
  left: -90px;
  top: 40px;
}

.timeline-content h3 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.timeline-content h4 {
  font-size: 20px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.timeline-content ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.timeline-content li {
  margin-bottom: 10px;
}

/* Projects Section */
#projects {
  padding: 100px 0;
  background-color: var(--card-bg);
}

.projects-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  gap: 10px;
}

.tab-btn {
  padding: 10px 25px;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.tab-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.tab-btn:hover:not(.active) {
  background-color: var(--primary-color);
  opacity: 0.8;
  color: white;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--bg-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px var(--shadow-color);
  transition: var(--transition);
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow-color);
}

.project-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  background-color: #00427cc6;
  opacity: 1;
}

.project-overlay h3 {
  color: white;
  font-size: 22px;
  margin-bottom: 10px;
}

.project-overlay p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 15px;
}

.project-links {
  display: flex;
  gap: 10px;
}

.project-links a {
  color: white;
  background-color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
}

.project-links a:hover {
  transform: translateY(-3px);
  background-color: white;
  color: var(--primary-color);
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.project-info p {
  margin-bottom: 15px;
  font-size: 14px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag {
  background-color: var(--primary-color);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
}

/* Education Section */
#education {
  padding: 100px 0;
  position: relative;
}

.education-container {
  position: relative;
}

.education-card {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 15px 30px var(--shadow-color);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.education-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    rgba(52, 152, 219, 0.1) 100%
  );
  z-index: -1;
  opacity: 0.1;
}

.education-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.education-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px var(--shadow-color);
  margin-right: 30px;
}

.education-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.education-details h3 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.education-details p {
  font-size: 18px;
  color: var(--secondary-color);
}

.education-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.education-info {
  flex: 1;
  min-width: 300px;
}

.education-info h4 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.education-info p {
  margin-bottom: 15px;
  position: relative;
  padding-left: 25px;
}

.education-info p i {
  position: absolute;
  left: 0;
  top: 3px;
  color: var(--primary-color);
}

.education-image {
  flex: 1;
  min-width: 300px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px var(--shadow-color);
}

.education-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.education-image:hover img {
  transform: scale(1.05);
}

/* Certificates Section */
#certificates {
  padding: 100px 0;
  position: relative;
}

.certificates-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  gap: 10px;
}

.certificates-tabs .tab-btn {
  padding: 10px 25px;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.certificates-tabs .tab-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.certificates-tabs .tab-btn:hover:not(.active) {
  background-color: var(--primary-color);
  opacity: 0.8;
  color: white;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.certificate-card {
  background-color: var(--bg-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px var(--shadow-color);
  transition: var(--transition);
  position: relative;
  perspective: 1000px;
}

.certificate-card:hover {
  transform: translateY(-10px) rotateY(5deg);
  box-shadow: 0 15px 30px var(--shadow-color);
}

.certificate-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.certificate-card:hover .certificate-image img {
  transform: scale(1.1);
}

.certificate-info {
  padding: 20px;
  text-align: center;
}

.certificate-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.certificate-info p {
  margin-bottom: 10px;
  font-size: 14px;
}

.certificate-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

/* Contact Section */
#contact {
  padding: 100px 0;
  background-color: var(--card-bg);
  position: relative;
  z-index: 1;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info h3 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.contact-info p {
  margin-bottom: 30px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 20px;
}

.contact-text h4 {
  font-size: 18px;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.contact-text a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.contact-text a:hover {
  color: var(--primary-color);
}

.contact-form {
  flex: 1;
  min-width: 300px;
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 20px var(--shadow-color);
  position: relative;
  z-index: 2;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-color);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.form-message {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
}

.form-message.success {
  background-color: rgba(46, 204, 113, 0.2);
  border: 1px solid #2ecc71;
  color: #27ae60;
}

.form-message.error {
  background-color: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
  color: #c0392b;
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto 0;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer */
footer {
  background: linear-gradient(to right, #1a2a3a, #2c3e50);
  color: white;
  padding: 30px 0;
  text-align: center;
}

.dark-mode footer {
  background: linear-gradient(to right, #0d1b26, #1a2a3a);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-links a {
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.copyright {
  font-size: 14px;
  opacity: 0.8;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 5px 15px var(--shadow-color);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  background-color: var(--secondary-color);
}

/* Section Animations */
section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-text h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero-text h2 {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--nav-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    gap: 30px;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin-left: 0;
  }

  .hamburger {
    display: block;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
    margin-bottom: 40px;
  }
  
  #home {
    padding-top: 120px;
    height: auto;
    min-height: 100vh;
    padding-bottom: 50px;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }
  
  .btn, .btn-outline {
    width: 100%;
    max-width: 280px;
    margin-left: 0;
    margin-top: 10px;
  }

  .about-content {
    flex-direction: column;
  }

  .education-header {
    flex-direction: column;
    text-align: center;
  }

  .education-logo {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .timeline {
    max-width: 100%;
    margin: 0 10px;
  }

  .timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    left: 30px;
    margin-left: 0;
    border-radius: 2px;
  }
  
  .timeline-card {
    padding: 20px 20px 20px 90px;
    width: 100%;
    position: relative;
    left: 0;
    margin-bottom: 30px;
  }
  
  .timeline-card.left,
  .timeline-card.right {
    left: 0;
  }

  .timeline-card .timeline-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    font-size: 20px;
    left: 15px;
    top: 20px;
    transform: translateY(0);
    box-shadow: 0 0 0 6px var(--bg-color);
    z-index: 1;
  }
  
  .timeline-content {
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    margin-left: 0;
    border-right: none;
  }
  
  .timeline-content::before {
    display: none;
  }
  
  .timeline-content h3 {
    font-size: 22px;
    margin-top: 50px;
  }
  
  .timeline-content h4 {
    font-size: 18px;
  }
  
  .timeline-card:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 576px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .education-card {
    padding: 30px 20px;
  }

  #home {
    height: auto;
    min-height: 100vh;
    padding: 100px 0 50px;
  }
  
  .hero-image {
    margin-top: 30px;
  }
}

@media (max-width: 500px) {
    .timeline-card {
        padding: 15px 15px 15px 95px;
    }

    .timeline-card .timeline-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
        left: 15px;
        top: 18px;
    }

    .timeline-content h3 {
        font-size: 18px;
        margin-top: 45px;
    }

    .timeline-content h4 {
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0 10px;
    }

    body {
        font-size: 13px;
    }

    .hero-text h1 {
        font-size: 1.6rem;
    }

    #typed {
        font-size: 1.2rem;
    }

    .timeline-card {
        padding: 10px 10px 10px 80px;
    }

    .timeline-card .timeline-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
        left: 10px;
        top: 15px;
    }

    .timeline-content h3 {
        font-size: 16px;
        margin-top: 40px;
    }

    .timeline-content h4 {
        font-size: 14px;
    }

    .btn, .btn-outline {
        padding: 8px 15px;
        font-size: 13px;
    }
}
