/* Profile page (app/Views/pages/profile.php) */
:root {
    --navy: #0b1f4d;
    --navy-2: #12307a;
    --blue: #2563eb;
    --sky: #e8f1ff;
    --orange: #ff5a1f;
    --amber: #ffb020;
    --ink: #1c2434;
    --muted: #5b6577;
    --line: #e6eaf2;
    --radius: 1.25rem;
    --shadow: 0 10px 30px rgba(11, 31, 77, .08);
    --shadow-lg: 0 24px 60px rgba(11, 31, 77, .18);
  }
  html { scroll-behavior: smooth; scroll-padding-top: 80px; }
  
  h1, h2, h3, h4, .font-display { font-family: "Poppins", sans-serif; }
  a { color: var(--blue); }

  /* ---------- Hero ---------- */
  .hero {
    position: relative; color: #fff; padding: 4.5rem 0 7rem;
    background:
      radial-gradient(circle at 85% 20%, rgba(37, 99, 235, .55), transparent 45%),
      radial-gradient(circle at 10% 90%, rgba(255, 90, 31, .25), transparent 40%),
      linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    overflow: hidden;
  }
  .hero::before { /* subtle circuit-dot grid */
    content: ""; position: absolute; inset: 0; opacity: .12;
    background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, #000 40%, transparent);
  }
  .hero .eyebrow { display: inline-flex; gap: .5rem; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 500; }
  .hero h1 { font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -.02em; }
  .hero h1 .grad { background: linear-gradient(90deg, #ffd27a, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .hero .lead { color: rgba(255,255,255,.82); max-width: 36rem; }
  .btn-light-ghost { color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: .65rem 1.4rem; font-weight: 600; }
  .btn-light-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
  .btn-hero { background: #fff; color: var(--navy); border-radius: 999px; padding: .65rem 1.4rem; font-weight: 600; }
  .btn-hero:hover { background: var(--sky); color: var(--navy); }

  .portrait-wrap { position: relative; max-width: 480px; margin-inline: auto; }
  .portrait { border-radius: 2rem; box-shadow: var(--shadow-lg); border: 6px solid rgba(255,255,255,.15); transform: rotate(2deg); }
  .float-badge {
    position: absolute; display: flex; align-items: center; gap: .65rem; background: #fff; color: var(--ink);
    padding: .6rem .9rem; border-radius: 1rem; box-shadow: var(--shadow-lg); font-size: .85rem; font-weight: 600; line-height: 1.2;
    animation: bob 5s ease-in-out infinite;
  }
  .float-badge i { font-size: 1.5rem; }
  .float-badge small { display: block; font-weight: 500; color: var(--muted); }
  .float-badge.b1 { left: -1rem; bottom: 12%; }
  .float-badge.b2 { right: -1rem; top: 8%; animation-delay: -2.5s; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
  @media (max-width: 575.98px) { .float-badge.b1 { left: .25rem; } .float-badge.b2 { right: .25rem; } .float-badge { font-size: .75rem; } }

  .hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 70px; }

  /* ---------- Stats ---------- */
  .stats { margin-top: -3.5rem; position: relative; z-index: 2; }
  .stats .card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
  .stat .num { font-family: "Poppins", sans-serif; font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--navy); }
  .stat .label { color: var(--muted); font-size: .875rem; }
  .stat + .stat { border-left: 1px solid var(--line); }
  @media (max-width: 767.98px) {
    .stat + .stat { border-left: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--line); }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  }

  /* ---------- Section shared ---------- */
  section.block { padding: 5.5rem 0; }
  .section-sub { color: var(--muted); max-width: 40rem; }
  .bg-soft { background: linear-gradient(180deg, #f6f9ff, #fff); }

  /* ---------- Story timeline ---------- */
  .story { position: relative; }
  .story::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--blue), var(--orange)); opacity: .25; transform: translateX(-50%); }
  .story-item { position: relative; }
  .story-item::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); transform: translate(-50%, -50%); box-shadow: 0 0 0 6px var(--sky); }
  .story-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); line-height: 1.7; }
  .story-card .step { font-family: "Poppins"; font-weight: 700; color: var(--blue); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
  .story-card h3 { font-size: 1.3rem; font-weight: 700; color: var(--navy); }
  .story-img { border-radius: var(--radius); box-shadow: var(--shadow); max-height: 280px; object-fit: cover; }
  @media (max-width: 767.98px) {
    .story::before { left: 14px; }
    .story-item::after { left: 14px; top: 2rem; }
    .story-item > .row { padding-left: 2.25rem; }
  }

  .quote-band { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 2rem; overflow: hidden; }
  .quote-band p { color: rgba(255,255,255,.88); line-height: 1.8; }

  /* ---------- Programs ---------- */
  .program { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; height: 100%; }
  .program:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
  .program .icon { width: 56px; height: 56px; border-radius: 1rem; display: grid; place-items: center; font-size: 1.6rem; color: #fff; }
  .program h3 { font-size: 1.2rem; font-weight: 700; color: var(--navy); }
  .program a.stretched-link { text-decoration: none; }

  /* ---------- Media grids ---------- */
  .masonry { columns: 1; column-gap: 1.25rem; }
  @media (min-width: 576px) { .masonry { columns: 2; } }
  @media (min-width: 992px) { .masonry { columns: 3; } }
  .masonry .tile { break-inside: avoid; margin-bottom: 1.25rem; }
  .tile { position: relative; display: block; border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; background: var(--sky); }
  .tile img { width: 100%; display: block; transition: transform .5s; }
  .tile:hover img { transform: scale(1.05); }
  .tile::after { content: "\F62C"; font-family: "bootstrap-icons"; position: absolute; right: .75rem; top: .75rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.9); color: var(--navy); opacity: 0; transition: opacity .25s; }
  .tile:hover::after { opacity: 1; }
  .tile.video { cursor: pointer; }
  .tile.video::after { content: "\F4F4"; opacity: 1; width: 4rem; height: 4rem; font-size: 1.8rem; left: 50%; top: 50%; right: auto; transform: translate(-50%,-50%); background: var(--orange); color: #fff; box-shadow: 0 0 0 10px rgba(255,90,31,.3); }
  .tile .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .9rem; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

  .award-callout { background: linear-gradient(135deg, #fff7e8, #ffe9de); border-radius: var(--radius); border: 1px solid #ffd9c4; }
  .award-callout i { color: var(--orange); }

  /* ---------- Engineer ---------- */
  .info-card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); height: 100%; }
  .info-card .icon { width: 46px; height: 46px; border-radius: .9rem; display: grid; place-items: center; background: var(--sky); color: var(--blue); font-size: 1.3rem; }
  .skill-chip { display: inline-block; background: var(--sky); color: var(--navy); font-weight: 500; font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; margin: 0 .35rem .5rem 0; }

  .roles { position: relative; padding-left: 2rem; }
  .roles::before { content: ""; position: absolute; left: 7px; top: .5rem; bottom: .5rem; width: 2px; background: var(--line); }
  .role { position: relative; margin-bottom: 1rem; }
  .role::before { content: ""; position: absolute; left: calc(-2rem + 1px); top: 1.35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px #ffe3d6; }
  .role .accordion-button { font-family: "Poppins"; font-weight: 600; color: var(--navy); border-radius: 1rem !important; }
  .role .accordion-button:not(.collapsed) { background: var(--sky); box-shadow: none; }
  .role .accordion-item { border: 1px solid var(--line); border-radius: 1rem !important; overflow: hidden; }
  .role ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
  .role li { margin-bottom: .3rem; }

  .project { border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; height: 100%; background: #fff; transition: border-color .2s, transform .2s; }
  .project:hover { border-color: var(--blue); transform: translateY(-3px); }
  .project .no { font-family: "Poppins"; font-weight: 800; font-size: 1.6rem; color: var(--sky); -webkit-text-stroke: 1px var(--blue); line-height: 1; }
  .project h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin: .5rem 0; }
  .project p { color: var(--muted); font-size: .9rem; margin: 0; }

  /* ---------- Links / CTA ---------- */
  .link-card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); height: 100%; }
  .link-card .list-group-item { border: 0; border-bottom: 1px solid var(--line); padding: .75rem 0; color: var(--ink); font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
  .link-card .list-group-item:last-child { border-bottom: 0; }
  .link-card .list-group-item i { color: var(--muted); transition: transform .2s; }
  .link-card .list-group-item:hover { color: var(--blue); background: transparent; }
  .link-card .list-group-item:hover i { transform: translateX(4px); color: var(--blue); }
  .news-img { border-radius: 1rem; box-shadow: var(--shadow); }

  .cta { background: linear-gradient(135deg, var(--orange), #ff8a3d 60%, var(--amber)); color: #fff; border-radius: 2rem; }

  /* ---------- Footer ---------- */
  footer { background: var(--navy); color: rgba(255,255,255,.75); }
  footer a { color: rgba(255,255,255,.85); text-decoration: none; }
  footer a:hover { color: #fff; }
  footer .social a { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255,255,255,.08); }

  /* ---------- Reveal on scroll ---------- */
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .float-badge { animation: none; }
  }
