/* ============================================
   SEAKLENG REN - PORTFOLIO WEBSITE
   ============================================
   
   HOW TO EDIT THIS FILE:
   
   1. Colors are at the top (look for :root)
      Change the color values to change the whole site.
   
   2. Each section has a clear comment header.
      Scroll down to find the section you want to change.
   
   3. Font sizes use rem (1rem = 16px).
      Bigger number = bigger text.
   
   ============================================ */


/* ---- COLORS ---- */
/* Change these to change colors everywhere */
:root {
  --navy: #1a2744;        /* Dark blue (main color) */
  --blue: #3b82f6;        /* Bright blue (accent) */
  --blue-light: #93bbfd;  /* Light blue */
  --blue-bg: #eff6ff;     /* Very light blue background */
  --green: #059669;       /* Green */
  --green-bg: #ecfdf5;    /* Light green background */
  --purple: #7c3aed;      /* Purple */
  --purple-bg: #f5f3ff;   /* Light purple background */
  --orange: #d97706;      /* Orange */
  --orange-bg: #fffbeb;   /* Light orange background */
  --gray-light: #f9fafb;  /* Light gray (background) */
  --gray-border: #e5e7eb; /* Border gray */
  --gray-text: #6b7280;   /* Body text */
  --gray-dark: #374151;   /* Dark text */
  --white: #ffffff;
}


/* ---- RESET ---- */
/* Removes default browser spacing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, Arial, sans-serif;
  color: var(--gray-text);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}


/* ---- SHARED / REUSABLE ---- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 1.5rem;
}

.gray-bg {
  background: var(--gray-light);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-text);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Add space below title when there is no subtitle */
.section-title + .skills-grid,
.section-title + .about-grid,
.section-title + .job-card,
.section-title + .edu-card {
  margin-top: 3rem;
}


/* ---- NAVIGATION ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.logo span {
  color: var(--blue-light);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active-link {
  color: var(--white);
}


/* ---- HERO SECTION ---- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy), #243352, #111b30);
  padding-top: 60px; /* space for fixed nav */
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-small {
  color: var(--blue-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.hero-text h1 {
  font-size: 3rem;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero-text h1 .blue {
  color: var(--blue-light);
}

.hero-text h2 {
  font-size: 1.2rem;
  color: rgba(147, 187, 253, 0.8);
  font-weight: 300;
  margin-bottom: 1rem;
}

.hero-text p {
  color: rgba(209, 213, 219, 0.8);
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--blue);
  color: var(--white);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn:hover {
  background: #2563eb;
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

/* Profile photo in hero */
.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}


/* ---- ABOUT SECTION ---- */

.about-grid {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.about-photo img {
  width: 240px;
  height: 280px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.highlight-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.highlight-box {
  background: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.highlight-box strong {
  display: block;
  font-size: 0.85rem;
  color: var(--navy);
}

.highlight-box span {
  font-size: 0.75rem;
  color: var(--gray-text);
}


/* ---- SKILLS SECTION ---- */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skill-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 1.5rem;
}

.skill-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.skill-card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

/* Tags (used in skills, projects, education) */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  background: var(--gray-light);
  color: var(--gray-dark);
}

.blue-tag   { background: var(--blue-bg);   color: var(--blue); }
.green-tag  { background: var(--green-bg);  color: var(--green); }
.purple-tag { background: var(--purple-bg); color: var(--purple); }
.orange-tag { background: var(--orange-bg); color: var(--orange); }


/* ---- EXPERIENCE SECTION ---- */

.job-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.job-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.job-header h3 {
  font-size: 1.05rem;
  color: var(--navy);
}

.company {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.9rem;
}

.location {
  color: var(--gray-text);
  font-size: 0.8rem;
}

.job-badges {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.badge {
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--blue-bg);
  color: var(--blue);
}

.gray-badge {
  background: var(--gray-light);
  color: var(--gray-text);
}

.green-badge {
  background: var(--green-bg);
  color: var(--green);
}

.job-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.job-card li {
  font-size: 0.88rem;
  line-height: 1.6;
  padding-left: 1.2rem;
  position: relative;
}

/* Bullet point */
.job-card li::before {
  content: '\2713'; /* checkmark */
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}


/* ---- PROJECTS SECTION ---- */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

/* Colored bar at top of project card */
.project-top {
  height: 5px;
}

.blue-bar   { background: var(--blue); }
.green-bar  { background: var(--green); }
.purple-bar { background: var(--purple); }
.orange-bar { background: var(--orange); }

.project-card h3 {
  font-size: 1.05rem;
  color: var(--navy);
  padding: 1.25rem 1.5rem 0;
  margin-bottom: 0.5rem;
}

.project-card > p {
  padding: 0 1.5rem;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-problem {
  margin: 0 1.5rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--gray-light);
  border-radius: 8px;
  font-size: 0.83rem;
  line-height: 1.6;
}

.project-problem strong {
  color: var(--gray-dark);
}

.project-card .tags {
  padding: 0 1.5rem 1.25rem;
}


/* ---- EDUCATION SECTION ---- */

.edu-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 2rem;
}

.edu-card h3 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.edu-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1.25rem;
}

.coursework-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-text);
  margin-bottom: 0.5rem;
}


/* ---- CERTIFICATIONS ---- */

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 700px;
  margin: 1.5rem auto 0;
}

.cert-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cert-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.cert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cert-card strong {
  font-size: 0.88rem;
  color: var(--navy);
}


/* ---- CONTACT SECTION ---- */

.contact-grid {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.contact-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.contact-card strong {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-text);
  margin-bottom: 0.25rem;
}

.contact-card span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.contact-card:hover span {
  color: var(--blue);
}

.location-text {
  text-align: center;
  margin-top: 2rem;
  color: var(--gray-text);
  font-size: 0.85rem;
}


/* ---- FOOTER ---- */

.footer {
  background: var(--navy);
  text-align: center;
  padding: 2rem 1.5rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

.footer .logo {
  margin-bottom: 0.5rem;
}


/* ---- PAGE HEADER (for sub-pages) ---- */

.page-header {
  background: linear-gradient(135deg, var(--navy), #243352, #111b30);
  padding: 8rem 1.5rem 3rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.page-header p {
  color: rgba(209, 213, 219, 0.8);
  max-width: 550px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}


/* ---- INLINE LINK ---- */

.inline-link {
  color: var(--blue);
  font-weight: 600;
}

.inline-link:hover {
  text-decoration: underline;
}


/* ---- SECTION CTA (centered button) ---- */

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}


/* ---- PROJECT LINK (button inside project card) ---- */

.project-link {
  padding: 0 1.5rem 1.25rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}


/* ---- ARTICLE PREVIEW CARDS (home page) ---- */

.articles-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-preview-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 1.5rem;
}

.article-preview-card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.article-preview-card .article-date {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.article-preview-card h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.article-preview-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gray-text);
}


/* ---- ARTICLE CARDS (articles page) ---- */

.article-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.article-card .article-date {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.article-card h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.article-card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-card p {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

.article-card code {
  background: var(--gray-light);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--navy);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-border);
}


/* ============================================
   RESPONSIVE DESIGN
   Makes the site look good on phones & tablets
   ============================================ */

/* Tablets and small screens */
@media (max-width: 768px) {

  /* Hide desktop nav links, show simple stacked layout */
  .nav-links {
    display: none;
  }

  /* Hero stacks vertically on mobile */
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-photo img {
    width: 180px;
    height: 180px;
  }

  /* About stacks vertically */
  .about-grid {
    flex-direction: column;
    text-align: center;
  }

  .about-photo img {
    width: 180px;
    height: 210px;
    margin: 0 auto;
  }

  .highlight-boxes {
    grid-template-columns: 1fr;
  }

  /* Grids become single column */
  .skills-grid,
  .projects-grid,
  .contact-grid,
  .cert-grid,
  .articles-preview-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 6rem 1.5rem 2rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .article-card {
    padding: 1.5rem;
  }

  /* Job header stacks */
  .job-header {
    flex-direction: column;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

/* Small phones */
@media (max-width: 480px) {

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero-photo img {
    width: 150px;
    height: 150px;
  }
}
