/*
Theme Name: Isaiah Chua Portfolio
Theme URI: https://ikechua.com
Author: Isaiah Chua
Description: A recruiter-targeted B2B marketing portfolio with animated, minimal design
Version: 1.0
*/

/* ================================================
   IMPORTS & VARIABLES
================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --navy: #1D3557;
  --teal: #2A9D8F;
  --teal-light: #edf9f7;
  --amber: #E9C46A;
  --text: #1a1a1a;
  --text-mid: #555;
  --text-light: #888;
  --border: rgba(0,0,0,0.08);
  --bg: #ffffff;
  --bg-2: #f8f8f6;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================================================
   RESET & BASE
================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ================================================
   SCROLL REVEAL ANIMATIONS
================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 400ms; }
.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   NAVIGATION
================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
#site-header.scrolled {
  border-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-menu a {
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width 0.25s var(--ease-out);
}
.nav-menu a:hover { color: var(--navy); }
.nav-menu a:hover::after { width: 100%; }

.nav-cta {
  background: var(--navy) !important;
  color: #fff !important;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  transition: opacity 0.2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { opacity: 0.85; color: #fff !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--navy);
  transition: transform 0.3s, opacity 0.3s;
}

/* ================================================
   HERO SECTION
================================================ */
#hero {
  padding: 9rem 0 6rem;
  border-bottom: 0.5px solid var(--border);
  overflow: hidden;
  position: relative;
}

/* Subtle animated background lines */
#hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: -10%;
  width: 50%;
  height: 100%;
  background: repeating-linear-gradient(
    -60deg,
    transparent,
    transparent 80px,
    rgba(42,157,143,0.03) 80px,
    rgba(42,157,143,0.03) 81px
  );
  pointer-events: none;
  animation: driftLines 20s linear infinite;
}
@keyframes driftLines {
  from { transform: translateY(0); }
  to   { transform: translateY(80px); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.1s forwards;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--teal);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(46px, 6.5vw, 68px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin-bottom: 1.5rem;
  max-width: 780px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}
.hero-headline em {
  font-style: italic;
  color: var(--teal);
}

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--teal-light);
  border: 0.5px solid var(--teal);
  border-radius: 100px;
  padding: 5px 14px 5px 9px;
  font-size: 12px;
  color: var(--teal);
  font-weight: 500;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.35s forwards;
}
.open-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}




@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 7px;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}
.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 7px;
  border: 0.5px solid rgba(29,53,87,0.3);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}
.btn-secondary:hover {
  background: #f5f7fa;
  border-color: var(--navy);
  transform: translateY(-1px);
}

/* ================================================
   METRICS BAND
================================================ */
#metrics {
  padding: 3.5rem 0;
  border-bottom: 0.5px solid var(--border);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.metric-item {
  padding: 1.5rem 2rem 1.5rem 0;
  border-right: 0.5px solid var(--border);
}
.metric-item:last-child { border-right: none; }

.metric-num {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.metric-num .suffix { color: var(--teal); }

.metric-label {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.55;
}

/* Count-up animation */
.count-num { display: inline; }

/* ================================================
   SECTION SHARED
================================================ */
.section {
  padding: 5rem 0;
  border-bottom: 0.5px solid var(--border);
}
.section-label {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--navy);
  margin-bottom: 2.75rem;
  line-height: 1.15;
}

/* ================================================
   EXPERTISE GRID
================================================ */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.expertise-cell {
  background: var(--bg);
  padding: 1.75rem;
  transition: background 0.2s;
  cursor: default;
}
.expertise-cell:hover { background: #fafffe; }

.expertise-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-teal { background: #e0f5f2; }
.icon-navy { background: #e8edf5; }
.icon-amber { background: #fdf5e0; }

.expertise-cell h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.expertise-cell p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
}

/* ================================================
   EXPERIENCE TIMELINE
================================================ */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  padding: 2.25rem 0;
  border-bottom: 0.5px solid var(--border);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }

/* Animated left accent */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2.25rem;
  width: 2px;
  height: 0;
  background: var(--teal);
  border-radius: 2px;
  transition: height 0.6s var(--ease-out);
}
.timeline-item.visible::before {
  height: calc(100% - 4.5rem);
}

.timeline-date { padding-top: 2px; padding-left: 1.25rem; }
.timeline-co {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}
.timeline-period {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

.timeline-content h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.timeline-content p {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 0.85rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
  background: var(--teal-light);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.5rem;
}
.tag {
  font-size: 13px;
  color: var(--text-mid);
  background: var(--bg-2);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--teal); color: var(--teal); }

/* ================================================
   WHY ME SECTION
================================================ */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.why-card {
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  background: var(--bg);
  transition: border-color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.why-card:hover {
  border-color: rgba(42,157,143,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(42,157,143,0.08);
}
.why-accent {
  width: 28px;
  height: 2px;
  background: var(--teal);
  margin-bottom: 1rem;
  transition: width 0.3s var(--ease-out);
}
.why-card:hover .why-accent { width: 44px; }
.why-card h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.why-card p {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.75;
}

/* ================================================
   CONTACT SECTION
================================================ */
#contact {
  padding: 5rem 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.contact-sub {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.75;
}
.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border: 0.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  color: var(--navy);
  font-weight: 500;
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}
.contact-link:hover {
  background: #f9fffe;
  border-color: var(--teal);
  transform: translateX(3px);
}
.contact-link-label { font-size: 12px; color: var(--text-light); font-weight: 400; }
.contact-arrow { font-size: 18px; color: var(--text-light); transition: transform 0.2s; }
.contact-link:hover .contact-arrow { transform: translateX(3px); color: var(--teal); }

/* ================================================
   FOOTER
================================================ */
#site-footer {
  padding: 1.5rem 0;
  border-top: 0.5px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-left, .footer-right { font-size: 12px; color: var(--text-light); }

/* ================================================
   MOBILE NAV OPEN STATE
================================================ */
body.nav-open { overflow: hidden; }
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 98;
}
body.nav-open .nav-overlay { display: block; }

/* ================================================
   HERO PHOTO LAYOUT
================================================ */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: center;
}
.hero-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-photo {
  width: 300px;
  height: 360px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ================================================
   TESTIMONIALS
================================================ */
#testimonials {
  padding: 5rem 0;
  border-bottom: 0.5px solid var(--border);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.tcard {
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.tcard-quote {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--teal);
  line-height: 1;
  margin-bottom: -0.5rem;
}
.tcard-text {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.75;
  flex: 1;
}
.tcard-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 0.5px solid var(--border);
  padding-top: 1.25rem;
  margin-top: auto;
}
.tcard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  flex-shrink: 0;
}
.tcard-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 2px;
}
.tcard-role {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 768px) {
  #hero { padding: 7rem 0 4rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-photo-wrap { order: -1; }
  .hero-photo { width: 180px; height: 220px; }
  .hero-headline { font-size: clamp(32px, 8vw, 44px); }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 2rem;
    gap: 2rem;
    z-index: 99;
    transition: right 0.35s var(--ease-out);
    border-left: 0.5px solid var(--border);
  }
  body.nav-open .nav-menu { right: 0; }
  .nav-hamburger { display: flex; }
  .nav-menu a { font-size: 16px; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-item { padding: 1.25rem; border-right: none; border-bottom: 0.5px solid var(--border); }
  .metric-item:nth-child(odd) { border-right: 0.5px solid var(--border); }
  .metric-item:last-child, .metric-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }

  .expertise-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .timeline-item::before { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }

  .section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .expertise-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================
   HERO PHOTO — feathered oval
================================================ */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto auto auto;
  column-gap: 1.75rem;
  row-gap: 0;
}
.hero-left {
  grid-column: 1;
  grid-row: 1;
}
.hero-photo {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  align-self: start;
  padding-top: 0;
}
.hero-sub {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 19px;
  line-height: 1.8;
  color: var(--text-mid);
  margin-top: 1.75rem;
  margin-bottom: 2rem;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.45s forwards;
}
.hero-sub strong { color: var(--text); font-weight: 500; }
.hero-ctas {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.55s forwards;
}
.photo-frame {
  width: 260px;
  height: 300px;
  overflow: hidden;
  position: relative;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ================================================
   TESTIMONIALS
================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.testimonial-card {
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.testimonial-card blockquote {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 1.25rem;
  flex: 1;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--teal);
  line-height: 0.6;
  opacity: 0.4;
  margin-bottom: 0.5rem;
  display: block;
}
.testimonial-author {
  border-top: 0.5px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
}
.testimonial-author strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 3px;
}
.testimonial-author .t-role {
  font-size: 12px;
  color: var(--text-light);
}
.testimonial-author .t-rel {
  font-size: 11.5px;
  color: #bbb;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { display: none; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ================================================
   TESTIMONIALS — single row layout
================================================ */
.testimonials-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.testimonial-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding: 2.25rem 0;
  border-bottom: 0.5px solid var(--border);
}
.testimonial-row:last-child { border-bottom: none; }
.t-quote-mark {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--teal);
  line-height: 0.55;
  opacity: 0.4;
  margin-bottom: 0.6rem;
  display: block;
}
.t-text {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.8;
  font-style: italic;
}
.t-attrib {
  text-align: left;
  min-width: 200px;
  padding-top: 4px;
}
.t-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 4px;
}
.t-role {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}
.t-rel {
  font-size: 11px;
  color: #bbb;
  margin-top: 3px;
}
@media (max-width: 768px) {
  .testimonial-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .t-attrib { text-align: left; min-width: unset; }
}
