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

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --hover-bg: #2d3748;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 80%,
      rgba(139, 92, 246, 0.1) 0%,
      transparent 50%);
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.top-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.top-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  box-shadow: var(--shadow-glow);
  object-fit: cover;
}

.name {
  font-size: 28px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

.title {
  color: var(--text-secondary);
  font-size: 16px;
}

#rotating-title {
  display: inline-block;
  font-weight: 500;
  color: var(--accent-primary);
}

.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-list {
  list-style: none;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.navbar-link {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.navbar-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  transition: left 0.3s ease;
  z-index: -1;
}

.navbar-link:hover::before,
.navbar-link.active::before {
  left: 0;
}

.navbar-link:hover,
.navbar-link.active {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.main-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

article {
  display: none;
}

article.active {
  display: block;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.service-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.service-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border-color: var(--accent-primary);
}

.service-icon-box {
  font-size: 40px;
  color: var(--accent-primary);
  margin-bottom: 15px;
}

.service-item-title {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.service-item-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.tech-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tech-item:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.tech-item i {
  font-size: 48px;
}

.tech-item span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.timeline {
  margin-top: 40px;
}

.title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.icon-box {
  background: var(--accent-gradient);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.timeline-list {
  list-style: none;
  position: relative;
  padding-left: 30px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--accent-gradient);
}

.timeline-item {
  position: relative;
  padding: 20px;
  margin-bottom: 30px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 30px;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 50%;
  border: 3px solid var(--bg-secondary);
  box-shadow: var(--shadow-glow);
}

.timeline-item:hover {
  transform: translateX(5px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.timeline-item-title {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.timeline-item span {
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin: 10px 0;
}

.timeline-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.view-details {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.view-details:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none;
  opacity: 0;
}

.modal-content {
  /* background: var(--bg-secondary); */
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.modal-inner {
  max-height: calc(90vh - 80px);
  overflow-y: auto;
  padding-right: 10px;
}

.modal-inner::-webkit-scrollbar {
  width: 4px;
}

.modal-inner::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.modal-inner::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 10px;
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
  /* Close button stays on top */
}

.close:hover {
  color: var(--accent-primary);
  background: var(--hover-bg);
  transform: rotate(90deg);
}

.modal-content h3 {
  color: var(--accent-primary);
  margin-bottom: 20px;
}

.modal-content h4 {
  color: var(--accent-primary);
  margin: 25px 0 15px;
}

.modal-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 15px;
}

.modal-content ul {
  color: var(--text-secondary);
  margin: 15px 0;
}

.modal-content li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.modal-content img {
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin: 20px 0;
}

.modal-content a {
  background: var(--accent-gradient);
  color: white;
  padding: 12px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.modal-content a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}


.project-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.project-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border-color: var(--accent-primary);
}

.project-item a {
  text-decoration: none;
  color: inherit;
}

.project-img {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--bg-primary);
  cursor: pointer;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-item:hover .project-img img {
  transform: scale(1.1);
}

.project-item-icon-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--accent-gradient);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  transition: transform 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.project-item:hover .project-item-icon-box {
  transform: translate(-50%, -50%) scale(1);
}

.project-title {
  padding: 20px;
  padding-bottom: 10px;
  color: var(--text-primary);
  font-size: 16px;
}

.project-category {
  padding: 0 20px 20px;
  color: var(--accent-primary);
  font-size: 14px;
  font-weight: 500;
}

/* Modal/Lightbox styles */
.certificate-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.certificate-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-size: 30px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-info {
  text-align: center;
  margin-top: 20px;
  color: white;
}

.modal-info h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.modal-info p {
  font-size: 16px;
  opacity: 0.8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
  }

  .modal-close {
    top: -35px;
    width: 35px;
    height: 35px;
    font-size: 24px;
  }

  .modal-info h3 {
    font-size: 18px;
  }

  .modal-info p {
    font-size: 14px;
  }
}

.form {
  margin-top: 30px;
}

.input-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px 20px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

textarea.form-input {
  min-height: 20%;
  min-width: 100%;
  resize: vertical;
}

.form-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  width: 100%;
  justify-content: center;
}

.form-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .navbar-list {
    justify-content: center;
  }

  .header-left {
    flex-direction: column;
    text-align: center;
  }

  .input-wrapper {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 25px;
  }

  .h2 {
    font-size: 26px;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .service-list,
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .timeline-list {
    padding-left: 20px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 10px;
  }

  .top-header {
    padding: 20px;
  }

  .name {
    font-size: 24px;
  }

  .navbar-link {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* footer */

.bottom-footer {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  margin-top: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.bottom-footer::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
}

.footer-left {
  flex: 1;
  min-width: 250px;
}

.footer-name {
  font-size: 22px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 15px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-link {
  width: 42px;
  height: 42px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.footer-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  transition: left 0.3s ease;
  z-index: -1;
  border-radius: 50%;
}

.footer-link:hover::before {
  left: 0;
}

.footer-link:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
