* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* About Page Styles */
.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: var(--text-color);
}

/* Hero Section */
.about-hero {
  margin-bottom: 4rem;
  padding: 2rem 0;
}

.about-hero h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  color: var(--heading-color);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.about-text {
  flex: 1;
  line-height: 1.6;
}

h6 {
  font-size: 2rem;
  font-weight: 700;
}

.gmail {
  font-size: 1.2em;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.redbeam-link {
  color: #e81515;
  text-decoration: none;
  font-weight: 500;
}

.redbeam-link:hover {
  text-decoration: underline;
}

.contact-info p {
  font-size: 1.2rem !important;
  line-height: 3rem;
  text-align: left;
  font-weight: 400;
}

@media screen and (min-width: 768px) {
  .contact-flex {
    position: relative;
  }

  .button {
    margin: 0.5rem 0 0 0; /* Reduced top margin to move button up */
    align-self: flex-start; /* Align with the left edge of contact-flex */
  }

  .gmail {
    font-size: 1.7em;
    align-self: center;
  }

  .number {
    font-size: 1.7em !important;
  }

  .contact-info p {
    font-size: 1.7em !important;
  }
}

.button {
  padding: 28px 52px;
  border-radius: 16px;
  background-color: #fff;
  box-shadow: 0 2px 23px 0 rgba(0, 0, 0, 0.2);
  color: #000000;
  font-size: 20px;
  line-height: 1em;
  font-weight: 400;
  text-align: center;
  width: 213px;
  display: block;
  border: solid 1px black;
  margin-top: 1rem;
}

.contact-flex {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  justify-content: center;
  margin-top: -3em;
  width: fit-content;
}

.about-image {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.fa-envelope {
  align-self: end;
}

/* Section Headers */
.skills-section,
.experience-section,
.education-section {
  margin: 5rem 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.skills-section h2,
.experience-section h2,
.education-section h2 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  color: var(--heading-color);
  position: relative;
  display: inline-block;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.skills-section h2::after,
.experience-section h2::after,
.education-section h2::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-color), #a78bfa);
  border-radius: 4px;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  justify-content: center; /* centers the grid items */
  max-width: 1200px; /* optional: limits total grid width */
  margin-left: auto; /* centers the grid container itself */
  margin-right: auto;
}

.skill-category {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-color), #8b5cf6);
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.skill-category h3 {
  color: var(--heading-color);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-category h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
}

.skill-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.skill-category li {
  margin: 0;
  padding: 0.8rem 1rem;
  background: var(--card-bg-secondary);
  border-radius: 8px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.skill-category li:hover {
  transform: translateX(5px);
  background: var(--card-bg-hover);
}

.skill-category li::before {
  content: "→";
  color: var(--accent-color);
  margin-right: 10px;
  font-size: 1.1rem;
  position: static;
  top: auto;
  left: auto;
}

/* Footer */
footer {
  position: absolute;
  left: 0;
  transform: translateY(0.5rem);
  background-color: var(--footer-bg);
  width: 100%;
  height: auto;
  margin: auto;
  display: flex;
  gap: 1.25rem;
  padding: 0.7rem 1rem;
  margin-top: 2rem;
  color: var(--footer-text);
}

.icon {
  color: var(--footer-text);
  transition: all 0.3s ease-in-out;
}

.icon i {
  font-size: 1.3125rem;
}

.icon:hover {
  transform: scale(1.5) rotate(36deg);
}

.copyrighttext {
  font-size: 0.75rem;
  margin-left: auto;
}

.fa-envelope {
  margin-top: -0.625rem;
}

.fa-bars {
  font-size: 1.563rem;
  color: var(--icon-text);
  background: var(--icon-bg);
  width: 2.813rem;
  border-radius: 0.875rem;
  text-align: center;
  height: 2.813rem;
  box-shadow: 0 0.188rem 1.063rem 0 rgba(0, 0, 0, 0.5);
  padding: 0.625rem;
}

.fa-xmark {
  font-size: 1.563rem;
  color: var(--icon-text);
  background: var(--icon-bg);
  width: 2.813rem;
  border-radius: 0.875rem;
  text-align: center;
  height: 2.813rem;
  box-shadow: 0 0.188rem 1.063rem 0 rgba(0, 0, 0, 0.5);
  padding: 0.625rem;
}

/* Experience & Education Cards */
.experience-grid,
.education-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.experience-card,
.education-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.experience-card::before,
.education-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
  transition: all 0.3s ease;
}

.experience-card:hover,
.education-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.experience-card h3,
.education-card h3 {
  color: var(--heading-color);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.experience-card h3::after,
.education-card h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.company,
.institution {
  color: var(--accent-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
}

.company::before,
.institution::before {
  content: "🏢";
  font-size: 1.2rem;
}

.institution::before {
  content: "🎓";
}

/* Mobile and tablet styles */
.duration {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
}

/* Desktop - reset the margin */
@media (min-width: 1440px) {
  .duration {
    margin-top: 0;
  }
}

.duration::before {
  content: "📅";
  font-size: 1rem;
}

.experience-card ul {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.experience-card li {
  margin: 0;
  padding: 0.8rem 1rem;
  background: var(--card-bg-secondary);
  border-radius: 8px;
  position: relative;
  transition: all 0.2s ease;
  line-height: 1.6;
  border-left: 3px solid var(--accent-color);
}

/* Education Card Specific */
.education-card p:last-child {
  background: var(--card-bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
  margin-top: 11px;
}

/* Reset margin on desktop */
@media (min-width: 1440px) {
  .education-card p:last-child {
    margin-top: 0;
  }
}

/* Responsive Design */
@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-text {
    padding-right: 2rem;
  }

  .contact-flex {
    margin-top: -5em;
  }

  .about-image {
    margin-top: 1rem;
  }

  .experience-grid,
  .education-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .button {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
  }

  .button:hover {
    transform: scale(1.1);
  }

  .nav-bar {
    gap: 19px !important;
  }

  .contact-info {
    display: flex;
    gap: 1rem;
  }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .skill-category,
[data-theme="dark"] .experience-card,
[data-theme="dark"] .education-card {
  background-color: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .skill-category:hover,
[data-theme="dark"] .experience-card:hover,
[data-theme="dark"] .education-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1440px) {
  .about-text p {
    line-height: 2.5rem;
  }
}

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