/* ===== CSS RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-green: #218576;
  --dark-green: #1d5d5b;
  --deep-green: #1a3c3b;
  --white: #ffffff;
  --light-gray: #f9fafa;
  --medium-gray: #e5e7eb;
  --dark-gray: #4b5563;
  --text-color: #2c3e50;
  --light-text: #ffffff;

  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --line-height: 1.6;

  --container-max-lg: 1400px;
  --container-max-md: 1000px;

  --transition: all 0.3s ease;
  --border-radius: 6px;
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);

  --mobile: 767px;
  --tablet: 1024px;
  --desktop: 1025px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height);
  color: var(--text-color);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER ===== */
.main-header {
  background: linear-gradient(
    135deg,
    var(--deep-green) 0%,
    var(--dark-green) 100%
  );
  color: var(--light-text);
  padding: 3rem 1.5rem;
  text-align: center;
}

.header-container {
  max-width: var(--container-max-md);
  margin: 0 auto;
}

@media (min-width: 1600px) {
  .header-container {
    max-width: var(--container-max-lg);
  }
}

.header-content {
  animation: fadeIn 0.8s ease;
}

.main-name {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.1;
  color: var(--white);
}

.title-tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.header-divider {
  width: 80px;
  height: 2px;
  background: var(--primary-green);
  margin: 0 auto;
  border-radius: 1px;
  opacity: 0.8;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== CONTENT CONTAINER ===== */
.content-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* ===== SECTIONS - NO PADDING ===== */
.section {
  padding: 0;
  position: relative;
}

/* ===== BIOGRAPHY SECTION ===== */
.biography-section {
  background-color: var(--white);
  padding: 4rem 0;
}

.biography-content {
  max-width: var(--container-max-md);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1600px) {
  .biography-content {
    max-width: var(--container-max-lg);
  }
}

.biography-header {
  text-align: center;
  margin-bottom: 3rem;
}

.biography-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--deep-green);
  margin-bottom: 0.8rem;
}

.biography-divider {
  width: 60px;
  height: 2px;
  background: var(--primary-green);
  margin: 1rem auto 1.5rem;
  border-radius: 1px;
  opacity: 0.5;
}

.bio-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-color);
  max-width: 800px;
  margin: 0 auto;
}

.bio-text p {
  margin-bottom: 1.5rem;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.bio-divider {
  width: 100%;
  height: 1px;
  background: var(--medium-gray);
  margin: 2rem 0;
  border-radius: 1px;
}

/* ===== TIMELINE SECTION ===== */
.timeline-section {
  padding: 0;
}

.timeline-background {
  background: linear-gradient(
    135deg,
    var(--deep-green) 0%,
    var(--dark-green) 100%
  );
  padding: 4rem 0;
  width: 100%;
}

.timeline-container {
  max-width: var(--container-max-md);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1600px) {
  .timeline-container {
    max-width: var(--container-max-lg);
  }
}

.timeline-header {
  text-align: center;
  margin-bottom: 3rem;
}

.timeline-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.timeline-header-divider {
  width: 60px;
  height: 2px;
  background: var(--primary-green);
  margin: 1rem auto 1.5rem;
  border-radius: 1px;
  opacity: 0.7;
}

.timeline-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
  font-weight: 300;
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 120px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-year {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--primary-green);
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.timeline-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.timeline-content-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.timeline-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

/* ===== AWARDS SECTION - OPTIMIZED ===== */
.awards-section {
  background-color: var(--light-gray);
  padding: 4rem 0;
}

.awards-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: var(--container-max-md);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

@media (min-width: 1600px) {
  .awards-header {
    max-width: var(--container-max-lg);
  }
}

.awards-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--deep-green);
  margin-bottom: 0.8rem;
}

.awards-divider {
  width: 60px;
  height: 2px;
  background: var(--primary-green);
  margin: 1rem auto 1.5rem;
  border-radius: 1px;
  opacity: 0.5;
}

.awards-subtitle {
  font-size: 1.1rem;
  color: var(--dark-gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
  font-weight: 300;
}

.awards-container {
  max-width: var(--container-max-md);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1600px) {
  .awards-container {
    max-width: var(--container-max-lg);
  }
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  justify-content: center;
}

.award-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

/* Disable hover on mobile */
@media (hover: hover) and (pointer: fine) {
  .award-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    z-index: 10;
  }

  .award-card:hover .award-img {
    transform: scale(1.05);
  }

  .award-card:hover .award-overlay {
    opacity: 1;
  }
}

.award-image {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--medium-gray);
}

.award-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.award-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 60, 59, 0.95);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
  pointer-events: none;
}

.award-detail {
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  transform: translateZ(0);
}

.award-info {
  padding: 1.2rem;
  background: var(--white);
}

.award-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep-green);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.award-description {
  color: var(--dark-gray);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Optimize images for performance */
.award-img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ===== VISION & VALUES SECTION ===== */
.vision-section {
  padding: 0;
}

.vision-background {
  background: linear-gradient(
    135deg,
    var(--deep-green) 0%,
    var(--dark-green) 100%
  );
  padding: 4rem 0;
  width: 100%;
}

.vision-container {
  max-width: var(--container-max-md);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1600px) {
  .vision-container {
    max-width: var(--container-max-lg);
  }
}

.vision-header {
  text-align: center;
  margin-bottom: 3rem;
}

.vision-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.vision-divider {
  width: 60px;
  height: 2px;
  background: var(--primary-green);
  margin: 1rem auto 1.5rem;
  border-radius: 1px;
  opacity: 0.7;
}

.vision-content {
  max-width: 800px;
  margin: 0 auto;
}

.vision-text-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.vision-block {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.vision-block:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.vision-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.vision-text {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  background: var(--primary-green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 100;
  box-shadow: var(--shadow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--dark-green);
  transform: translateY(-3px);
}

/* ===== RESPONSIVE STYLES ===== */

/* Your specific screen sizes */
@media (max-width: 1300px) and (max-height: 690px),
  (max-width: 1265px) and (max-height: 585px) and (-webkit-min-device-pixel-ratio: 1.5),
  (max-width: 1265px) {
  .main-header {
    padding: 2.5rem 1.5rem;
  }

  .main-name {
    font-size: 2.2rem;
  }

  .title-tagline {
    font-size: 1rem;
  }

  .biography-section,
  .timeline-background,
  .awards-section,
  .vision-background {
    padding: 3rem 0;
  }

  .biography-content,
  .timeline-container,
  .awards-header,
  .awards-container,
  .vision-container {
    padding: 0 1.5rem;
  }

  .biography-title,
  .timeline-title,
  .awards-title,
  .vision-title {
    font-size: 1.8rem;
  }

  .bio-text {
    font-size: 1.05rem;
  }

  .bio-divider {
    margin: 1.5rem 0;
  }

  .timeline::before {
    left: 100px;
  }

  .timeline-year {
    width: 80px;
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
  }

  .timeline-item {
    gap: 1.5rem;
  }

  /* Awards: 3 on top, 2 on bottom - same size */
  .awards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .award-card:nth-child(4) {
    grid-column: 2;
  }

  .award-card:nth-child(5) {
    grid-column: 3;
  }

  .award-image {
    height: 140px;
  }
  /* Solution 3: Flexbox fallback for better centering */
  .awards-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 1.5rem;
  }

  .award-card {
    width: calc(33.333% - 1rem); /* 3 items per row accounting for gap */
    min-width: 220px !important;
    max-width: 280px !important;
  }

  /* This will naturally center the last row */
  .award-image {
    height: 140px !important;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .awards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .award-card:nth-child(4) {
    grid-column: 2;
  }

  .award-card:nth-child(5) {
    grid-column: 3;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .main-header {
    padding: 2rem 1rem;
  }

  .main-name {
    font-size: 1.8rem;
  }

  .title-tagline {
    font-size: 0.95rem;
  }

  .biography-section,
  .timeline-background,
  .awards-section,
  .vision-background {
    padding: 2.5rem 0;
  }

  .biography-content,
  .timeline-container,
  .awards-header,
  .awards-container,
  .vision-container {
    padding: 0 1rem;
  }

  .biography-title,
  .timeline-title,
  .awards-title,
  .vision-title {
    font-size: 1.6rem;
  }

  .timeline::before {
    left: 70px;
  }

  .timeline-item {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .timeline-year {
    width: auto;
    align-self: flex-start;
    margin-top: 0;
  }

  .timeline-content {
    padding: 1.2rem;
    width: 100%;
  }

  .awards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
  }

  .award-card,
  .award-card:nth-child(4),
  .award-card:nth-child(5) {
    grid-column: 1;
    max-width: 100%;
  }

  .bio-divider {
    margin: 1.5rem 0;
  }

  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
}

/* Large Desktop (1600px+) */
@media (min-width: 1600px) {
  .main-name {
    font-size: 3.2rem;
  }

  .title-tagline {
    font-size: 1.3rem;
  }

  .biography-section,
  .timeline-background,
  .awards-section,
  .vision-background {
    padding: 5rem 0;
  }

  .biography-title,
  .timeline-title,
  .awards-title,
  .vision-title {
    font-size: 2.5rem;
  }
}

/* ===== PERFORMANCE OPTIMIZATION ===== */
/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Optimize award section for GPU acceleration */
.awards-grid {
  transform: translateZ(0);
  will-change: transform;
}

/* Fix for smooth scrolling */
html {
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
}

/* Remove any hover effects during scroll to prevent glitches */
body.scrolling .award-card:hover,
body.scrolling .timeline-content:hover,
body.scrolling .vision-block:hover {
  transform: none !important;
}
