/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Manrope, "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  min-height: 100vh;
  background-color: #f8fafc;
  color: #0d141c;
  line-height: 1.5;
}

.portfolio-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header Styles */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
  border-bottom: 1px solid #e7edf4;
  padding: 12px 24px;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 24px;
  height: 24px;
  color: #0d141c;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: #0d141c;
  letter-spacing: -0.015em;
}

.desktop-nav {
  display: none;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}

.desktop-nav a {
  color: #0d141c;
  text-decoration: none;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: #475569;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mobile-menu-button:hover {
  background-color: #e2e8f0;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-image: url('images/Ehsaan.jpg');
  background-size: 90%;
  background-position: center;
}

/* Mobile Navigation */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.mobile-nav-overlay.open {
  visibility: visible;
  opacity: 1;
}

.mobile-nav-sidebar {
  width: 250px;
  background-color: #f8fafc;
  padding: 24px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  height: 100%;
}

.mobile-nav-overlay.open .mobile-nav-sidebar {
  transform: translateX(0);
}

.mobile-nav-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #0d141c;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 48px;
}

.mobile-nav-link {
  color: #0d141c;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease;
  border-bottom: 1px solid #e7edf4;
}

.mobile-nav-link:hover {
  color: #49739c;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 0 24px;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 0;
  max-width: 1024px;
  margin: 0 auto;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background-image: url('images/ehsaan.png');
  background-size: cover;
  background-position: center;
}

.hero-content {
  flex: 1;
  display: flex;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  color: #0d141c;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-description {
  font-size: 16px;
  color: #475569;
  line-height: 1.6;
}

.hero-button-container {
  padding-top: 8px;
}

.resume-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #2563eb;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.resume-button:hover {
  background-color: #1d4ed8;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

/* Section Styles */
.section {
  max-width: 1024px;
  margin: 0 auto;
  padding: 40px 0 16px;
}

.section-heading {
  font-size: 22px;
  font-weight: 700;
  color: #0d141c;
  margin-bottom: 24px;
  letter-spacing: -0.015em;
}

/* About Section */
.about-paragraph {
  font-size: 16px;
  color: #334155;
  line-height: 1.7;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.skill-card {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(2, 6, 23, 0.06);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
  transition: all 0.25s ease;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: conic-gradient(from 180deg at 50% 50%, #60a5fa, #a78bfa, #34d399, #60a5fa);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.25;
}

.skill-card:hover {
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.12);
  transform: translateY(-4px);
}

.skill-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0d141c;
  margin-bottom: 12px;
}

.skill-list {
  list-style-type: disc;
  list-style-position: inside;
  color: #64748b;
}

.skill-list li {
  margin-bottom: 4px;
}

.skill-card-wide {
  grid-column: 1 / -1;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(2, 6, 23, 0.06);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
  transition: all 0.25s ease;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: conic-gradient(from 180deg at 50% 50%, #60a5fa, #a78bfa, #34d399, #60a5fa);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.25;
}

.project-card:hover {
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.12);
  transform: translateY(-4px);
}

.project-info {
  margin-bottom: 12px;
}

.project-label {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 4px;
}

.project-title {
  font-size: 18px;
  font-weight: 700;
  color: #0d141c;
  margin-bottom: 8px;
}

.project-description {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 12px;
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.project-links {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.project-link {
  font-size: 14px;
  font-weight: 700;
  color: white;
  background-color: #2563eb;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.project-link:hover {
  background-color: #1d4ed8;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

.project-link-secondary {
  background-color: #e2e8f0;
  color: #334155;
}

.project-link-secondary:hover {
  background-color: #cbd5e1;
  box-shadow: 0 8px 25px rgba(226, 232, 240, 0.3);
  transform: translateY(-2px);
}

.project-image-1 {
  background-image: url('images/pic.png');
}

.project-image-2 {
  background-image: url('images/pic3.png');
}

/* Experience & Education Timeline */
.timeline {
  position: relative;
  border-left: 1px solid #e2e8f0;
  list-style: none;
  padding-left: 0;
}

.timeline-item {
  position: relative;
  margin-left: 24px;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 4px;
}

.timeline-icon {
  position: absolute;
  left: -36px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.timeline-content {
  padding-left: 0;
}

.timeline-title {
  font-size: 16px;
  font-weight: 500;
  color: #0d141c;
  margin-bottom: 4px;
}

.timeline-period {
  font-size: 14px;
  color: #64748b;
}

/* Certificates Section */
/* Certificates Section - Updated for better image fitting */
.certificates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Responsive grid layout */
@media (min-width: 768px) {
  .certificates-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (min-width: 1200px) {
  .certificates-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.certificate-card {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 0;
  border: 1px solid rgba(2, 6, 23, 0.06);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
  transition: all 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.certificate-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: conic-gradient(from 180deg at 50% 50%, #60a5fa, #a78bfa, #34d399, #60a5fa);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.25;
}

.certificate-card:hover {
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.12);
  transform: translateY(-4px);
}

.certificate-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 910 / 727; /* Exact aspect ratio for prompting.png */
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.certificate-placeholder-image {
  width: 100%;
  height: 100%;
  background-size: cover; /* Ensure image fills the container */
  background-position: center;
  background-repeat: no-repeat;
  /* Removed background-color as it's not needed if image perfectly fits */
}

.certificate-image-1 {
  background-image: url('images/prompting.png');
  position: relative;
}

/* Removed the overlay text since you have an actual certificate image */
.certificate-image-1::before {
  display: none;
}
#cert-image-2{
  background-image: url('images/software.png');
}
.certificate-image-2 {
  position: relative;
}
#cert-image-3{
  background-image: url('images/ms.png');
}
#cert-image-4{
  background-image: url('images/python.png');
}
#cert-image-5{
  background-image: url('images/html.png');
}
#cert-image-6{
  background-image: url('images/git.png');
}

.certificate-image-2::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  opacity: 0.9;
}

.certificate-badge {
  position: absolute;
  top: 12px;
  right: -24px;
  transform: rotate(45deg);
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  color: white;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 6px 32px;
  font-size: 10px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.certificate-badge-pro {
  background: linear-gradient(90deg, #059669, #10b981);
}

.certificate-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.certificate-info {
  flex: 1;
  margin-bottom: 16px;
}

.certificate-title {
  font-size: 18px;
  font-weight: 700;
  color: #0d141c;
  margin-bottom: 6px;
}

/* Responsive font sizes for smaller cards in 3-column layout */
@media (min-width: 1200px) {
  .certificate-title {
    font-size: 16px;
  }
}

.certificate-issuer {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 12px;
}

@media (min-width: 1200px) {
  .certificate-issuer {
    font-size: 13px;
  }
}

.certificate-year {
  font-weight: 600;
  color: #475569;
}

.certificate-description {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

@media (min-width: 1200px) {
  .certificate-description {
    font-size: 13px;
  }
}

.certificate-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.certificate-link {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

.certificate-link:hover {
  color: #1d4ed8;
}

@media (min-width: 1200px) {
  .certificate-link {
    font-size: 13px;
  }
}

.certificate-id {
  font-size: 12px;
  background-color: #dcfce7;
  color: #166534;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

@media (min-width: 1200px) {
  .certificate-id {
    font-size: 11px;
    padding: 3px 6px;
  }
}

.certificate-id-blue {
  background-color: #dbeafe;
  color: #1e40af;
}

.certificate-stripe {
  height: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,.25), rgba(99,102,241,.25), rgba(16,185,129,.25), rgba(59,130,246,.25));
}


/* Contact Section */
.contact-section {
  padding-bottom: 56px;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-label {
  display: flex;
  flex-direction: column;
  min-width: 160px;
  flex: 1;
}

.form-label-text {
  font-size: 16px;
  font-weight: 500;
  color: #0d141c;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  min-width: 0;
  flex: 1;
  border-radius: 8px;
  color: #0d141c;
  border: 1px solid #cedbe8;
  background-color: #f8fafc;
  height: 56px;
  padding: 15px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  resize: none;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: #49739c;
}

.form-textarea {
  min-height: 144px;
  height: auto;
  resize: vertical;
}

.form-label-wide {
  grid-column: 1 / -1;
}

.form-button-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  max-width: 480px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  height: 40px;
  padding: 0 16px;
  background-color: #0d80f2;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.015em;
  border: 1px solid #0d80f2;
  transition: all 0.25s ease;
}

.submit-button:hover {
  background-color: #0c6fd1;
  box-shadow: 0 8px 25px rgba(13, 128, 242, 0.3);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  border-top: 1px solid #e7edf4;
  padding: 40px 0;
  text-align: center;
  background-color: #f8fafc;
}

.footer-social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.footer-link {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #475569;
}

.footer-copyright {
  color: #64748b;
  font-size: 14px;
}

/* Responsive Design */
@media (min-width: 640px) {
  .skills-grid {
      grid-template-columns: repeat(2, 1fr);
  }
  .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
  }
  
  .skill-card-wide {
      grid-column: 1 / -1;
  }
  
  .certificate-descriptions-grid {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-form {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .header-container {
      padding: 12px 40px;
  }
  
  .desktop-nav {
      display: flex;
  }
  
  .mobile-menu-button {
      display: none;
  }
  
  .mobile-nav-overlay {
      display: none;
  }
  
  .main-content {
      padding: 0 40px;
  }
  
  .hero-section {
      flex-direction: row;
      align-items: center;
  }
  
  .hero-title {
      font-size: 60px;
  }
  
  .projects-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hero-title {
      font-size: 36px;
  }
  
  .hero-description {
      font-size: 14px;
  }
}