/*
COLOUR PALETTE

Ocean Blue: #1976d2
Light Blue: #b3e5fc
Deep Blue: #0d47a1
Sand: #e3f2fd
Wave: #64b5f6
*/

/* GLOABAL STYLES
-------------------------------------------*/

/* 
    https://www.paulirish.com/2012/box-sizing-border-box-ftw/
*/

html {
  box-sizing: border-box;
  font-size: 62.5%;
  /* 1rem = 10px */
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

html,
body {
  height: 100%;
}

body {
  background-color: #f6f6f6;
  margin: 0;
  font-family: "Fredoka", sans-serif;
  font-size: 1.5rem;
  line-height: 1.4;
}

h1,
h2,
h3 {
  font-family: "Fredoka", sans-serif;
  font-weight: 400;
  margin: 0;
  color: #00335c;
}

h1 {
  font-size: 5rem;
  line-height: 1;
}

h2 {
  font-size: 3rem;
}

h3 {
  font-size: 2rem;
}

/* links */
a {
  color: #1976d2; /* Ocean Blue */
}

a:hover {
  color: #64b5f6; /* Wave */
  text-decoration: none;
}

footer a {
  color: #00566c;
}

footer a:hover {
  color: #5baee2;
}

.btn {
  background: #00335c; /* Ocean Blue */
  color: #f6f6f6;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1.2rem;
  display: inline-block;
  padding: 7px;
  letter-spacing: 0.1em;
  line-height: 1;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.btn:hover,
.btn:focus {
  background: #ff4500; /* Deep Blue */
  color: #f6f6f6; /* Light Blue */
}

.content-wrapper {
  margin: 0 auto;
  padding: 30px;
  max-width: 900px;
}

/* HOME
-------------------------------------------*/
.home {
  background: url("../images/bg-penang-hill.jpg") no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
}

.home .content-wrapper {
  flex: 1 0 auto;
}

.content-bg {
  background: rgb(255 255 255 / 0.9);
  padding: 30px;
}

@media screen and (max-width: 650px) {
  .home .content-wrapper {
    padding: 10px;
  }

  .content-bg {
    padding: 20px;
  }
}

/* RESUME
-------------------------------------------*/
.resume header::before {
  background: url("../images/bg-home-office-bookshelf.jpg");
  background-size: cover;
  content: "";
  display: block;
  height: 200px;
}

.resume-section {
  margin-bottom: 50px;
}

.resume-section h2 {
  border-bottom: 2px dashed #002d50;
}

.download-link {
  position: fixed;
  top: 5px;
  left: 5px;
  font-size: 1.5rem;
}

@media screen and (max-width: 1200px) {
  .download-link {
    position: absolute;
  }
}

@media screen and (max-width: 500px) {
  .resume header::before {
    height: 200px;
  }

  h1 {
    font-size: 4.2rem;
  }

  h2 {
    font-size: 2.5rem;
  }
}

/* Projects
-------------------------------------------*/
.project-item {
  margin: 30px 0;
}

.project-item img {
  width: 300px;
}

@media screen and (min-width: 860px) {
  .project-item img {
    display: flow-root;
  }

  .project-item img {
    float: left;
    margin-right: 20px;
  }
}

@media screen and (min-width: 650px) and (max-width: 859px) {
  .project-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
  }

  .project-item img {
    width: 100%;
  }
}

@media screen and (max-width: 500px) {
  .project-item img {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Work Experience
-------------------------------------------*/
.work-item {
  margin: 30px 0;
}

.work-details p {
  margin: 0;
}

@media screen and (min-width: 860px) {
  .work-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    column-gap: 20px;
  }

  .work-summary p:first-child {
    margin-top: 0;
  }
}

/* Education
-------------------------------------------*/
.education-item {
  margin: 30px 0;
}

.education-item p {
  margin: 0;
}

/* FOOTER
-------------------------------------------*/
footer {
  background: #ffffff; /* Light Blue */
  color: #00335c; /* Deep Blue */
  padding: 1.5em 0 1em 0;
  text-align: center;
  margin-top: 3em;
  font-size: 1.5rem;
}

.socials {
  list-style-type: none;
  padding: 0;
}

.socials li {
  display: inline-block;
  margin-left: 10px;
}

.socials img {
  width: 32px;
  height: 32px;
  filter: grayscale(0.1) brightness(0.95) sepia(0.2) hue-rotate(180deg)
    saturate(1.2);
  transition: filter 0.15s, transform 0.13s;
}

.socials img:hover {
  filter: grayscale(0) brightness(1.1) hue-rotate(180deg) saturate(1.4);
  transform: scale(1.08);
}

body.home,
body.resume {
  background: #ffffff;
  min-height: 100vh;
  font-family: "Fredoka", Arial, sans-serif;
}

/* Hero section */
.hero {
  background: url("../images/bg-hero-dark-blue.png") no-repeat center center;
  padding: 3em 0 2em 0;
  text-align: center;
  box-shadow: 0 4px 24px rgba(25, 118, 210, 0.1);
  margin-bottom: 2em;
  z-index: 1;
  position: relative;
}

.hero img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #66b2e0;
  margin-bottom: 1em;
  box-shadow: 0 2px 12px rgba(44, 62, 80, 0.1);
}

.hero img:hover {
  transform: scale(1.05);
  transition: transform 0.15s;
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.15);
}

.hero h1 {
  font-family: "Fredoka", sans-serif;
  font-size: 3.2rem;
  color: #66b2e0;
  margin-bottom: 0.2em;
}

.hero h2 {
  font-size: 1.5rem;
  color: #66b2e0;
  margin-top: 0;
  font-weight: 400;
}

.hero p {
  max-width: 500px;
  margin: 1.5em auto 0 auto;
  color: #ffffff;
}

/* Card backgrounds */
.card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.08);
  padding: 2em 2em 1.5em 2em;
  max-width: 340px;
  min-width: 260px;
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.13s, box-shadow 0.13s;
  border: 1.5px solid #5baee2;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 24px rgba(44, 62, 80, 0.13);
}

.card .icon {
  font-size: 2.2rem;
  margin-bottom: 0.7em;
  color: #00335c;
}

.card::before {
  content: "🌊";
  position: absolute;
  left: 1em;
  top: 1em;
  font-size: 1.5em;
  opacity: 0.1;
  pointer-events: none;
}

.card h3 {
  color: #00335c;
  font-family: "Fredoka", sans-serif;
}

.card p {
  color: #00335c;
  margin-bottom: 1em;
  font-size: 1.5rem;
}

.card a {
  color: #66b2e0;
  border-bottom: 1.5px solid #66b2e0;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
  font-size: 1.35rem;
}

.card a:hover {
  color: #0d47a1;
  border-bottom: 1.5px solid #1976d2;
}

.section-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  margin: 2em 0 2.5em 0;
}
