/*
Theme Name: ICAAM Network
Theme URI: https://icaam.org.my/
Author: ICAAM
Description: An original, image-led alumni community theme for ICAAM.
Version: 1.2.0
Text Domain: icaam-network
*/

:root {
  --blue: #001e62;
  --blue-bright: #1236ff;
  --blue-soft: #e8edff;
  --red: #e83f4f;
  --ink: #101828;
  --muted: #536174;
  --line: #dce2eb;
  --paper: #ffffff;
  --wash: #f5f7fb;
  --gold: #f4bd4a;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 30, 98, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-bright); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--red); }
button, input, textarea, select { font: inherit; }
.site-shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 9999; padding: 12px 18px; background: var(--paper); color: var(--blue); }
.skip-link:focus { top: 16px; }

.utility-bar { background: var(--blue); color: #fff; font-size: 13px; letter-spacing: .02em; }
.utility-bar .site-shell { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.utility-bar a { color: #fff; text-decoration: none; }
.utility-links { display: flex; gap: 24px; }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.main-nav { min-height: 86px; display: flex; align-items: center; gap: 38px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--blue); text-decoration: none; }
.brand img { width: 154px; max-height: 62px; object-fit: contain; }
.brand-copy { border-left: 1px solid var(--line); padding-left: 14px; font-size: 11px; line-height: 1.3; text-transform: uppercase; letter-spacing: .12em; max-width: 170px; }
.primary-links { display: flex; align-items: center; justify-content: flex-end; gap: 28px; margin-left: auto; }
.primary-links a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 700; }
.primary-links a:hover { color: var(--blue-bright); }
.nav-cta { padding: 12px 18px; color: #fff !important; background: var(--blue-bright); border-radius: 999px; }
.menu-toggle { display: none; margin-left: auto; border: 0; background: transparent; color: var(--blue); font-weight: 800; }

.hero { padding: 28px 0 84px; background: linear-gradient(180deg, #fff 0%, var(--wash) 100%); overflow: hidden; }
.hero-media { position: relative; height: min(58vw, 610px); min-height: 430px; border-radius: 4px; overflow: hidden; background: var(--blue); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; opacity: .87; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,20,70,.92) 0%, rgba(0,20,70,.48) 48%, rgba(0,20,70,.08) 78%); }
.hero-content { position: absolute; z-index: 2; left: clamp(28px, 7vw, 84px); bottom: clamp(34px, 8vw, 90px); width: min(690px, calc(100% - 56px)); color: #fff; }
.eyebrow { margin: 0 0 16px; color: var(--red); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow { color: #ffd5d9; }
.hero h1 { margin: 0; font-size: clamp(48px, 7vw, 92px); line-height: .98; letter-spacing: -.055em; max-width: 720px; }
.hero p { max-width: 610px; margin: 24px 0 0; font-size: clamp(18px, 2vw, 23px); line-height: 1.45; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 20px; border: 2px solid var(--blue-bright); border-radius: 999px; background: var(--blue-bright); color: #fff; text-decoration: none; font-size: 15px; font-weight: 800; }
.button:hover { background: var(--red); border-color: var(--red); color: #fff; }
.button--light { border-color: #fff; background: #fff; color: var(--blue); }
.button--ghost { border-color: rgba(255,255,255,.75); background: transparent; color: #fff; }
.button--outline { background: transparent; color: var(--blue); border-color: var(--blue); }

.intro-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(38px, 8vw, 110px); padding: 92px 0; align-items: start; }
.intro-grid h2, .section-heading h2, .split-panel h2, .cta-band h2 { margin: 0; color: var(--blue); font-size: clamp(38px, 5vw, 64px); line-height: 1.03; letter-spacing: -.045em; }
.intro-grid .lede { margin: 24px 0 0; font-size: clamp(20px, 2.3vw, 28px); line-height: 1.42; color: #26354b; }
.arrow-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.arrow-links li { border-bottom: 1px solid var(--line); }
.arrow-links a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; color: var(--ink); text-decoration: none; font-weight: 800; }
.arrow-links a::after { content: "→"; color: var(--blue-bright); font-size: 24px; transition: transform .2s ease; }
.arrow-links a:hover::after { transform: translateX(5px); }

.pathways { padding: 92px 0; background: var(--blue); color: #fff; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 42px; }
.section-heading h2 { color: inherit; }
.section-heading p { max-width: 480px; margin: 0; color: rgba(255,255,255,.74); }
.pathway-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pathway-card { position: relative; min-height: 320px; padding: 26px; color: var(--ink); background: #fff; border-radius: var(--radius); text-decoration: none; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.pathway-card:hover { color: var(--ink); transform: translateY(-6px); box-shadow: var(--shadow); }
.pathway-card:nth-child(2) { background: var(--blue-soft); }
.pathway-card:nth-child(3) { background: #fff0f1; }
.pathway-card:nth-child(4) { background: #fff7e6; }
.pathway-number { color: var(--blue-bright); font-weight: 800; font-size: 13px; }
.pathway-card h3 { margin: 80px 0 12px; font-size: 31px; line-height: 1; letter-spacing: -.035em; }
.pathway-card p { margin: 0; color: var(--muted); font-size: 15px; }
.pathway-card .arrow { position: absolute; right: 24px; bottom: 18px; font-size: 30px; color: var(--red); }

.stories { padding: 96px 0; }
.stories .section-heading { color: var(--blue); }
.stories .section-heading p { color: var(--muted); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.story-card { min-width: 0; border-top: 5px solid var(--blue-bright); background: var(--paper); }
.story-card:nth-child(2) { border-color: var(--red); }
.story-card:nth-child(3) { border-color: var(--gold); }
.story-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--blue-soft); }
.story-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.story-card:hover .story-thumb img { transform: scale(1.035); }
.story-content { position: relative; padding: 22px 4px; }
.story-meta { color: var(--blue-bright); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.story-card h3 { margin: 10px 0 12px; font-size: 26px; line-height: 1.14; letter-spacing: -.025em; }
.story-card h3 a { color: var(--ink); text-decoration: none; }
.story-content p { color: var(--muted); font-size: 15px; }

.split-panel { display: grid; grid-template-columns: 1fr 1fr; min-height: 620px; background: var(--wash); }
.split-photo { min-height: 500px; }
.split-photo img { width: 100%; height: 100%; object-fit: cover; }
.split-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(44px, 8vw, 110px); }
.split-copy p { color: var(--muted); font-size: 19px; }
.stat-row { display: flex; gap: 44px; padding-top: 20px; }
.stat strong { display: block; color: var(--blue-bright); font-size: 38px; line-height: 1; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }

.cta-band { margin: 96px auto; padding: clamp(40px, 7vw, 82px); border-radius: 30px; background: linear-gradient(120deg, var(--blue-bright), var(--blue)); color: #fff; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 330px; height: 330px; border: 80px solid rgba(255,255,255,.08); border-radius: 50%; right: -90px; top: -100px; }
.cta-band h2 { color: #fff; max-width: 720px; }
.cta-band p { max-width: 640px; font-size: 19px; color: rgba(255,255,255,.8); }

.content-hero { padding: 74px 0 56px; background: var(--wash); border-bottom: 1px solid var(--line); }
.content-hero h1 { max-width: 900px; margin: 0; color: var(--blue); font-size: clamp(42px, 6vw, 74px); line-height: 1.02; letter-spacing: -.05em; }
.content-hero p { max-width: 720px; color: var(--muted); font-size: 20px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(230px, 1fr); gap: 72px; padding: 72px 0 110px; }
.entry-content { min-width: 0; }
.entry-content h2, .entry-content h3 { color: var(--blue); line-height: 1.15; }
.entry-content h2 { margin-top: 48px; font-size: 34px; }
.entry-content h3 { margin-top: 34px; font-size: 25px; }
.entry-content p, .entry-content li { color: #29384d; }
.entry-content img { border-radius: 16px; }
.entry-content iframe { max-width: 100%; }
.entry-content > :first-child { margin-top: 0; }
.entry-content blockquote { margin: 28px 0; padding: 20px 24px; border-left: 5px solid var(--blue-bright); background: var(--wash); }
.entry-content .wp-block-embed, .entry-content .video-embed { margin: 30px 0; }
.entry-content .wp-block-embed__wrapper, .entry-content .video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.entry-content .wp-block-embed__wrapper iframe, .entry-content .video-embed iframe { width: 100%; height: 100%; border: 0; }
.content-note { margin: 0 0 30px; padding: 18px 20px; border-left: 5px solid var(--blue-bright); background: var(--blue-soft); color: #26354b; border-radius: 0 12px 12px 0; }
.content-note--archive { border-color: var(--gold); background: #fff7e6; }
.content-note--review { border-color: var(--red); background: #fff0f1; }
.content-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; }
.role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; list-style: none; padding: 0; }
.role-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.role-list strong { display: block; color: var(--blue); }
.entry-content input:not([type="submit"]), .entry-content textarea, .entry-content select { width: 100%; max-width: 100%; padding: 12px 14px; border: 1px solid #aeb8c7; border-radius: 8px; background: #fff; }
.entry-content input[type="submit"] { min-height: 48px; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--blue-bright); color: #fff; font-weight: 800; cursor: pointer; }
.entry-content label { display: block; margin-top: 14px; color: var(--blue); font-weight: 700; }
.entry-content .caldera-grid .row { margin-left: 0; margin-right: 0; }
.entry-content .caldera-grid [class*="col-"] { padding-left: 0; padding-right: 0; }
.missing-archive-media { font-size: 14px; color: var(--muted); font-style: italic; }
.history-explorer { margin: 30px 0 0; }
.history-nav { position: sticky; top: 96px; z-index: 20; width: 100%; max-width: 100%; min-width: 0; margin: 0 0 28px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 14px 38px rgba(0,30,98,.1); backdrop-filter: blur(16px); }
.history-nav__label { display: block; padding: 2px 8px 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.history-nav__rail { display: flex; max-width: 100%; min-width: 0; gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scroll-snap-type: x proximity; padding-bottom: 2px; }
.history-nav a { flex: 0 0 auto; scroll-snap-align: start; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--blue); background: var(--paper); text-decoration: none; font-size: 13px; font-weight: 800; white-space: nowrap; }
.history-nav a:hover, .history-nav a:focus-visible { color: #fff; border-color: var(--blue-bright); background: var(--blue-bright); outline: none; }
.history-timeline { position: relative; display: grid; gap: 18px; }
.history-timeline::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 20px; width: 2px; background: linear-gradient(var(--red), var(--blue-bright)); }
.history-era { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 10px 30px rgba(0,30,98,.06); overflow: clip; }
.history-era::before { content: ""; position: absolute; z-index: 2; top: 25px; left: 14px; width: 13px; height: 13px; border: 4px solid var(--paper); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--red); }
.history-era summary { position: relative; display: grid; grid-template-columns: minmax(86px, auto) minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 68px; padding: 15px 18px 15px 48px; color: var(--blue); cursor: pointer; list-style: none; }
.history-era summary::-webkit-details-marker { display: none; }
.history-era summary::after { content: "+"; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--blue-bright); background: var(--blue-soft); font-size: 22px; line-height: 1; }
.history-era[open] summary::after { content: "−"; }
.history-era summary:hover, .history-era summary:focus-visible { background: var(--wash); outline: none; }
.history-era__label { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.history-era__title { min-width: 0; font-size: clamp(18px, 2.2vw, 24px); font-weight: 800; line-height: 1.15; }
.history-era__content { padding: 4px 28px 32px 48px; border-top: 1px solid var(--line); }
.history-era__content > :first-child { margin-top: 28px; }
.history-era__content h3 { scroll-margin-top: 170px; }
.history-era:target { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(18,54,255,.12), 0 18px 50px rgba(0,30,98,.12); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content td, .entry-content th { padding: 12px; border: 1px solid var(--line); text-align: left; }
.content-aside { border-top: 5px solid var(--red); padding-top: 22px; }
.content-aside h2 { color: var(--blue); font-size: 24px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-list a { color: var(--ink); text-decoration: none; font-weight: 700; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 72px 0 110px; }
.pagination { grid-column: 1 / -1; padding-top: 30px; }

.site-footer { background: #071632; color: #fff; padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 60px; }
.footer-brand { font-size: 29px; font-weight: 800; letter-spacing: -.03em; }
.footer-grid h2 { margin: 0 0 16px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: #aebde5; }
.footer-grid p { color: #c8d0e1; max-width: 460px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 10px 0; }
.footer-grid a { color: #fff; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 58px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.17); color: #9eabc3; font-size: 13px; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .brand-copy { display: none; }
  .menu-toggle { display: block; }
  .primary-links { display: none; position: absolute; left: 24px; right: 24px; top: 82px; padding: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .primary-links.is-open { display: flex; }
  .pathway-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid, .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .split-panel { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; gap: 42px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-shell { width: min(100% - 30px, 1180px); }
  .utility-bar .site-shell { justify-content: flex-end; }
  .utility-label { display: none; }
  .utility-links { gap: 14px; }
  .main-nav { min-height: 72px; }
  .brand img { width: 122px; }
  .primary-links { top: 70px; left: 15px; right: 15px; }
  .hero { padding-top: 14px; padding-bottom: 54px; }
  .hero-media { min-height: 580px; height: 76vh; }
  .hero-media img { object-position: 58% center; }
  .hero-media::after { background: linear-gradient(0deg, rgba(0,20,70,.96) 0%, rgba(0,20,70,.55) 58%, rgba(0,20,70,.16) 100%); }
  .hero-content { left: 24px; bottom: 30px; width: calc(100% - 48px); }
  .hero h1 { font-size: clamp(43px, 14vw, 64px); }
  .hero p { font-size: 18px; }
  .intro-grid { grid-template-columns: 1fr; padding: 64px 0; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 18px; }
  .pathways, .stories { padding: 66px 0; }
  .pathway-grid, .story-grid, .archive-grid { grid-template-columns: minmax(0, 1fr); }
  .stories .story-card, .stories .section-heading { opacity: 1; transform: none; }
  .stories .button-row { position: relative; z-index: 1; clear: both; margin-top: 34px; }
  .story-thumb { aspect-ratio: 16 / 10; }
  .story-card h3 { font-size: 25px; overflow-wrap: anywhere; }
  .pathway-card { min-height: 250px; }
  .pathway-card h3 { margin-top: 45px; }
  .split-photo { min-height: 340px; }
  .split-copy { padding: 48px 24px; }
  .stat-row { gap: 28px; }
  .cta-band { margin: 64px 15px; border-radius: 22px; }
  .content-hero { padding: 48px 0 36px; }
  .content-layout { padding: 48px 0 80px; }
  .history-nav { top: 76px; margin-inline: -4px; border-radius: 15px; }
  .history-nav__rail { padding-right: 10px; }
  .history-era summary { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 15px 14px 15px 44px; }
  .history-era__label { grid-column: 1; }
  .history-era__title { grid-column: 1; }
  .history-era summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .history-era__content { padding: 2px 18px 28px 44px; }
  .role-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
