/* ===========================
   Global Styles
=========================== */
:root {
  --olive: #6b8e23;
  --olive-hover: #5e7e1e;
  --sage: #8fbc8f;
  --forest: #2e8b57;
  --text-color: #333;
  --light-grey: #ccc;
  --font-sans: "Roboto", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body {
  font-family: var(--font-sans);
  color: var(--text-color);
  background-color: #fafafa;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reusable container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===========================
   Animations
=========================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
}

/* ===========================
   Navbar
=========================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  border-bottom: 1px solid var(--light-grey);
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.1s;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-circle {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  aspect-ratio: 1 / 1;
  background-color: var(--olive);
  border-radius: 50%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-link:hover .logo-circle {
  transform: scale(1.1);
  box-shadow: 0 0 6px rgba(107, 142, 35, 0.4);
  cursor: pointer;
}

.nav-title p {
  font-size: 1rem;
  color: #444;
  font-weight: 400;
  letter-spacing: 0.2px;
  word-spacing: 4px;
}

.nav-title strong {
  font-size: 1.15rem;
  color: #000;
  font-weight: 700;
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-right a {
  position: relative;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.nav-right a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: var(--olive);
  transition: width 0.3s ease;
}

.nav-right a:hover::after,
.nav-right a.active::after {
  width: 100%;
}

.nav-right a:hover {
  color: var(--olive);
}

.nav-right a.active {
  color: var(--olive);
  font-weight: 600;
}

.divider {
  height: 16px;
  width: 1px;
  background-color: var(--light-grey);
  margin: 0 0.5rem;
}

/* Mobile Navbar */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    text-align: center;
    padding: 1.2rem 1rem;
  }

  .nav-right {
    margin-top: 0.8rem;
  }
}

/* ===========================
   Hero Section
=========================== */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  padding: 3rem 3rem 2rem;
  flex-wrap: wrap;
  background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

.photo-section img {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.4s;
}

.about-section {
  max-width: 520px;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.7s;
}

.about-section h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  color: #000;
}

.about-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  color: var(--olive);
}

.about-section p {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .about-section h1 {
    font-size: 2.6rem;
  }
}

@media (max-width: 600px) {

  h1,
  h2 {
    line-height: 1.3;
  }

  .about-section h1 {
    font-size: 2.4rem;
  }
}

/* ===========================
   Circle Navigation
=========================== */
.circle-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 3rem 0;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 1s;
}

.circle-item {
  text-decoration: none;
  text-align: center;
}

.circle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  font-weight: 600;
  color: white;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  will-change: transform, box-shadow;
  cursor: pointer;
}

.circle-item:hover .circle {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(107, 142, 35, 0.25);
}

.circle-item:active .circle {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Shades of green */
.olive .circle {
  background-color: var(--olive);
}

.sage .circle {
  background-color: var(--sage);
}

.forest .circle {
  background-color: var(--forest);
}

/* ===========================
   Footer
=========================== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--light-grey);
  padding: 1rem 3rem;
  font-size: 0.9rem;
  color: #555;
  margin-top: auto;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 1.3s;
}

.footer div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #000;
  margin-bottom: 0.1rem;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--light-grey), transparent);
}

.footer a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

.footer a:hover {
  color: var(--olive);
  transform: translateY(-1px);
}

.footer-left a {
  color: inherit;
  text-decoration: none;
}

.footer-left a:hover {
  color: var(--olive);
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .footer div {
    align-items: center;
  }
}

/* ===========================
  CV Page
=========================== */
.cv-section {
  text-align: center;
  padding: 6rem 2rem;
}

.cv-section h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 1rem;
}

.cv-section p {
  color: #555;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.cv-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  text-align: center;
}

.cv-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.btn {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.8rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.view-btn {
  background-color: var(--olive);
  color: #fff;
}

.view-btn:hover {
  background-color: var(--olive-hover);
}

.download-btn {
  border: 2px solid var(--olive);
  color: var(--olive);
}

.download-btn:hover {
  background-color: var(--olive);
  color: #fff;
}

.cv-updated {
  font-size: 0.85rem;
  color: #777;
  margin-top: -1rem;
}

.cv-preview {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.cv-preview iframe {
  width: 100%;
  max-width: 800px;
  height: 80vh;
  border: 1px solid var(--light-grey);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .cv-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .cv-preview iframe {
    width: 95%;
    height: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  }
}

/* ===========================
   Personal Page
=========================== */

.page-header {
  text-align: center;
  margin-bottom: 5rem;
}

.page-header h1:first-of-type {
  font-size: 2.3rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.3rem;
}

.page-header h1:nth-of-type(2) {
  font-size: 1.1rem;
  font-weight: 400;
  color: #000;
  margin-bottom: 2.5rem;
  letter-spacing: 0.2px;
}

.page-header .page-divider {
  width: 100%;
  max-width: 1100px;
  height: 1px;
  background-color: #ddd;
  margin: 0 auto;
}

.personal-content {
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

.personal-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

.personal-item .text {
  flex: 0 0 55%;
  padding-left: 2rem;
}

.personal-item .text h2 {
  font-weight: 700;
  color: #000;
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.personal-item .text p {
  color: #333;
  line-height: 1.7;
  font-size: 1rem;
}

.personal-item .image {
  flex: 0 0 40%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 1rem;
  margin-right: 3rem;
}

.personal-item .image img {
  width: 48%;
  max-width: 220px;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.personal-item .image img:only-child {
  width: 80%;
  max-width: 240px;
}

.personal-item .image img,
.personal-item .image img:hover {
  transition: none;
  transform: none;
  filter: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* ----- Golf & Snooker Section ----- */
.personal-item.golf-snooker {
  flex-direction: row-reverse;
  /* flip on large screens */
}

.personal-item.golf-snooker .image {
  margin-right: 0;
  margin-left: 2.5rem;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1rem;
}

/* ----- Responsive Adjustments ----- */
@media (max-width: 1000px) {
  .personal-item {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .personal-item .text {
    flex: 1 1 100%;
    padding-left: 0;
    text-align: center;
  }

  .personal-item .image {
    justify-content: center;
    margin-right: 0;
  }

  .personal-item .image img {
    width: 45%;
    max-width: 160px;
  }

  .personal-item.golf-snooker {
    flex-direction: column;
    /* reset flip for mobile */
  }

  .personal-item.golf-snooker .image {
    margin-left: 0;
    justify-content: center;
  }
}

/* ===========================
   Education Page
=========================== */

.education-content {
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 7rem;
}

.page-header .intro-text {
  max-width: 900px;
  margin: 2rem auto 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  text-align: center;
}

.edu-overview h2,
.edu-feature h2,
.edu-skills h2,
.edu-future h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.edu-overview p,
.edu-feature p,
.edu-future p {
  color: #444;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  max-width: 700px;
}

.edu-modules {
  list-style-type: disc;
  margin-left: 2rem;
  margin-bottom: 2rem;
  color: #333;
  line-height: 1.7;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
  border-top: 1px solid #eee;
  padding-top: 2.5rem;
}

.project-item .text {
  flex: 0 0 55%;
}

.project-item .image {
  flex: 0 0 40%;
  display: flex;
  justify-content: flex-end;
}

/* ===========================
   Carousel
=========================== */
.carousel {
  position: relative;
  width: 100%;
  max-width: 650px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  background-color: #000;
}


.carousel .slides {
  display: flex;
  width: 300%;            
  transform: translateX(0);
  animation: slideShow 15s ease-in-out infinite;
  will-change: transform;
}

.carousel img {
  width: 100%;
  flex: 0 0 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  backface-visibility: hidden;
}

@keyframes slideShow {
  0%, 28%   { transform: translateX(0); }
  33%, 61%  { transform: translateX(-100%); }
  66%, 94%  { transform: translateX(-200%); }
  100%      { transform: translateX(0); }
}

/* ===========================
   Skills list
=========================== */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.skills-list span {
  background-color: #f2f2f2;
  border: 1px solid #ddd;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.95rem;
  color: #333;
  transition: all 0.3s ease;
}

.skills-list span:hover {
  background-color: var(--olive);
  color: white;
  border-color: var(--olive);
}

/* ===========================
   Responsive
=========================== */

@media (max-width: 900px) {
  .project-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .project-item .text,
  .project-item .image {
    flex: 1 1 100%;
    justify-content: center;
  }
}


@media (max-width: 768px) {
  .carousel {
    max-width: 100%;
  }

  .carousel .slides {
    animation: none;        
    width: 100%;            
    transform: translateX(0);
  }

  .carousel img {
    flex: 0 0 100%;
  }

  .carousel .slides img:nth-child(n + 2) {
    display: none;
  }
}

/* ===========================
   End of Stylesheet
=========================== */