* {
  box-sizing: border-box;
}

html {
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}




/* Main Page Layout */

#main-content {
  margin: 225px 69px 96px 69px; /* Top: 225px, Right: 69px, Bottom: 96px, Left: 69px */
  display: flex;
  flex-direction: column;
  gap: 96px;
  max-width: 100%;
}

/* Remove the complex container system - use simple margins instead */

/* Section spacing */
.section {
  margin-bottom: 96px;
}

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

/* About page specific styles */
.about-section {
  margin-bottom: 96px;
}

.about-section:last-child {
  margin-bottom: 0;
}

/* Gallery page specific styles */
.gallery-section {
  margin-bottom: 80px;
}

.gallery-section:last-child {
  margin-bottom: 0;
}




/* Portfolio Header */

#portfolio-header {
  display: flex;
  gap: 80px;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
}

#portfolio-header-image-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-basis: 45%;
  animation: slideInLeft 1.5s ease-out;
}

.portfolio-header-image {
  width: 100%;
  height: auto;
}

#portfolio-header-text-container {
  display: flex;
  flex-direction: column;
  gap: 34px;
  flex-basis: 45%;
  animation: slideInLeft 1.5s ease-out 0.3s both;
}




/* About Section */

#about-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-section-content {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* About page timeline */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #2c1810;
  /* Add hand-drawn waviness */
  border-radius: 1px;
  transform: rotate(1deg);
  transform-origin: center;
}

.timeline-item {
  position: relative;
  margin: 0 0 50px 0;
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  justify-content: flex-start;
}

.timeline-item:nth-child(even) {
  justify-content: flex-end;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: #f8f4f0;
  border: 2px solid #2c1810;
  /* Hand-drawn irregular circle */
  border-radius: 60% 40% 50% 45% / 45% 50% 40% 60%;
  box-shadow: 0 2px 8px rgba(44, 24, 16, 0.3);
  transform: translate(-50%, -50%) rotate(25deg);
  z-index: 2;
}

.timeline-marker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #2c1810;
  /* Hand-drawn irregular inner circle */
  border-radius: 40% 60% 50% 45% / 45% 50% 60% 40%;
  transform: translate(-50%, -50%);
}

.timeline-content {
  width: 42%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: #fefefe;
  border: 2px solid #2c1810;
  /* Hand-drawn wavy border */
  border-radius: 25px 15px 30px 20px / 20px 30px 15px 25px;
  box-shadow: 
    0 3px 12px rgba(44, 24, 16, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  transition: all 0.3s ease;
  /* Slight rotation for hand-drawn feel */
  transform: rotate(-0.5deg);
}

.timeline-content:hover {
  box-shadow: 0 6px 20px rgba(44, 24, 16, 0.25);
  transform: rotate(-0.5deg) translateY(-3px);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: 50%;
  text-align: left;
  transform: rotate(0.5deg);
}

.timeline-item:nth-child(odd) .timeline-content:hover {
  transform: rotate(0.5deg) translateY(-3px);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 50%;
  text-align: left;
  transform: rotate(-0.5deg);
}

.timeline-item:nth-child(even) .timeline-content:hover {
  transform: rotate(-0.5deg) translateY(-3px);
}

.timeline-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.timeline-item:nth-child(odd) .timeline-row {
  align-items: flex-end;
}

.timeline-institution {
  font-size: 18px;
  color: #2c1810;
  font-weight: 700;
  /* Hand-drawn text effect */
  text-shadow: 1px 1px 0 rgba(44, 24, 16, 0.1);
  font-family: "Comic Sans MS", cursive, sans-serif;
}

.timeline-date {
  color: #5d4e37;
  font-style: italic;
  font-size: 14px;
  font-family: "Comic Sans MS", cursive, sans-serif;
}

/* Hide work responsibilities by default */
.timeline-content ul {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
  margin: 0;
  padding: 0;
  font-family: "Comic Sans MS", cursive, sans-serif;
}

/* Show work responsibilities on hover */
.timeline-content:hover ul {
  max-height: 200px;
  opacity: 1;
  margin: 8px 0 0 0;
  padding-left: 20px;
}




/* Project Section */

#my-work-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.projects-container {
  display: flex;
  gap: 34px 16px;
  flex-wrap: wrap;
}

    /* Project Cards */

    .project-card {
      max-width: calc((100% - 32px) / 3);
      display: flex;
      flex-direction: column;
      gap: 34px;
    }

    .project-card-text-container {
      flex-direction: column;
      display: flex;
      gap: 16px
    }

    .project-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
      object-position: center;
    }




/* Project Pages */

#project-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-header-image {
  width: 60%;
  height: auto;
  max-width: 600px;
  align-self: center;
}

#project-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-details-content {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

    /* Project Gallery */

    #project-gallery {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .project-gallery-content {
      display: flex;
      flex-wrap: wrap;
      gap: 34px 16px;
    }

    .gallery-image-container {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .gallery-image-container.half-width {
      width: calc((100% - 16px) / 2);
      max-width: 400px;
    }

    .gallery-image {
      width: 100%;
      height: auto;
      object-fit: contain;
      object-position: center;
      max-width: 100%;
      max-height: none;
    }


/* Extra Extra large devices (large laptops and desktops, 1200px and below) */
@media only screen and (max-width: 1600px) {
  #main-content {
    margin: 225px 69px 96px 69px;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and below) */
@media only screen and (max-width: 1200px) {
  #main-content {
    margin: 225px 69px 96px 69px;
  }
}

/* Large devices (laptops/desktops, 1000px and below) */
@media only screen and (max-width: 1000px) {
  #main-content {
    margin: 225px 69px 96px 69px;
  }
}

/* Small devices (portrait tablets and large phones, 800px and below) */
@media only screen and (max-width: 800px) {
  #main-content {
    margin: 150px 50px;
  }

  #portfolio-header {
    flex-direction: column;
  }

  .project-card {
    max-width: calc((100% - 16px) / 2);
  }
}

/* Small devices (portrait tablets and large phones, 600px and below) */
@media only screen and (max-width: 600px) {
  #main-content {
    margin: 125px 20px;
  }

  .project-card {
    max-width: 100%;
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-80px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Gallery Styles */
.gallery-section {
  margin-bottom: 80px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(250px, auto);
  gap: 8px;
  margin-top: 20px;
}

.gallery-item {
  position: relative;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  transition: all 0.3s ease;
  cursor: pointer;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: none;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  max-width: 100%;
  max-height: 100%;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.gallery-caption {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  line-height: 1.4;
}

/* Video placeholders */
.video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2c1810;
  text-align: center;
}

.play-button {
  font-size: 48px;
  color: #8B0000;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.video-placeholder p {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

/* Responsive gallery grid */
@media only screen and (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media only screen and (max-width: 800px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 6px;
  }
  
  .gallery-item.large {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media only screen and (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(250px, auto);
    gap: 6px;
  }
}

/* Gallery Preview Section (Main Page) */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.gallery-preview-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-preview-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-preview-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-preview-item:hover img {
  transform: scale(1.05);
}

.gallery-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-preview-item:hover .gallery-preview-overlay {
  transform: translateY(0);
}

.gallery-preview-overlay h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
}

.gallery-preview-overlay p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.4;
}

.gallery-preview-cta {
  text-align: center;
}

.cta-button {
  display: inline-block;
  background: #8B0000;
  color: white;
  padding: 12px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #8B0000;
}

.cta-button:hover {
  background: transparent;
  color: #8B0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.2);
}

/* Contact Section Styles */
.contact-content {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  margin: 0 0 16px 0;
  font-size: 24px;
  color: #2c1810;
}

.contact-info p {
  margin: 0 0 24px 0;
  line-height: 1.6;
  color: #666;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon {
  font-size: 20px;
}

.contact-item a {
  color: #8B0000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #660000;
}

.contact-form {
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8B0000;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-button {
  background: #8B0000;
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-button:hover {
  background: #660000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.2);
}

/* Responsive Gallery Preview */
@media only screen and (max-width: 1200px) {
  .gallery-preview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media only screen and (max-width: 900px) {
  .gallery-preview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .gallery-preview-item.large {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .contact-content {
    flex-direction: column;
    gap: 40px;
  }
}

@media only screen and (max-width: 600px) {
  .gallery-preview-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .gallery-preview-overlay {
    transform: translateY(0);
    background: rgba(0, 0, 0, 0.7);
  }
}

/* RESUME PAGE STYLES */
.resume-section {
  margin-bottom: 48px;
}

.resume-content {
  max-width: 100%;
}

.contact-item {
  margin-bottom: 16px;
  line-height: 1.6;
}

.contact-item a {
  color: #8B0000;
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

.education-item {
  margin-bottom: 32px;
  padding: 24px;
  border-left: 3px solid #8B0000;
  background-color: #fafafa;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 16px;
}

.education-date {
  color: #666;
  font-size: 0.9em;
  white-space: nowrap;
}

.education-degree {
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
}

.education-location {
  color: #666;
  font-size: 0.9em;
}

.experience-item {
  margin-bottom: 32px;
  padding: 24px;
  border-left: 3px solid #8B0000;
  background-color: #fafafa;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 16px;
}

.experience-date {
  color: #666;
  font-size: 0.9em;
  white-space: nowrap;
}

.experience-company {
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
}

.experience-location {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 16px;
}

.experience-details {
  margin: 0;
  padding-left: 20px;
}

.experience-details li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #555;
}

.project-item {
  margin-bottom: 24px;
  padding: 20px;
  border-left: 3px solid #8B0000;
  background-color: #fafafa;
}

.project-header {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.project-company {
  font-style: italic;
  color: #666;
  margin-bottom: 12px;
  font-size: 0.9em;
}

.project-details {
  margin: 0;
  padding-left: 20px;
}

.project-details li {
  margin-bottom: 6px;
  line-height: 1.5;
  color: #555;
}

.skills-category {
  margin-bottom: 16px;
  line-height: 1.6;
  color: #555;
}

.skills-category strong {
  color: #333;
}

/* Responsive adjustments for resume */
@media (max-width: 768px) {
  .education-header,
  .experience-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .education-date,
  .experience-date {
    white-space: normal;
  }
  
  .education-item,
  .experience-item,
  .project-item {
    padding: 16px;
  }
}



