:root {
  --dark-bg: black;
  --dark-card: #1E1E1E;
  --accent-color: #4A90E2;
  --text-primary: #E0E0E0;
}
body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}
.section-title {
  border-bottom: 0px solid var(--accent-color);
}
#projects {
  background-color: white;
  padding: 4rem 0;
  padding-bottom: 8rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-grid > :nth-child(odd) {
  transform: translateY(0);
}

.project-grid > :nth-child(even) {
  transform: translateY(4rem);
}

.project-card {
  background: rgb(185, 178, 138);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  transform: translateY(0px) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}
.project-grid > :nth-child(odd):hover {
  transform: translateY(-10px) !important;
}
.project-grid > :nth-child(even):hover{
  transform: translateY(50px) !important;
}

.project-card .img-container {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-card h3 {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.project-card p {
  color: white;
  font-size: 0.95rem;
  line-height: 1.5;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: grey;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .project-grid > :nth-child(even) {
    transform: translateY(0);
  }
}

#certificates {
  background-color: white;
  color: #333;
}

#certificates .section-title {
  color: #333;
  border-bottom: 0px solid var(--accent-color);
}

.certificates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.certificate-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 4px solid var(--accent-color);
}

.certificate-card:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .certificates-grid {
    grid-template-columns: 1fr;
  }
}

.project-card img {
  max-height: 200px;
  width: 100%;
  object-fit: cover;
}

#certificates {
  background-color: white;
  color: #333;
}

#certificates .section-title {
  color: #333;
  border-bottom: 0px solid var(--accent-color);
}

.certificates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1000px; 
  margin: 0 auto;
}

.certificate-card {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border-left: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: #f5f5f5; 
}

.certificate-card:hover {
  transform: none; 
  background-color: #e8e8e8; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.certificate-card img {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 0;
}

.certificate-text {
  flex: 1;
}

.certificate-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.certificate-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.certificate-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

@media (max-width: 768px) {
  .certificates-grid {
    grid-template-columns: 1fr;
  }
}

.typing-container {
  min-height: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  height: 50px;
}

#typing-name, #typing-role {
  display: inline;
  text-align: center;
}

.mt-6 {
  min-height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.typing-cursor {
  font-size: 1em;
  display: inline-block;
  width: 10px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 1s ease-in;
}

html {
  scroll-padding-top: 80px; 
}

#about-cta {
  position: relative;
  overflow: hidden;
  top: 20px;
}

#about-cta::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
}

#about-cta::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
}

#about-cta a {
  transition: all 0.3s ease;
}

#about-cta a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

#about-cta .bg-dark-card {
  background-color: #1E1E1E;
}

@media (max-width: 640px) {
  #about-cta .flex-col > a {
    margin-bottom: 1rem;
  }
}

#contact {
  background-color: var(--dark-bg);
  color: var(--text-primary);
}

#contact .bg-dark-card {
  background-color: black;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#contact input,
#contact textarea {
  background-color: white;
  color: black;
}

#contact input::placeholder,
#contact textarea::placeholder {
  color: #777;
}

footer.bg-dark-card {
  padding: 40px 0;
  background-color: var(--dark-bg);
  margin-top: 0;
}

#contact {
  padding-bottom: 0;
}

#contact h2.section-title {
  text-align: left;
  margin-left: 70%; 
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  #contact h2.section-title {
    text-align: center;
    margin-left: 0;
  }
}

#projects img {
  border: 1px solid #000;
  box-sizing: border-box;
}

.bg-custom-brown {
  background-color: rgb(185, 178, 138);
}

#typing-cta:hover, #typing-projects:hover {
  color: grey;
}

@media (max-width: 768px) {
  #contact .flex {
    flex-direction: column-reverse;
  }
  
  #contact .md\:w-1\/2 {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  #contact h3 {
    text-align: center;
  }
  
  #contact .flex.items-center {
    justify-content: center;
    text-align: center;
  }
  
  #contact .mt-8 .flex.space-x-4 {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
  }
  
  #contact h2.section-title {
    text-align: center;
    margin-left: 0;
    width: 100%;
  }
  #loc{
    margin-left: 15px;
  }
}

@media (min-width: 769px) and (max-width: 1280px) {
  #contact h2.section-title {
    text-align: center;
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 1026px) {
  .project-grid > * {
    transform: translateY(0) !important;
  }
  
  .project-grid > :nth-child(even),
  .project-grid > :nth-child(odd) {
    transform: translateY(0) !important;
  }
  
  .project-grid > :nth-child(odd):hover,
  .project-grid > :nth-child(even):hover {
    transform: translateY(-10px) !important;
  }
}

@media (min-width: 768px) and (max-width: 1060px) {
  #hidep {
    color: rgb(185, 178, 138);
  }
}
 
#projects, #certificates {
  width: 100%;
  max-width: 100%;
  position: static;
  left: auto;
  right: auto;
  margin-left: 0;
  margin-right: 0;
  background-color: white;
  padding-left: 1rem;
  padding-right: 1rem;
  overflow: hidden;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

#projects .container,
#certificates .container {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  #about-container {
      grid-template-columns: 1fr;
      justify-items: center;
      align-items: center;
      gap: 1rem;
  }

  #about-container > div {
      width: 100%;
      text-align: center;
  }
}
@media (max-width: 768px) {
  .flex.flex-wrap.gap-2 {
    justify-content: center;
  }

  .ml-8 {
    margin-left: 0 !important;
  }

  .-mt-8 {
    margin-top: 0 !important;
  }

  .text-center-mobile {
    text-align: center;
  }

  .mx-auto-mobile {
    margin-left: auto;
    margin-right: auto;
  }

  #about-container > div > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #about-container a {
    display: inline-block;
    text-align: center;
  }
  #about-container p:nth-of-type(1),
  #about-container p:nth-of-type(2),
  #about-container p:nth-of-type(3) {
    text-align: justify;
  }
  #change{
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
  }
}
@media (max-width: 768px) {
  .project-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    min-height: 350px;
  }

  .project-card .img-container {
    flex-shrink: 0;
    height: 200px;
  }

  .project-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 1.5rem;
  }

  .project-content h3, 
  .project-content p {
    flex-grow: 1;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .project-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 50%;
  }

  .project-card .img-container {
    flex-shrink: 0;
    height: 100px;
  }

  .project-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 1.5rem;
  }

  .project-content h3, 
  .project-content p {
    flex-grow: 1;
    text-align: center;
  }
}