/* ============================================================
   Mabelle Alakari — Portfolio
   Palette pulled from brand image: cornflower blue, yellow,
   deep navy, near-black, white. Type: SF Pro (system).
   ============================================================ */

:root {
  --ink: #14151b;
  --ink-soft: #44464f;
  --paper: #ffffff;
  --mist: #f1f3f9;
  --mist-2: #e6e9f4;
  --blue: #4e63d8;
  --blue-600: #3d50c2;
  --blue-700: #2f3fa0;
  --navy: #161d4a;
  --navy-2: #1f2860;
  --yellow: #f2e84a;
  --yellow-deep: #ece036;
  --line: rgba(20, 21, 27, 0.10);
  --line-on-blue: rgba(255, 255, 255, 0.18);

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --r-xl: 44px;

  --shadow-sm: 0 4px 16px rgba(22, 29, 74, 0.08);
  --shadow-md: 0 18px 48px rgba(22, 29, 74, 0.14);
  --shadow-lg: 0 40px 90px rgba(22, 29, 74, 0.22);

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);

  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  /* hide native cursor only when custom cursor is active (pointer devices) */
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--yellow-deep); }
.eyebrow.on-dark { color: var(--yellow); }
.eyebrow.on-dark::before { background: var(--yellow); }

h1, h2, h3 { line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
.h-sec {
  font-size: clamp(34px, 6vw, 74px);
  margin-top: 18px;
  text-wrap: balance;
}
.lead { font-size: clamp(16px, 1.7vw, 20px); color: var(--ink-soft); max-width: 56ch; text-wrap: pretty; }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; border-radius: 50%;
  pointer-events: none; z-index: 9999; mix-blend-mode: normal;
  will-change: transform; opacity: 0;
}
.cursor-dot { width: 7px; height: 7px; background: var(--ink); transform: translate(-50%, -50%); }
.cursor-ring {
  width: 38px; height: 38px; border: 1.5px solid rgba(20,21,27,.4);
  transform: translate(-50%, -50%); transition: width .25s, height .25s, background .25s, border-color .25s, opacity .3s;
}
.cursor-ring.hot { width: 64px; height: 64px; background: rgba(242,232,74,.22); border-color: var(--yellow-deep); }
.cursor-ring.invert { border-color: rgba(255,255,255,.5); }
.cursor-dot.invert { background: var(--yellow); }
body.cursor-on .cursor-dot, body.cursor-on .cursor-ring { opacity: 1; }
@media (max-width: 1023px), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 15px 26px; border-radius: 100px; border: none;
  background: var(--ink); color: var(--paper);
  transition: transform .35s cubic-bezier(.16,1,.3,1), background .3s, box-shadow .3s;
  position: relative;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn .ico { width: 17px; height: 17px; transition: transform .35s; }
.btn:hover .ico { transform: translate(3px, -3px); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--lg { padding: 19px 34px; font-size: 17px; }

/* Temporarily hide the Blog links (markup kept; delete this rule to restore) */
a[href="blog.html"] { display: none !important; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: transform .4s ease, background .3s, box-shadow .3s, padding .3s;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px; transition: height .3s;
}
.nav.scrolled { background: rgba(255,255,255,.82); backdrop-filter: blur(18px); box-shadow: 0 1px 0 var(--line); }
.nav.scrolled .nav-inner { height: 64px; }
.nav.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 19px; letter-spacing: -0.04em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--blue);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.brand .mark.alt { background: var(--yellow); color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--ink); padding: 9px 14px;
  border-radius: 100px; transition: background .25s, color .25s; position: relative;
}
.nav-links a:hover { background: var(--mist); }
.nav-links a.active { color: var(--blue); }
.nav-cta { margin-left: 8px; }
.nav-cv {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0 !important; flex: 0 0 auto;
  border: 1.5px solid var(--line); border-radius: 100px; color: var(--ink);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.nav-cv:hover { background: var(--ink) !important; color: #fff; border-color: var(--ink); transform: translateY(-2px); }
.nav-cv i { width: 18px; height: 18px; }
.nav-lang {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 4px;
  padding: 5px; border: 1.5px solid var(--line); border-radius: 100px;
  background: transparent; font-family: inherit; line-height: 1; cursor: pointer;
}
.nav-lang span {
  font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ink-soft);
  padding: 4px 9px; border-radius: 100px; transition: background .25s, color .25s;
}
.nav-lang[data-active="en"] span[data-lang-opt="en"],
.nav-lang[data-active="fr"] span[data-lang-opt="fr"] { background: var(--ink); color: #fff; }
.nav-burger { display: none; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); border: none; position: relative; }
.nav-burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; transition: .3s; }
.nav-burger span:nth-child(1) { top: 16px; } .nav-burger span:nth-child(2) { top: 22px; } .nav-burger span:nth-child(3) { top: 28px; }
.nav-burger.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 880px) {
  /* keep the open menu full-height & pinned: a transform OR backdrop-filter on
     .nav would make it the containing block and trap the fixed menu in the header */
  .nav:has(.nav-links.open) { transform: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

  .nav-links {
    position: fixed; inset: 0; height: 100dvh; z-index: 940;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: var(--navy); padding: 96px var(--pad) 48px;
    transform: translateX(100%); overflow-y: auto;
    transition: transform .45s cubic-bezier(.16,1,.3,1);
  }
  .nav-links.open { transform: none; }
  .nav-links a:not(.nav-cta) { color: #fff; font-size: clamp(24px, 6vw, 30px); font-weight: 600; padding: 12px 0; }
  .nav-links a:not(.nav-cta):hover,
  .nav-links a:not(.nav-cta).active { background: transparent; color: var(--yellow); }
  .nav-cta { margin: 24px 0 0; font-size: 17px; }
  .nav-burger { display: block; position: relative; z-index: 950; }
  /* on the navy mobile menu, keep the CV icon & language toggle legible */
  .nav-cv { color: #fff; border-color: rgba(255,255,255,.35); margin-top: 14px; }
  .nav-lang { margin: 14px 0 0; border-color: rgba(255,255,255,.35); }
  .nav-lang span { color: rgba(255,255,255,.7); font-size: 14px; padding: 6px 14px; }
}

/* ---------- footer ---------- */
.footer { background: var(--navy); color: #fff; padding-block: clamp(60px, 8vw, 100px) 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer h3 { font-size: clamp(30px, 5vw, 52px); letter-spacing: -0.04em; }
.footer .f-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--yellow); margin-bottom: 16px; }
.footer .f-col a { display: block; padding: 7px 0; color: rgba(255,255,255,.78); transition: color .2s, transform .2s; width: max-content; }
.footer .f-col a:hover { color: #fff; transform: translateX(4px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-on-blue); color: rgba(255,255,255,.6); font-size: 14px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- generic image placeholder ---------- */
.ph {
  position: relative; overflow: hidden; background:
    repeating-linear-gradient(135deg, var(--mist) 0 14px, var(--mist-2) 14px 28px);
  display: grid; place-items: center;
}
.ph span { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: .08em; color: var(--blue-700); background: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 100px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 120px; overflow: hidden; background: var(--paper); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 64px);
  align-items: center; min-height: min(86vh, 820px);
}
.hero-copy { position: relative; z-index: 3; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600;
  background: var(--mist); padding: 8px 16px 8px 10px; border-radius: 100px; color: var(--ink-soft); margin-bottom: 26px;
}
.hero-tag .dot { width: 9px; height: 9px; border-radius: 50%; background: #36c46f; box-shadow: 0 0 0 4px rgba(54,196,111,.2); }
.hero h1 { font-size: clamp(46px, 9vw, 118px); line-height: 0.92; letter-spacing: -0.045em; }
.hero h1 .out { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.hero h1 .hl { position: relative; color: var(--blue); }
/* render the · as a true circle instead of the font glyph (which looks oval at this size) */
.hero h1 .swatch {
  display: inline-block; width: 0.19em; height: 0.19em; border-radius: 50%;
  background: var(--blue); color: transparent; overflow: hidden;
  vertical-align: 0.26em; margin-left: 0.06em; /* centered against the cap-height of ENGINEER */
}
.hero h1 .hero-kicker {
  display: block; font-size: clamp(15px, 1.5vw, 19px); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 10px; line-height: 1;
}
.hero-sub { margin-top: 26px; max-width: 44ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 34px; margin-top: 52px; flex-wrap: wrap; }
.hero-stats .st b { font-size: clamp(34px, 3.8vw, 46px); font-weight: 700; letter-spacing: -0.04em; display: block; line-height: 1.1; }
/* only the label (direct child span) — NOT the number/plus spans inside <b> */
.hero-stats .st > span { font-size: 15px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.hero-stats .st b .plus { color: var(--blue); }
/* ∞ shares the digit font-size; a small scale-up makes the glyph read at the same height as the
   digits (it sits low in the em box). transform doesn't change the box, so labels stay aligned */
.hero-stats .st b.st-inf { color: var(--blue); display: flex; align-items: flex-end; transform: scale(1.18); transform-origin: left bottom; }

/* hero portrait */
.hero-visual { position: relative; height: 100%; min-height: 460px; display: grid; place-items: center; }
.portrait-card {
  position: relative; width: min(100%, 460px); aspect-ratio: 4/4.7; border-radius: var(--r-xl);
  overflow: visible; background: var(--blue); box-shadow: var(--shadow-lg);
}
.portrait-card { background: radial-gradient(120% 90% at 50% 8%, #6f81e6 0%, var(--blue) 55%, var(--blue-700) 100%); }
.portrait-card img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: auto; height: 165%; object-fit: contain; object-position: bottom center;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.28));
}
.portrait-card .grain { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, transparent 60%, rgba(22,29,74,.4)); pointer-events: none; }
.portrait-card .dots { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background-image: radial-gradient(rgba(255,255,255,.16) 1.5px, transparent 1.5px); background-size: 22px 22px; opacity: .5; pointer-events: none; }
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(2px); z-index: 1;
}
.blob-y { width: clamp(90px, 13vw, 160px); height: clamp(90px, 13vw, 160px); background: var(--yellow); right: -10%; top: 6%; }
.blob-b { width: clamp(110px, 16vw, 200px); height: clamp(110px, 16vw, 200px); background: radial-gradient(circle at 30% 30%, #6f81e6, var(--blue)); left: -8%; bottom: 4%; opacity: .9; }
.float-chip {
  position: absolute; z-index: 4; background: #fff; border-radius: 16px; padding: 13px 16px;
  box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 14px;
}
.float-chip .ci { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.float-chip small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 11.5px; }
.chip-1 { top: 8%; left: -6%; } .chip-2 { bottom: 14%; right: -8%; } .chip-3 { bottom: 5%; left: 10%; }

.marquee { border-block: 1px solid var(--line); background: var(--paper); overflow: hidden; padding-block: 22px; margin-top: 40px; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: slide 26s linear infinite; }
.marquee-track span { font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: "✦"; color: var(--blue); font-size: .7em; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---- tablet ---- */
@media (max-width: 1024px) {
  .hero { padding-top: 116px; }
  /* stack into one centered column */
  .hero-grid { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; min-height: 0; padding-bottom: 24px; }
  /* flatten the copy so its parts can be reordered around the image */
  .hero-copy { display: contents; }
  /* order: availability tag → portrait → title → text → actions → stats */
  .hero-tag { order: 1; }
  .hero-visual { order: 2; min-height: 0; width: min(74vw, 360px); align-self: center; margin: 6px auto 30px; }
  .hero h1 { order: 3; width: 100%; }
  .hero-sub { order: 4; }
  .hero-actions { order: 5; }
  .hero-stats { order: 6; margin-top: 48px; } /* breathing room above the stats */
  .hero-stats .st b.st-inf { justify-content: center; transform-origin: bottom; } /* center ∞ like the digits */
  .portrait-card { width: 100%; }
  .portrait-card img { height: 125%; } /* smaller head pop so it isn't clipped by the hero top */
  /* drop the scroll cue into flow below the stats so it doesn't overlap them.
     .hero prefix raises specificity so it beats the absolute base rule defined later in the file */
  .hero .scroll-cue { position: static; transform: none; width: fit-content; margin: 34px auto 0; }
}

/* ---- phone ---- */
@media (max-width: 600px) {
  .hero { padding-top: 100px; }
  .hero h1 { font-size: clamp(58px, 16vw, 82px); }
  .hero-visual { width: min(82vw, 300px); margin-bottom: 26px; }
  .portrait-card img { height: 122%; }
  .hero-tag { font-size: 13px; margin-bottom: 20px; }
  .hero-sub { margin-top: 20px; }
  /* one stat per row, centered */
  .hero-stats { flex-direction: column; align-items: center; gap: 24px; margin-top: 44px; }
  .hero-stats .st { text-align: center; }
  .hero-actions { width: 100%; margin-top: 28px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .float-chip { padding: 10px 13px; font-size: 12.5px; gap: 9px; }
  .float-chip .ci { width: 32px; height: 32px; border-radius: 9px; }
  .float-chip small { font-size: 10.5px; }
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills { background: var(--mist); }
.skills-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 56px; }
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.skill-card {
  background: var(--paper); border-radius: var(--r-md); padding: 30px; position: relative; overflow: hidden;
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s; min-height: 250px;
  display: flex; flex-direction: column;
}
.skill-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.skill-card .si { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--mist); color: var(--blue); margin-bottom: 22px; transition: background .35s, color .35s; }
.skill-card:hover .si { background: var(--blue); color: #fff; }
.skill-card.feat { background: var(--blue); color: #fff; }
.skill-card.feat .si { background: rgba(255,255,255,.16); color: #fff; }
.skill-card.feat:hover .si { background: var(--yellow); color: var(--ink); }
.skill-card h3 { font-size: 21px; margin-bottom: 10px; }
.skill-card p { font-size: 14.5px; color: var(--ink-soft); }
.skill-card.feat p { color: rgba(255,255,255,.82); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 18px; }
.skill-tags span { font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 100px; background: var(--mist); color: var(--ink-soft); }
.skill-card.feat .skill-tags span { background: rgba(255,255,255,.16); color: #fff; }
.skill-card .num { position: absolute; top: 22px; right: 26px; font-size: 13px; font-weight: 700; color: var(--line); }
.skill-card.feat .num { color: rgba(255,255,255,.3); }
@media (max-width: 980px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .skills-head { grid-template-columns: 1fr; align-items: start; gap: 16px; } }
@media (max-width: 520px) { .skills-grid { grid-template-columns: 1fr; } }

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.exp { background: var(--navy); color: #fff; overflow: hidden; }
.exp .lead { color: rgba(255,255,255,.74); }
.timeline { position: relative; margin-top: 64px; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--yellow), var(--blue), transparent); transform: translateX(-50%);
}
.tl-progress { position: absolute; left: 50%; top: 0; width: 4px; background: var(--yellow); transform: translateX(-50%); border-radius: 4px; height: 0; box-shadow: 0 0 18px rgba(242,232,74,.6); z-index: 2; }
.tl-item { position: relative; width: 50%; padding: 0 56px 64px; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; }
.tl-node {
  position: absolute; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--navy);
  border: 3px solid var(--yellow); z-index: 3; transition: transform .4s, background .4s;
}
.tl-item:nth-child(odd) .tl-node { right: -9px; }
.tl-item:nth-child(even) .tl-node { left: -9px; }
.tl-item.in .tl-node { transform: scale(1.25); background: var(--yellow); }
.tl-card {
  background: var(--navy-2); border: 1px solid var(--line-on-blue); border-radius: var(--r-md);
  padding: 26px 28px; transition: transform .4s, border-color .4s; position: relative;
}
.tl-card:hover { transform: translateY(-5px); border-color: var(--yellow); }
.tl-date { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--yellow); margin-bottom: 12px; text-transform: uppercase; }
.tl-card h3 { font-size: 22px; margin-bottom: 4px; }
.tl-co { font-size: 14.5px; color: #cdd2f0; font-weight: 600; margin-bottom: 12px; }
.tl-card p { font-size: 14px; color: rgba(255,255,255,.7); }
.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tl-item:nth-child(odd) .tl-chips { justify-content: flex-end; }
.tl-chips span { font-size: 11.5px; padding: 5px 10px; border-radius: 100px; background: rgba(255,255,255,.08); color: #d4d8f5; font-weight: 600; }

@media (max-width: 820px) {
  .timeline::before, .tl-progress { left: 16px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 40px 50px; }
  .tl-item .tl-node { left: 7px !important; right: auto !important; }
  .tl-item:nth-child(odd) .tl-chips { justify-content: flex-start; }
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.certs { background: var(--paper); }
.certs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cert-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px;
  position: relative; overflow: hidden; min-height: 226px; display: flex; flex-direction: column;
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s, border-color .4s;
}
.cert-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: transparent; }
.cert-ic {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: var(--mist); color: var(--blue); margin-bottom: 22px; transition: background .35s, color .35s;
}
.cert-card:hover .cert-ic { background: var(--blue); color: #fff; }
/* company logos inside the icon tile — inherit the tile's color so they recolor on hover */
.cert-ic .cert-logo { width: 28px; height: 28px; }
.cert-wordmark { font-weight: 800; font-size: 19px; letter-spacing: -0.04em; line-height: 1; }
.cert-wordmark--lc { text-transform: lowercase; font-size: 18px; letter-spacing: -0.05em; }
.cert-card h3 { font-size: 18px; line-height: 1.28; margin-bottom: 6px; }
.cert-org { font-size: 14px; color: var(--ink-soft); }
.cert-corner { position: absolute; top: 22px; right: 22px; display: inline-flex; color: var(--yellow-deep); transition: color .35s; }
.cert-card:hover .cert-corner { color: var(--blue); }
.cert-foot { margin-top: auto; padding-top: 20px; display: flex; align-items: center; gap: 9px; }
.cert-date { font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 100px; background: var(--mist); color: var(--ink-soft); }
.cert-code { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--blue); }

.cert-card.feat { background: var(--navy); border-color: transparent; color: #fff; }
.cert-card.feat .cert-ic { background: rgba(255,255,255,.14); color: #fff; }
.cert-card.feat:hover .cert-ic { background: var(--yellow); color: var(--ink); }
.cert-card.feat .cert-org { color: rgba(255,255,255,.72); }
.cert-card.feat .cert-corner { color: var(--yellow); }
.cert-card.feat:hover { border-color: transparent; }
.cert-card.feat .cert-date { background: rgba(255,255,255,.14); color: #fff; }
.cert-card.feat .cert-code { color: var(--yellow); }

@media (max-width: 980px) { .certs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .certs-grid { grid-template-columns: 1fr; } }

/* ============================================================
   INTERACTIVE PLAYGROUND
   ============================================================ */
.play { background: var(--paper); position: relative; }
.play-head { text-align: center; margin-bottom: 40px; }
.play-head .lead { margin-inline: auto; }
.play-stage {
  position: relative; width: 100%; height: clamp(420px, 62vh, 620px);
  border-radius: var(--r-lg); overflow: hidden; background: var(--navy);
  box-shadow: var(--shadow-lg); cursor: none; touch-action: none;
}
.play-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.play-hud { position: absolute; left: 24px; top: 22px; z-index: 4; color: #fff; pointer-events: none; }
.play-hud .score { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.8); }
.play-hud .score b { color: var(--yellow); font-size: 28px; display: block; letter-spacing: -.03em; }
.play-hint { position: absolute; right: 24px; bottom: 22px; z-index: 4; color: rgba(255,255,255,.7); font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.play-tabs { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); z-index: 6; display: flex; gap: 6px; background: rgba(22,29,74,.55); backdrop-filter: blur(12px); padding: 5px; border-radius: 100px; border: 1px solid rgba(255,255,255,.12); }
.play-tabs button { border: none; background: transparent; color: rgba(255,255,255,.78); font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 100px; transition: .25s; touch-action: manipulation; }
.play-tabs button.active { background: var(--yellow); color: var(--ink); }
@media (max-width: 600px) { .play-tabs { top: 14px; gap: 4px; } .play-tabs button { padding: 8px 13px; font-size: 12.5px; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--yellow); position: relative; overflow: hidden; }
.contact h2 { font-size: clamp(44px, 10vw, 130px); line-height: .9; letter-spacing: -0.05em; }
.contact .lead { color: rgba(20,21,27,.7); font-weight: 500; }
.contact-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-top: 30px; }
.contact-mail { font-size: clamp(22px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; border-bottom: 3px solid var(--ink); padding-bottom: 6px; transition: color .3s; }
.contact-mail:hover { color: var(--blue-700); }
.contact-socials { display: flex; gap: 12px; }
.contact-socials a { width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; transition: transform .35s, background .3s; }
.contact-socials a:hover { transform: translateY(-5px) rotate(-8deg); background: var(--blue); color: #fff; }

/* ============================================================
   BLOG
   ============================================================ */
.page-hero { padding-top: 150px; padding-bottom: 20px; background: var(--paper); }
.page-hero h1 { font-size: clamp(44px, 9vw, 104px); letter-spacing: -0.045em; }
.blog-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.blog-filters button { border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 100px; transition: .25s; }
.blog-filters button.active, .blog-filters button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.blog-feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: var(--r-lg); overflow: hidden;
  background: var(--navy); color: #fff; margin-bottom: 56px; box-shadow: var(--shadow-md);
}
.blog-feature .bf-media { position: relative; min-height: 360px; }
.blog-feature .bf-media .ph { position: absolute; inset: 0; }
.blog-feature .bf-body { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; }
.blog-feature .bf-body .tagline { color: var(--yellow); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.blog-feature h2 { font-size: clamp(28px, 3.6vw, 46px); margin: 16px 0; letter-spacing: -0.035em; }
.blog-feature p { color: rgba(255,255,255,.75); font-size: 16px; margin-bottom: 24px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: var(--paper); transition: transform .4s cubic-bezier(.16,1,.3,1); }
.post-card:hover { transform: translateY(-8px); }
.post-card .pc-media { position: relative; aspect-ratio: 16/10; border-radius: var(--r-md); overflow: hidden; }
.post-card .pc-media .ph, .post-card .pc-media .cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.post-card .pc-cat { position: absolute; left: 14px; top: 14px; z-index: 2; font-size: 11.5px; font-weight: 700; background: var(--paper); color: var(--ink); padding: 6px 12px; border-radius: 100px; box-shadow: var(--shadow-sm); }
.post-card .pc-body { padding: 22px 6px 6px; }
.post-card .pc-meta { font-size: 13px; color: var(--ink-soft); display: flex; gap: 10px; align-items: center; }
.post-card .pc-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-soft); }
.post-card h3 { font-size: 22px; margin: 12px 0 10px; letter-spacing: -0.03em; line-height: 1.1; transition: color .25s; }
.post-card:hover h3 { color: var(--blue); }
.post-card p { font-size: 14.5px; color: var(--ink-soft); }
.post-card .pc-read { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--blue); display: inline-flex; gap: 6px; align-items: center; }
.post-card:hover .pc-read .ico { transform: translateX(4px); }
.post-card .pc-read .ico { transition: transform .3s; width: 15px; height: 15px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } .blog-feature { grid-template-columns: 1fr; } .blog-feature .bf-media { min-height: 240px; } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- blog detail ---------- */
.article { padding-top: 120px; }
.article-head { max-width: 800px; margin: 0 auto; text-align: center; }
.article-head .cat { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); background: var(--mist); padding: 8px 16px; border-radius: 100px; }
.article-head h1 { font-size: clamp(34px, 6vw, 68px); margin: 22px 0 24px; letter-spacing: -0.04em; text-wrap: balance; }
.article-meta { display: inline-flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 14.5px; }
.article-meta .au { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.article-meta .au img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 52% 4%; }
.article-cover { position: relative; aspect-ratio: 16/8; border-radius: var(--r-lg); overflow: hidden; margin: 48px auto 0; max-width: 1000px; box-shadow: var(--shadow-md); }
.article-cover .ph, .article-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 720px; margin: 56px auto 0; }
.article-body p { font-size: 18.5px; line-height: 1.7; color: #2c2e38; margin-bottom: 26px; text-wrap: pretty; }
.article-body h2 { font-size: clamp(26px, 3.5vw, 38px); margin: 44px 0 18px; letter-spacing: -0.035em; }
.article-body h3 { font-size: 22px; margin: 32px 0 12px; }
.article-body ul { margin: 0 0 26px 22px; }
.article-body li { font-size: 18px; line-height: 1.7; margin-bottom: 10px; color: #2c2e38; }
.article-body blockquote {
  border-left: 4px solid var(--yellow-deep); padding: 6px 0 6px 26px; margin: 32px 0;
  font-size: 23px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; color: var(--ink);
}
.article-body .figure { margin: 36px 0; }
.article-body .figure .ph { aspect-ratio: 16/9; border-radius: var(--r-md); }
.article-body .figure figcaption { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 10px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.article-body code.inline { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; background: var(--mist); padding: 2px 7px; border-radius: 6px; color: var(--blue-700); }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; max-width: 720px; margin: 40px auto 0; padding-top: 30px; border-top: 1px solid var(--line); }
.article-tags span { font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 100px; background: var(--mist); color: var(--ink-soft); }

.share-rail { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 10px; }
.share-rail a { width: 46px; height: 46px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; color: var(--ink); transition: .3s; }
.share-rail a:hover { background: var(--blue); color: #fff; transform: translateY(-3px); }

.more-posts { background: var(--mist); }
.read-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--yellow); z-index: 950; width: 0; }

/* back-to-top / scroll cue */
.scroll-cue { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.scroll-cue .mouse { width: 24px; height: 38px; border: 2px solid var(--ink-soft); border-radius: 14px; position: relative; }
.scroll-cue .mouse::after { content: ""; position: absolute; top: 7px; left: 50%; width: 4px; height: 7px; background: var(--ink-soft); border-radius: 3px; transform: translateX(-50%); animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; top: 7px; } 100% { opacity: 0; top: 18px; } }
