/* Michael Vincent Yap — clean professional portfolio
   Colours, spacing and components are controlled here for easy customisation. */
:root {
  --ink: #17263b;
  --ink-soft: #34445a;
  --muted: #65748a;
  --blue: #2459a9;
  --blue-dark: #173f7c;
  --blue-pale: #edf3fb;
  --line: #dce4ee;
  --paper: #ffffff;
  --surface: #f6f8fb;
  --shadow: 0 24px 70px rgba(23, 38, 59, 0.10);
  --radius: 18px;
  --content-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.container { width: min(var(--content-width), calc(100% - 48px)); margin-inline: auto; }
.section-anchor { scroll-margin-top: 88px; }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 1000; padding: 10px 14px; background: white; color: var(--ink); }
.skip-link:focus { top: 10px; }

/* Navigation stays at the very top while scrolling. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(220, 228, 238, 0.9);
  backdrop-filter: blur(14px);
}
.navbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  color: white; background: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .03em;
}
.brand-name { font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.brand-credential { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; display: inline-flex; align-items: center; min-height: 76px; text-decoration: none; color: #536176; font-size: 13px; font-weight: 650; transition: color .2s ease; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 19px; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links .nav-contact { min-height: auto; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.nav-links .nav-contact::after { display: none; }
.nav-links .nav-contact:hover { border-color: var(--blue); color: var(--blue); }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 94px 0 100px; background: linear-gradient(115deg, #fff 0%, #fff 55%, #f5f8fd 100%); }
.hero::before { content: ""; position: absolute; top: -220px; right: -130px; width: 600px; height: 600px; border: 1px solid #e5ecf6; border-radius: 50%; pointer-events: none; }
.hero::after { content: ""; position: absolute; top: -145px; right: -55px; width: 450px; height: 450px; border: 1px solid #e5ecf6; border-radius: 50%; pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); align-items: center; gap: clamp(45px, 7vw, 100px); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; line-height: 1.5; }
.eyebrow-line { width: 28px; height: 2px; background: var(--blue); }
.hero h1 { margin: 0; max-width: 680px; font-size: clamp(46px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -.065em; font-weight: 800; }
.hero h1 span, .section-heading h2 span, .contact-panel h2 span { color: var(--blue); }
.hero-subtitle { margin: 24px 0 14px; color: var(--ink-soft); font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.hero-intro { max-width: 640px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 0 19px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 750; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 8px 20px rgba(36, 89, 169, .18); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border-color: var(--line); color: var(--ink); background: white; }
.button-secondary:hover { border-color: var(--blue); color: var(--blue); }
.hero-location { display: flex; align-items: center; gap: 9px; margin-top: 31px; color: var(--muted); font-size: 13px; }
.location-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4c9a76; display: inline-block; }
.hero-card { position: relative; padding: 29px; border: 1px solid #e0e7f1; border-radius: var(--radius); background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.card-topline { display: flex; align-items: center; justify-content: space-between; }
.card-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.monogram { display: grid; place-items: center; width: 74px; height: 74px; margin: 27px 0 21px; border-radius: 20px; background: var(--blue-pale); color: var(--blue); font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.hero-card h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.04em; line-height: 1.3; }
.hero-card > p:not(.card-footnote) { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.card-divider { height: 1px; margin: 24px 0 19px; background: var(--line); }
.mini-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mini-stat-grid div { display: flex; flex-direction: column; gap: 3px; }
.mini-stat-grid strong { color: var(--blue); font-size: 30px; line-height: 1.25; letter-spacing: -.05em; }
.mini-stat-grid span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.card-footnote { margin: 20px 0 0; color: #8a96a7; font-size: 10px; }
.hero-bottom-rule { position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--blue) 0 17%, #dbe7f7 17% 100%); }

/* General sections */
.section { padding: 100px 0; }
.section-tinted { background: var(--surface); }
.two-column { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr); gap: clamp(45px, 8vw, 120px); }
.section-heading h2 { max-width: 500px; margin: 0; font-size: clamp(34px, 4vw, 46px); line-height: 1.16; letter-spacing: -.055em; }
.section-heading .eyebrow { margin-bottom: 18px; }
.section-body { max-width: 700px; }
.section-body p { margin: 0 0 18px; color: var(--muted); }
.section-body .lead { color: var(--ink-soft); font-size: 20px; line-height: 1.65; font-weight: 600; }
.capability-tags, .role-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.capability-tags span, .role-tags span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #526177; font-size: 11px; font-weight: 650; }
.section-heading-wide { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 54px; }
.section-intro { max-width: 410px; margin: 0 0 5px; color: var(--muted); font-size: 15px; }

/* Experience timeline */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 25px; left: 183px; width: 1px; background: #d6e0ed; }
.timeline-item { display: grid; grid-template-columns: 150px 1px minmax(0, 1fr); column-gap: 33px; padding-bottom: 38px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-date { padding-top: 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-align: right; }
.timeline-marker { position: relative; z-index: 1; width: 11px; height: 11px; margin: 7px 0 0 -5px; border: 3px solid var(--surface); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #cbd9eb; }
.timeline-content { padding: 0 0 0 5px; }
.role-top { display: flex; justify-content: space-between; gap: 20px; }
.timeline-content h3 { margin: 0; font-size: 20px; line-height: 1.4; letter-spacing: -.025em; }
.company { margin: 5px 0 14px; color: var(--blue); font-size: 13px; font-weight: 750; }
.timeline-content > p { max-width: 790px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.role-number { color: #d1dbe8; font-size: 22px; font-weight: 800; }
.achievement-list { display: grid; gap: 9px; margin: 17px 0 0; padding-left: 19px; color: var(--muted); font-size: 13px; }
.achievement-list li::marker { color: var(--blue); }
.achievement-list strong { color: var(--ink-soft); }

/* Leadership cards */
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.impact-card { position: relative; min-height: 218px; padding: 25px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.impact-card:hover { transform: translateY(-4px); border-color: #bfd0e7; box-shadow: 0 16px 36px rgba(23,38,59,.07); }
.impact-featured { background: var(--blue); border-color: var(--blue); color: white; }
.impact-index { position: absolute; top: 20px; right: 22px; color: #9eacbd; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.impact-featured .impact-index { color: rgba(255,255,255,.55); }
.impact-number { margin: 18px 0 8px; color: var(--blue); font-size: 48px; line-height: 1.1; font-weight: 800; letter-spacing: -.07em; }
.impact-number span { font-size: 28px; }
.impact-featured .impact-number { color: white; }
.impact-icon { margin: 15px 0 13px; color: var(--blue); font-size: 34px; line-height: 1.1; }
.impact-card h3 { margin: 10px 0 8px; font-size: 16px; letter-spacing: -.02em; }
.impact-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.impact-featured p { color: rgba(255,255,255,.8); }

/* Education */
.education-layout { align-items: start; }
.education-layout .section-intro { margin-top: 22px; }
.education-list { display: grid; }
.education-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 17px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.education-item:first-child { padding-top: 0; }
.education-item:last-child { border-bottom: 0; }
.education-symbol { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #d5e2f2; border-radius: 10px; background: #fff; color: var(--blue); font-size: 12px; font-weight: 800; }
.education-item h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.5; }
.education-item p { margin: 0; color: var(--muted); font-size: 13px; }
.education-item span { display: inline-block; margin-top: 5px; color: #8793a3; font-size: 11px; }

/* Contact and footer */
.contact-section { padding: 82px 0; background: #172b47; color: white; }
.contact-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); align-items: center; gap: 60px; }
.contact-panel .eyebrow { color: #a9c8f4; }
.contact-panel .eyebrow::before { content: ""; width: 24px; height: 2px; background: #a9c8f4; }
.contact-panel h2 { max-width: 600px; margin: 0 0 17px; font-size: clamp(34px, 4.5vw, 52px); line-height: 1.15; letter-spacing: -.055em; }
.contact-panel h2 span { color: #a9c8f4; }
.contact-panel > div:first-child > p:last-child { max-width: 500px; margin: 0; color: #c3cede; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; }
.button-light { background: white; color: var(--ink); }
.button-light:hover { background: #edf3fb; }
.contact-location, .contact-phone { margin: 15px 0 0; color: #c3cede; font-size: 13px; }
.contact-phone { margin-top: 2px; }
.linkedin-link { margin-top: 12px; color: #c9dcf8; font-size: 13px; font-weight: 650; text-underline-offset: 4px; }
.site-footer { padding: 28px 0; background: #102039; color: #b8c5d7; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.3fr auto; align-items: center; gap: 12px 25px; }
.footer-brand { color: white; text-decoration: none; font-size: 13px; font-weight: 750; }
.footer-brand span { color: #a9c8f4; font-weight: 500; }
.footer-inner p { margin: 0; font-size: 11px; }
.back-to-top { justify-self: end; color: #d4e1f2; font-size: 11px; text-decoration: none; }
.back-to-top:hover { color: white; }
.footer-inner small { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.12); color: #8f9fb5; font-size: 10px; }

/* Responsive navigation and layout */
@media (max-width: 960px) {
  .nav-links { gap: 17px; }
  .nav-links a { font-size: 12px; }
  .hero { padding: 75px 0 80px; }
  .hero-grid { gap: 36px; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); }
  .two-column { gap: 45px; }
  .timeline::before { left: 151px; }
  .timeline-item { grid-template-columns: 120px 1px minmax(0, 1fr); column-gap: 28px; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .container { width: min(100% - 36px, var(--content-width)); }
  .navbar { min-height: 68px; }
  .brand-name { font-size: 14px; }
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 8px 18px 18px; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 18px 24px rgba(23,38,59,.08); }
  .nav-links.is-open { display: flex; align-items: stretch; flex-direction: column; gap: 0; }
  .nav-links li { width: 100%; }
  .nav-links a { display: flex; min-height: 44px; padding: 0 8px; font-size: 14px; }
  .nav-links a::after { display: none; }
  .nav-links .nav-contact { justify-content: center; margin-top: 7px; min-height: 42px; }
  .hero { padding: 62px 0 68px; }
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .hero h1 { font-size: clamp(43px, 12vw, 64px); }
  .hero-subtitle { font-size: 15px; }
  .hero-intro { font-size: 15px; }
  .hero-card { max-width: 520px; }
  .section { padding: 72px 0; }
  .two-column { grid-template-columns: 1fr; gap: 28px; }
  .section-heading h2 { max-width: 600px; }
  .section-heading-wide { display: block; margin-bottom: 35px; }
  .section-intro { margin-top: 18px; }
  .timeline::before { left: 5px; }
  .timeline-item { grid-template-columns: 1fr; padding-left: 27px; padding-bottom: 35px; }
  .timeline-date { text-align: left; padding: 0 0 8px; }
  .timeline-marker { position: absolute; margin: 5px 0 0 -27px; }
  .timeline-item { position: relative; }
  .timeline-content { padding: 0; }
  .timeline-content h3 { font-size: 18px; }
  .role-number { font-size: 16px; }
  .impact-grid { gap: 12px; }
  .impact-card { min-height: 205px; padding: 21px; }
  .contact-section { padding: 65px 0; }
  .contact-panel { grid-template-columns: 1fr; gap: 30px; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-inner p { grid-column: 1 / -1; grid-row: 2; }
  .back-to-top { grid-column: 2; grid-row: 1; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 30px); }
  .brand-mark { width: 36px; height: 36px; }
  .brand { gap: 9px; }
  .brand-name { font-size: 13px; }
  .eyebrow { font-size: 9px; letter-spacing: .11em; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .hero-card { padding: 22px; }
  .mini-stat-grid { gap: 12px; }
  .mini-stat-grid strong { font-size: 27px; }
  .impact-grid { grid-template-columns: 1fr; }
  .impact-card { min-height: auto; }
  .impact-number { margin-top: 13px; }
  .role-top { gap: 10px; }
  .timeline-content h3 { font-size: 17px; }
  .education-item { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .education-symbol { width: 42px; height: 42px; font-size: 10px; }
  .footer-inner { grid-template-columns: 1fr; }
  .back-to-top { justify-self: start; grid-column: 1; grid-row: auto; }
  .footer-inner p { grid-column: 1; grid-row: auto; }
  .footer-inner small { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
