/* =====================================================
   COLOR VARIABLES
   Change colors here to update the entire website
===================================================== */
:root {
  --color-button: white;
  --color-button-clicked: #057cf3;
  --color-button-hover: skyblue;

  --color-image-border: var(--color-button-clicked);

  --color-hamburger: var(--color-button);
  --color-hamburger-hover: var(--color-button-hover);

  --color-nav-background: #111827;
  --color-nav-border: var(--color-image-border);
  --color-nav-text: var(--color-button);

  --color-container-outer: #faf9f6;
  --color-container-inner: #f3f4f6;
  --color-container-outline: #d1d5db;

  --color-text-dark: #111827;
  --color-text-muted: #6b7280;
  --color-text-light: #f9fafb;

  --color-footer-background: #708090;

  --shadow-soft: 0 0.6rem 1.2rem rgba(0, 0, 0, 0.1);
}

/* =====================================================
   GLOBAL STYLES
===================================================== */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

  min-height: 100%;
  width: 100%;

  margin: 0;
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
}

body .background-overlay {
  background-image: url("./images/singapore_QHD.jpg");
  background-size: cover;
  background-position: center 10%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.background-overlay .container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 80%;
  text-align: center;
  flex: 1 0 0 auto;
}

.background-overlay footer {
  flex-shrink: 0;
}

/* =====================================================
   NAVIGATION BAR
===================================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 4rem;

  background: var(--color-nav-background);
  z-index: 1000;
  border-bottom: 2px solid var(--color-nav-border);
}

/* inner nav container */
.nav-inner {
  max-width: 80%;
  margin: 0 auto;

  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;
}

/* =====================================================
   NAVIGATION LINKS
===================================================== */
nav .nav-links {
  display: flex;
  gap: 4rem;
}

nav .nav-links a {
  color: var(--color-button);
  text-decoration: none;
  font-weight: 900;
}

nav .nav-links a:hover {
  color: var(--color-button-hover);
}

nav .nav-links a.active {
  color: var(--color-button-clicked);
}

/* =====================================================
   NAV NAME
===================================================== */
.nav-name {
  position: absolute;
  right: -9%;
  font-weight: 900;
  color: var(--color-nav-text);
  display: none;
  white-space: nowrap;
}

/* =====================================================
   HAMBURGER MENU
===================================================== */
.hamburger {
  position: absolute;
  left: -10%;

  display: none;
  cursor: pointer;

  background: none;

  border: 0.01rem solid var(--color-hamburger);
  border-radius: 0.15rem;

  transition: all 0.1s ease;
}

/* hover */
.hamburger:hover {
  border-color: var(--color-hamburger-hover);
}

.hamburger:hover span {
  background-color: var(--color-hamburger-hover);
}

/* active */
.hamburger.is-active {
  border-color: var(--color-hamburger-clicked);
}
.hamburger.is-active span {
  background-color: var(--color-hamburger-clicked);
}

/* bars */
.hamburger span {
  display: block;
  width: 1.6rem;
  height: 0.15rem;
  background-color: var(--color-hamburger);
  border-radius: 0.05rem;
  margin: 0.3rem 0;
}

/* =====================================================
   MOBILE NAVIGATION
===================================================== */
@media (max-width: 48rem) {
  .hamburger {
    display: block;
  }

  .nav-name {
    display: block;
  }

  .nav-inner::-webkit-scrollbar {
    display: none;
  }

  .nav {
    border-color: var(--color-nav-border);
    box-shadow: var(--shadow-soft);
  }

  nav .nav-links {
    position: absolute;
    top: 4rem;
    left: 0;

    width: 100%;
    padding: 1rem 0;

    background: var(--color-nav-background);

    flex-direction: column;
    gap: 1rem;

    display: none;
    overflow-y: auto;
    border: 2px solid var(--color-nav-border);
    box-shadow: var(--shadow-soft);
    border-top: none;
  }

  nav .nav-links.open {
    display: flex;
  }

  nav .nav-links a {
    text-align: center;
    padding: 0.75rem 0;
    width: 100%;
  }
}

/* =====================================================
   PAGE LAYOUT
===================================================== */
.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 80%;
  margin: 6rem auto 1rem;
  padding: 0 2rem;

  text-align: center;

  background-color: var(--color-container-outline);
  background: rgba(249, 250, 251, 0);

  flex: 1;
}

.container h1 {
  margin-top: 1rem;
  font-size: 2rem;
  margin-bottom: 1.3rem;
}

.container p {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* =====================================================
   INTRO SECTION
===================================================== */
.intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background: var(--color-container-outer);

  padding: 1rem;
  padding-top: 0;

  border-radius: 0.5rem;
  margin: 2rem;

  box-shadow: var(--shadow-soft);
}

.intro p {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  font-size: clamp(1rem, 1.53rem, 1.9rem);
}

@media (max-width: 768px) {
  .intro {
    padding: 0.5rem;
    margin: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .intro p {
    margin-top: 1rem;
    font-size: clamp(0.4rem, 0.805rem, 1.2rem);
  }
}

/* =====================================================
   PROFILE SECTION
===================================================== */

.container .profile {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* push top and bottom apart */
  align-items: center;
  flex: 1 1 auto; /* allows profile to grow */
  width: 100%;
}

.container .profile h1 {
  margin-top: 2rem;
  font-size: 2rem;
  color: var(--color-text-light);
}

.container .profile img {
  width: clamp(9rem, 11rem, 13rem);
  height: clamp(9rem, 11rem, 13rem);
  border-radius: 50%;
  object-fit: cover;
  margin-top: 3rem;
  border: 0.2rem solid var(--color-image-border);
  box-shadow: var(--shadow-soft);
}

.container .profile .profile-description {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.container .profile h2,
.container .profile p {
  color: var(--color-text-light);
  font-size: clamp(0.8rem, 1rem, 1.2rem);
}

.container .profile .tagline {
  max-width: 60%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  font-weight: 900;
}

/*====================================================
   SOCIAL MEDIA LINKS
===================================================== */

.container .profile .social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  background-color: var(--color-nav-background);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  border: 0.15rem solid var(--color-button-clicked);
  box-shadow: var(--shadow-soft);
}

.container .profile .social-links a {
  color: var(--color-button);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.container .profile .social-links a i {
  font-size: 1.8rem;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.container .profile .social-links a:hover i {
  color: var(--color-button-hover);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .container .profile h1 {
    font-size: 1.8rem;
    margin-top: 1.5rem;
  }

  .container .profile img {
    margin-top: 2rem;
    width: clamp(8rem, 10rem, 12rem);
    height: clamp(8rem, 10rem, 12rem);
  }

  .container .profile .tagline {
    max-width: 80%;
    letter-spacing: 0.15em;
  }

  .container .profile .social-links {
    gap: 1.5rem;
    margin-top: 3rem; /* gap from tagline */
    margin-bottom: 2rem;
  }

  .container .profile .social-links a i {
    font-size: 1.6rem;
  }
}

/* =====================================================
   CALL TO ACTION BUTTONS
===================================================== */
.cta a {
  display: inline-block;

  margin: 25px 10px;
  padding: 12px 24px;

  background: var(--color-button);
  color: var(--color-light);

  border-radius: 6px;

  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}

.cta a:hover {
  background: var(--color-button-hover);
}

/* =====================================================
   PROJECT CARD
===================================================== */
.project {
  display: flex;
  flex-direction: column;

  background: var(--color-container-outer);

  padding: 1rem;
  padding-top: 0;

  border-radius: 0.5rem;
  margin: 2rem;

  box-shadow: var(--shadow-soft);
  text-align: left;
}

.project-header-title {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: clamp(1.2rem, 1.4rem, 1.6rem);
}

.project-header-title h2 {
  font-weight: 700;
  font-size: 1.2rem;
}

.project-content {
  display: flex;
  gap: 0.5rem;
}

/* project left */
.project-left-card {
  flex: 0 0 25%;

  display: flex;
  flex-direction: column;
  align-items: center;

  background-color: var(--color-container-inner);

  padding: 0.5rem;
  border-radius: 8px;
}

.project-left-card img {
  width: clamp(6rem, 8rem, 10rem);
  height: clamp(6rem, 8rem, 9rem);

  object-fit: cover;
  border-radius: 50%;

  border: 0.1rem solid var(--color-image-border);
}

.project-left-card .year {
  margin-top: 0.5rem;
  font-size: clamp(1rem, 1.2rem, 1.5rem);
}

/* project right */
.project-right-card {
  flex: 0 0 72%;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  background-color: var(--color-container-inner);

  padding: 0.5rem;
  border-radius: 8px;

  overflow-wrap: break-word;
}

.project-right-card p {
  margin: 0.1rem 0;
  font-size: clamp(0.8rem, 1rem, 1.2rem);
}

/* responsive */
@media (max-width: 786px) {
  .project-content {
    flex-direction: column;
  }

  .project-left-card,
  .project-right-card {
    flex: 1 1 100%;
    align-items: center;
  }

  .project-right-card {
    text-align: center;
  }

  .project-header-title {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: clamp(1rem, 1.2rem, 1.4rem);
  }

  .project-left-card img {
    width: clamp(4rem, 6rem, 8rem);
    height: clamp(4rem, 6rem, 7rem);
  }

  .project-left-card .year {
    font-size: clamp(0.8rem, 1rem, 1.2rem);
  }

  .project-right-card p {
    margin: 0.1rem 0;
    font-size: clamp(0.8rem, 1rem, 1.2rem);
  }
}

/* =====================================================
   QUOTE SECTION
===================================================== */
.quote {
  margin-top: 3rem;
  margin-bottom: 2rem;

  padding: 1rem;

  border-left: 1.5rem solid var(--color-dark-secondary);
  background-color: var(--color-light);

  border-radius: 0.5rem;

  font-family: "Inter", sans-serif;

  box-shadow: var(--shadow-soft);
}

.quote .original {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.quote .translation {
  font-size: 1rem;
  font-style: italic;
}

/* =====================================================
   FOOTER
===================================================== */
footer {
  align-items: center;
  padding: 1rem;
  color: var(--color-text-light);
  margin-top: 1rem;
  margin-bottom: 0.2rem;
  display: flex;
  justify-content: center; /* centers content horizontally */
  align-items: center; /* centers content vertically, if needed */
  text-align: center;
  flex-shrink: 0;
}

footer div {
  text-align: center;
  display: flex;
  gap: 1rem;
  background-color: var(--color-footer-background);
  font-weight: 900;
  width: fit-content;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
}

/* =====================================================
   WECHAT QR SECTION
===================================================== */
.qr-container h1 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--color-success);
}

.qr-container i {
  margin-right: 0.4rem;
}

.qr-container img {
  transition: transform 0.25s ease;
}

.qr-container img:hover {
  transform: scale(1.05);
}

.back-link {
  display: inline-block;
  margin-top: 1.25rem;

  text-decoration: none;
  color: var(--color-success);
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

/* =====================================================
   SMALL MOBILE
===================================================== */
@media (max-width: 480px) {
  .qr-container {
    padding: 1.5rem;
    margin: 1rem;
  }

  .qr-container img {
    width: 180px;
    height: 180px;
  }

  .qr-container h1 {
    font-size: 1.25rem;
  }
}
