body {
  width: 100%;
  color: #23272f;
  background: #f7f8fa;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: "Poppins", "Nanum Myeongjo", serif;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.profile-pic {
  width: 180px;
  height: 180px;
  margin: 36px auto 18px auto;
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: block;
  border: 4px solid #23a6d5;
  animation: bounceIn 1s ease-out, float 3s ease-in-out infinite 1s;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(35, 166, 213, 0.3);
}

hr {
  width: 320px;
  border-width: 2px;
  border-color: #e0e0e0;
  margin: 32px auto;
}

.edu {
  display: block;
  text-align: center;
  margin: 0;
  background: transparent;
  border-radius: 18px;
  padding: 24px 0 16px 0;
  animation: fadeIn 1s ease-out 2.5s both;
}

.edu > h1 {
  font-weight: 700;
  color: #23a6d5;
  padding: 10px 0 6px 0;
  font-size: 2.1rem;
  letter-spacing: 1px;
  position: relative;
}

.edu > h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff9800, #23a6d5);
  border-radius: 2px;
  animation: expandWidth 1s ease-out 3s forwards;
}

@keyframes expandWidth {
  to {
    width: 80%;
  }
}

.list-tag {
  display: inline-block;
  text-align: center;
  font-size: 1.1rem;
  color: #444;
  margin: 0 8px;
}

#experience {
  background-color: #4c6d86;
  color: #fff;
  padding: 4em 2em 3em;
  font-size: 1.3rem;
  text-align: center;
  border-radius: 18px;
  margin: 0;
  box-shadow: 0 4px 24px rgba(76, 109, 134, 0.13);
}

#experience svg {
  color: #ff7043;
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 10px;
}

.skill-category {
  flex: 0 0 calc(25% - 20px);
  min-width: 200px;
  margin-bottom: 25px;
  padding: 15px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.6s ease-out forwards;
}

.skill-category:nth-child(1) {
  animation-delay: 0.1s;
}
.skill-category:nth-child(2) {
  animation-delay: 0.2s;
}
.skill-category:nth-child(3) {
  animation-delay: 0.3s;
}
.skill-category:nth-child(4) {
  animation-delay: 0.4s;
}
.skill-category:nth-child(5) {
  animation-delay: 0.5s;
}
.skill-category:nth-child(6) {
  animation-delay: 0.6s;
}
.skill-category:nth-child(7) {
  animation-delay: 0.7s;
}
.skill-category:nth-child(8) {
  animation-delay: 0.8s;
}

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

.skill-category:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.15);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin: 8px 0;
  font-weight: 600;
}

.skill-category p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .skill-category {
    flex: 0 0 calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .skill-category {
    flex: 0 0 100%;
  }
}

#email,
#full_name,
#message {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  margin: 8px 0;
  width: 100%;
  max-width: 350px;
  background: #f1f3f4;
  height: 48px;
  border-radius: 25px;
  border: 1.5px solid #d1d5db;
  padding: 0 24px;
  box-sizing: border-box;
  transition: border 0.2s, background 0.2s;
}

#message {
  height: 120px;
  width: 100%;
  max-width: 457px;
  padding: 12px 20px;
  border: 1.5px solid #bdbdbd;
}

#email:focus,
#full_name:focus,
#message:focus {
  border: 2px solid #23a6d5;
  background-color: #fff;
  color: #222;
  outline: none;
}

#center {
  margin: 0;
  text-align: center;
  padding: 2.5em 2em 4em;
  background-image: url("img/Eraj_Cover.jpg");
  background-size: cover;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

#center > h2 {
  font-weight: 700;
  font-size: 2.2rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  animation: fadeIn 1s ease-out 0.5s both;
}

#center > .about_me {
  animation: fadeIn 1s ease-out 1s both;
}

#center > .contact-button {
  text-transform: uppercase;
  font-weight: 600;
  border: 2px solid #ff9800;
  padding: 12px 32px;
  text-decoration: none;
  color: #ff9800;
  border-radius: 45px;
  background: #fff;
  transition: all 0.3s ease;
  margin-top: 18px;
  display: inline-block;
  animation: scaleIn 1s ease-out 1.5s both;
}

#center > .contact-button:hover {
  background-color: #ff9800;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
  transform: translateY(-2px);
}

.front-icon {
  animation: slideInLeft 1s ease-out 2s both;
}

.front-icon svg {
  text-align: center;
  color: #ff9800;
  transition: all 0.3s ease;
}

.front-icon svg:hover {
  transform: scale(1.3) rotate(5deg);
  color: #23a6d5;
  filter: drop-shadow(0 0 8px rgba(35, 166, 213, 0.6));
}

table {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  background-color: #fffbe7;
  text-align: center;
  margin: 32px auto;
  border-radius: 10px;
  overflow: hidden;
}

/* Override for education table to ensure transparency */
.edu table {
  background-color: transparent;
}

th,
td {
  border: 1.5px solid #ffe0b2;
  padding: 10px 16px;
}

th {
  background-color: #23a6d5;
  color: #fff;
  font-weight: 600;
}

th:hover,
td:hover,
img:hover {
  cursor: pointer;
  transition: 0.3s;
  transform: scale(1.05);
}

img:hover {
  box-shadow: 0 2px 12px rgba(35, 166, 213, 0.13);
}

.about_me {
  color: #23a6d5;
  font-size: 1.3rem;
  font-style: italic;
  padding: 8px 0;
  font-weight: 600;
}

#projects {
  background-color: #fff;
  background-image: linear-gradient(
    to bottom right,
    rgba(35, 166, 213, 0.03),
    rgba(255, 255, 255, 0.8),
    rgba(255, 152, 0, 0.03)
  );
  background-size: cover;
  padding: 30px 0 50px 0;
  margin: 0;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
  overflow: hidden;
  /* Ensure content is always visible */
  visibility: visible !important;
  opacity: 1 !important;
}

#projects::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #ff9800, #23a6d5);
  z-index: 2;
}

#projects > h1 {
  text-align: center;
  margin-top: 10px;
  font-size: 2.5rem;
  padding-top: 18px;
  color: #23a6d5;
  font-weight: 700;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

#projects > h1::after {
  content: "";
  display: block;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff9800, transparent);
  margin: 10px auto 0;
  border-radius: 2px;
}

#projects > p {
  text-align: center;
  font-size: 1.2rem;
  color: #444;
}

#projects a {
  border: 2px solid #23a6d5;
  padding: 12px 28px;
  text-decoration: none;
  color: #23a6d5;
  border-radius: 45px;
  background: #fff;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}

#projects a:hover {
  background-color: #23a6d5;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(35, 166, 213, 0.13);
}

.proj-1,
.proj-2,
.proj-3 {
  display: inline-block;
  width: 31%;
  font-size: 1.3rem;
  padding: 32px 2% 32px 2%;
  text-align: left;
  vertical-align: top;
  background: #f9fafb;
  border-radius: 12px;
  margin: 18px 1%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* --- Modern Project Section Layout --- */
.project {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin: 32px auto;
  max-width: 950px;
  padding: 32px 28px;
  gap: 36px;
  flex-wrap: wrap;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(35, 166, 213, 0.1);
}
.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.project-img {
  flex: 0 0 220px;
  max-width: 220px;
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(35, 166, 213, 0.2);
  pointer-events: none;
}

.project-img img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(35, 166, 213, 0.15);
  transition: transform 0.3s ease;
}

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

.project-info {
  flex: 1 1 320px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-info h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #23a6d5;
  font-weight: 700;
  text-align: left;
}
.project-info h5 {
  margin: 8px 0 18px 0;
  color: #ff9800;
  font-size: 1.1rem;
  font-weight: 500;
}
.project-info p {
  color: #444;
  margin-bottom: 0;
  font-size: 1.08rem;
}
@media (max-width: 900px) {
  .project {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 8px;
    gap: 18px;
  }
  .project-img,
  .project-info {
    min-width: 0;
    max-width: 100%;
  }
  .project-info h3 {
    text-align: center;
  }
}

/* Remove old float-based project image rules */
.proj-1-img,
.proj-2-img,
.proj-3-img,
.proj-2-img-sm,
.proj-3-img-sm {
  display: none !important;
}

.contact-area {
  background-color: rgba(255, 103, 68, 0.91);
  background-image: url("img/yannis-papanastasopoulos-U6dnImauDAE-unsplash.jpg");
  background-size: cover;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(255, 103, 68, 0.13);
  padding: 2.5em 2em 4em;
  margin: 0;
}

.contact-area > h2 {
  text-align: center;
  margin-top: 0;
  padding-top: 25px;
  font-size: 2rem;
  color: #fff;
  font-weight: 700;
}

.message-content {
  display: inline-block;
  text-align: center;
  color: #fff;
  background: rgba(76, 109, 134, 0.85);
  border-radius: 12px;
  padding: 24px 32px;
  margin: 0 16px;
}

.message-content h3 {
  margin-top: 0px;
  font-size: 1.3rem;
  font-weight: 600;
}

.contact-info {
  display: inline-block;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 24px 32px;
  margin: 0 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.contact-info h2 {
  margin-bottom: 8px;
  font-size: 1.3rem;
  font-weight: 600;
}

.contact-info p {
  color: #fff;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.contact-info a {
  color: #23a6d5;
  font-size: 1.5rem;
  margin: 0 8px;
  transition: color 0.3s, transform 0.3s;
}

.contact-info a:hover {
  color: #ff9800;
  transform: scale(1.2);
}

iframe {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(35, 166, 213, 0.13);
  opacity: 0.8;
  background: transparent;
}

.button_reset {
  background-color: transparent;
  border: 2px solid #ff0000da;
  border-radius: 16px;
  color: #ff0000da;
  padding: 0.5em 1.7em;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  outline: none;
  font-weight: 600;
  margin: 0 8px;
  transition: background 0.3s, color 0.3s;
}

.button_submit {
  background-color: transparent;
  border: 2px solid #23a6d5;
  border-radius: 16px;
  color: #23a6d5;
  padding: 0.6em 1.8em;
  text-align: center;
  font-size: 1rem;
  outline: none;
  font-weight: 600;
  margin: 0 8px;
  transition: background 0.3s, color 0.3s;
}

.button_reset:hover {
  background-color: #ff0000da;
  color: #fff;
}

.button_submit:hover {
  background-color: #23a6d5;
  color: #fff;
}

footer {
  font-size: 1.2rem;
  border-top: 2px solid #e0e0e0;
  text-align: center;
  background-color: #222;
  color: #fff;
  padding: 12px 0;
  border-radius: 0;
  width: 100vw;
  left: 0;
  bottom: 0;
  position: relative;
  margin: 0;
}

/* Project-specific link styling */
.proj-1 a,
.proj-2 a,
.proj-3 a {
  border: 2px solid #23a6d5;
  padding: 8px 20px;
  text-decoration: none;
  color: #23a6d5;
  border-radius: 25px;
  background: #fff;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
  display: inline-block;
  margin-top: 12px;
}

.proj-1 a:hover,
.proj-2 a:hover,
.proj-3 a:hover {
  background-color: #23a6d5;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(35, 166, 213, 0.2);
}

/* --- Education Table Modern Border --- */
.edu table {
  border-collapse: separate;
  border-spacing: 0;
  max-width: 480px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid rgba(35, 166, 213, 0.5);
  margin: 0 auto 0 auto;
  font-size: 0.95rem;
  background: transparent;
}
.edu th,
.edu td {
  border: none;
  border-bottom: 1px solid rgba(224, 234, 243, 0.3);
  padding: 6px 10px;
  font-size: 0.95rem;
  background: transparent;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.edu th {
  background: rgba(35, 166, 213, 0.7);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}
.edu tr:last-child td {
  border-bottom: none;
}
.edu tr {
  background: transparent;
}
.edu tr:nth-child(even) {
  background: rgba(234, 246, 251, 0.1);
}

/* --- Map Alignment Fix --- */
.myMap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  width: 100%;
  background: transparent;
}
.myMap iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(35, 166, 213, 0.13);
  opacity: 0.85;
  filter: grayscale(20%);
}

#projects .project {
  margin: 32px auto 0 auto;
}

#projects .project:last-child {
  margin-bottom: 20px;
}

/* --- Work Experience Section Styling --- */
#work-experience {
  background-color: #fff;
  background-image: linear-gradient(
      to top right,
      rgba(255, 152, 0, 0.03),
      rgba(255, 255, 255, 0.8),
      rgba(35, 166, 213, 0.03)
    ),
    repeating-linear-gradient(
      45deg,
      #f8f9fa 0px,
      #f8f9fa 10px,
      #ffffff 10px,
      #ffffff 20px
    );
  background-size: cover, 20px 20px;
  padding: 1em 2em 2.5em;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin: 0;
  position: relative;
  z-index: 1;
  /* Ensure content is always visible */
  visibility: visible !important;
  opacity: 1 !important;
}

#work-experience::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(35, 166, 213, 0.6),
    transparent
  );
  z-index: -1;
}

#work-experience h2 {
  text-align: center;
  font-size: 2.2rem;
  color: #23a6d5;
  font-weight: 700;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.job {
  max-width: 900px;
  margin: 0 auto 22px auto;
  padding: 18px 25px;
  border-radius: 12px;
  background: #f8f9fa;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #23a6d5;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateX(-50px);
  animation: slideInLeft 0.8s ease-out forwards;
}

.job:nth-child(2) {
  animation-delay: 0.2s;
}
.job:nth-child(3) {
  animation-delay: 0.4s;
}
.job:nth-child(4) {
  animation-delay: 0.6s;
}
.job:nth-child(5) {
  animation-delay: 0.8s;
}

.job:hover {
  transform: translateY(-5px) translateX(5px);
  box-shadow: 0 8px 25px rgba(35, 166, 213, 0.15);
  border-left-color: #ff9800;
  background: #ffffff;
}

.job:last-child {
  margin-bottom: 0;
}

.job-header {
  margin-bottom: 16px;
}

.job-header h3 {
  font-size: 1.35rem;
  color: #23272f;
  margin: 0 0 6px 0;
  font-weight: 600;
}

.job-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.company {
  font-weight: 600;
  color: #23a6d5;
  font-size: 1.1rem;
}

.job-date {
  color: #666;
  font-style: italic;
}

.job-description {
  margin: 0;
  padding: 0 0 0 18px;
}

.job-description li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: #444;
}

@media (max-width: 768px) {
  .job-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .job {
    padding: 16px 18px;
  }
}

/* --- Section separator styling --- */
.section-separator {
  height: 0;
  position: relative;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.2)
  );
  margin: 0;
  z-index: 2;
  overflow: visible;
}

.section-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ffffff, #f7f9fc);
  border-radius: 50%;
  box-shadow: 0 2px 15px rgba(35, 166, 213, 0.2);
  z-index: 3;
}

.section-separator::before {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #23a6d5;
  font-size: 20px;
  text-shadow: 0 0 10px rgba(35, 166, 213, 0.3);
  z-index: 4;
  animation: separatorPulse 2s infinite;
}

.section-separator:hover::before {
  animation: none;
  transform: translate(-50%, -50%) scale(1.2);
}

@keyframes separatorPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Animation keyframes for improved user experience */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(35, 166, 213, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(35, 166, 213, 0.8);
  }
}

/* Apply animations on scroll with intersection observer */
.animate-on-scroll {
  opacity: 1 !important; /* Always visible by default */
  animation-fill-mode: forwards;
}

/* Ensure sections and their content are always visible */
#work-experience,
#projects,
#work-experience *,
#projects * {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Optional animation effects that don't interfere with visibility */
.animate-on-scroll.visible {
  animation: fadeIn 0.8s ease forwards;
}

/* Remove problematic opacity overrides */
.job,
.project {
  visibility: visible !important;
  opacity: 1 !important;
}
