/* Main content, hero, components */
main {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 2rem;
  animation: fadeInMain 1.2s;
}

/* HOME PROFILE CARD SECTION */
.home-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 4rem;
}

.home-profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.home-profile-info h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0 0 0.5rem 0;
  letter-spacing: 1.2px;
}

.home-profile-info .subtitle {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.profile-bio-home {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  pointer-events: auto;
}

.profile-bio-home a {
  color: #ff3f3f;
  font-weight: 700;
  transition: color 0.3s ease;
  cursor: pointer;
  pointer-events: auto;
  display: inline;
}

.dark-theme .profile-bio-home a {
  color: #ff6b6b;
}

.profile-bio-home a:hover {
  color: #ff5555;
}

.dark-theme .profile-bio-home a:hover {
  color: #ff8888;
}

.home-social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.social-link {
  font-size: 1.5rem;
  color: #ff3f3f;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.dark-theme .social-link {
  color: #ff6b6b;
}

.social-link:hover {
  transform: scale(1.2);
  color: #ff5555;
}

.dark-theme .social-link:hover {
  color: #ff8888;
}

/* PROFILE IMAGE - HOME SECTION */
.profile-img-large {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow:
    0px 0px 25px 2px rgba(236, 0, 4, 0.5),
    0 4px 24px 0 rgba(255, 78, 80, 0.25);
  transition:
    transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55),
    box-shadow 0.3s;
}

.profile-img-large:hover {
  transform: scale(1.08) rotate(-6deg);
  box-shadow:
    0 8px 32px 0 rgba(255, 78, 80, 0.45),
    0 0 0 8px rgba(255, 255, 255, 0.12);
}

/* HERO SECTION */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  background: none;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: rgb(196, 192, 192);
  margin-bottom: 0.5rem;
  letter-spacing: 1.5px;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: rgb(140, 123, 123);
  margin-bottom: 1.5rem;
}

.hero-cta {
  margin-top: 1.5rem;
}

/* SKILLS SECTION */
.skills {
  margin-bottom: 4rem;
}

.skills h3 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: gray;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.skill-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.skill-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(255, 59, 63, 0.1);
  padding: 1.5rem 2rem;
  min-width: 150px;
  max-width: 180px;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.dark-theme .skill-card {
  background: rgba(70, 70, 70, 0.9);
  color: #f0f0f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.beige-theme .skill-card {
  background: rgba(245, 241, 232, 0.95);
  color: #5a5a5a;
  box-shadow: 0 4px 16px rgba(101, 84, 68, 0.15);
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 24px rgba(255, 59, 63, 0.2);
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}
.dark-theme .skill-icon {
  color: #b1b0a9;
}
.beige-theme .skill-icon {
  color: #8b6f47;
}
.skill-card:hover .skill-icon {
  transform: scale(1.2) rotate(5deg);
}

.skill-title {
  font-weight: 700;
  color: var(--dark);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  word-break: break-word;
  text-align: center;
}
.dark-theme .skill-title {
  color: #f0f0f0;
}
.beige-theme .skill-title {
  color: #5a5a5a;
}

/* ABOUT CONTENT LAYOUT */
.about-content {
  display: flex;
  gap: 2rem;
  margin-bottom: 4rem;
}

/* CONTACT SECTION INTRO */
.contact-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.contact-intro h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--secondary); /* changed color for emphasis */
}

/* container for intro + form layout */
.contact-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* two-column on larger screens */
@media (min-width: 768px) {
  .contact-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }
  .contact-intro,
  #contactForm {
    flex: 1;
  }
  .contact-intro {
    text-align: left;
    margin-bottom: 0;
  }
}

.contact-intro p {
  font-size: 1rem;
  color: var(--dark);
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.contact-info .contact-item {
  font-size: 1rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--background-alt); /* subtle background */
  transition:
    background 0.3s,
    color 0.3s;
}

/* individual colored blocks */
.contact-info .email-item {
  background: #e0f7fa;
}
.contact-info .phone-item {
  background: #e8f5e9;
}
.contact-info .location-item {
  background: #fff3e0;
}

/* ensure hover still works regardless of base color */
.contact-info .contact-item:hover {
  background: var(--primary-alt);
  color: #fff;
}

.contact-info .contact-item:hover i {
  color: #fff;
}

.contact-info .contact-item i {
  margin-right: 0.5rem;
  color: var(--primary);
}

.contact-info .contact-item:hover {
  background: var(--primary-alt);
  color: #fff;
}

.contact-info .contact-item:hover i {
  color: #fff;
}

.left-column,
.right-column {
  flex: 1;
}

/* PERSONAL DETAILS */
.personal-details {
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(255, 59, 63, 0.1);
  padding: 1.5rem;
  margin-top: 0;
  background: transparent;
}

.dark-theme .personal-details {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.beige-theme .personal-details {
  box-shadow: 0 4px 16px rgba(101, 84, 68, 0.15);
}

.personal-details h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
  text-align: center;
}

.personal-details p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.personal-details i {
  margin-right: 0.5rem;
  color: var(--primary);
  width: 20px;
  text-align: center;
}

.personal-details a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.personal-details a:hover {
  text-decoration: underline;
  color: #0056b3;
}

/* Detail Item Hover Animation */
.detail-item {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
}

.dark-theme .detail-item {
  background: rgba(100, 100, 100, 0.5);
}

.beige-theme .detail-item {
  background: rgba(245, 241, 232, 0.7);
}

.detail-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

.dark-theme .detail-item:hover {
  background: rgba(120, 120, 120, 0.7);
}

.beige-theme .detail-item:hover {
  background: rgba(255, 250, 240, 0.9);
}

/* EXPERIENCE & EDUCATION */
.timeline {
  margin: 0 auto 4rem auto;
  max-width: 700px;
  border-left: 4px solid var(--primary);
  padding-left: 2rem;
}

.timeline-item {
  margin-bottom: 2.5rem;
  position: relative;
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.2rem;
  top: 0.2rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(255, 59, 63, 0.27);
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgb(176, 133, 133);
}
.timeline-date {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 0.2rem;
}
.timeline-desc {
  color: #b5abab;
  font-size: 1rem;
}

/* PROJECTS */
#projects {
  padding: 4rem 1.5rem 6rem;
}

#projects h2 {
  font-size: 2.4rem;
  letter-spacing: 1px;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
}

#projects h2::after {
  content: "";
  width: 4.5rem;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  display: block;
  margin: 1rem auto 0;
  border-radius: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.project-card {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.25), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.32),
    0 0 0 6px rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.18);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-bottom: 3px solid var(--primary);
  transition: transform 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.6rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

/* Dark mode: boost heading contrast */
body.dark-theme .project-content h3 {
  color: #ffd876;
}

.project-content p {
  flex-grow: 1;
  color: #dcdcdc;
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

/* Light mode: use darker body text for better readability */
body.beige-theme .project-content p {
  color: #333333;
}

.project-tags {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 600;
  letter-spacing: 0.4px;
}
.project-content .btn {
  padding: 0.6rem 1.35rem;
  font-size: 0.95rem;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(255, 59, 63, 0.18);
}

.project-content .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(255, 59, 63, 0.22);
}

/* TESTIMONIALS */
.testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.testimonial {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(255, 59, 63, 0.1);
  padding: 1.5rem 2rem;
  max-width: 350px;
  font-style: italic;
  color: #333;
  position: relative;
}

.testimonial::before {
  content: "“";
  font-size: 2.5rem;
  color: var(--primary);
  position: absolute;
  left: 1rem;
  top: 0.5rem;
}

.testimonial-author {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1rem;
}

/* CONTACT FORM */
#contact form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

#contact label {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: rgb(117, 91, 91);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.9rem;
}

#contact input,
#contact textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
  font-family: inherit;
  color: #333;
  background-color: #f9f9f9;
}

.dark-theme #contact input,
.dark-theme #contact textarea {
  background-color: #3a3a3a;
  color: #f0f0f0;
  border-color: #c7c6bf;
}
.dark-theme #contact p {
  color: #ffffff;
}
.beige-theme #contact input,
.beige-theme #contact textarea {
  background-color: #fffcf7;
  color: #5a5a5a;
  border-color: #8b6f47;
}

#contact input:focus,
#contact textarea:focus {
  border-color: var(--primary-dark);
  outline: none;
  box-shadow: 0 0 5px rgba(208, 32, 37, 0.67);
}

.dark-theme #contact input:focus,
.dark-theme #contact textarea:focus {
  border-color: #ffd700;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}
.beige-theme #contact input:focus,
.beige-theme #contact textarea:focus {
  border-color: #8b6f47;
  box-shadow: 0 0 5px rgba(139, 111, 71, 0.3);
}

#contact button {
  background: var(--primary);
  color: white;
  font-weight: 900;
  border: none;
  padding: 1rem;
  font-size: 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: background-color 0.3s ease;
}

#contact button:hover {
  background: var(--primary-dark);
}

/* small viewport adjustments for main container */
@media (max-width: 640px) {
  main {
    margin: 2rem auto;
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
  }
}

/* Typewriter Animation */
.typewriter {
  overflow: hidden;
  border-right: 2px solid;
  white-space: nowrap;
  animation:
    typing 3.5s steps(40, end),
    blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: currentColor;
  }
}
