/**
* Layout based on iPortfolio by BootstrapMade (https://bootstrapmade.com/iportfolio-bootstrap-portfolio-websites-template/)
* License: https://bootstrapmade.com/license/
* Restyled as a dark personal profile.
*/

/*--------------------------------------------------------------
# Tokens
--------------------------------------------------------------*/
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --heading-font: "Raleway", "Segoe UI", sans-serif;
  --nav-font: "Poppins", "Segoe UI", sans-serif;

  --background-color: #0b0f19;
  --alt-background: #0e1322;
  --sidebar-color: #080b13;
  --surface-color: #121826;
  --surface-raised: #182033;
  --default-color: #b4bed2;
  --muted-color: #8793ab;
  --heading-color: #f4f7fd;
  --accent-color: #3b82f6;
  --accent-text: #7db3ff;
  --accent-strong: #2563eb;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --line-color: rgba(148, 163, 184, 0.16);
  --contrast-color: #ffffff;
  --gold: #e9b949;

  --nav-color: #9aa6bd;
  --nav-hover-color: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
}

:root { scroll-behavior: smooth; }

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/
body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; transition: color .25s; }
a:hover { color: #b7d3ff; }
h1, h2, h3, h4, h5, h6 { color: var(--heading-color); font-family: var(--heading-font); }
p { margin-bottom: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid #9cc5ff; outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 10000; background: var(--accent-strong);
  color: #fff; padding: 8px 14px; border-radius: 8px; transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9998; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-color), var(--accent-2)); }

/*--------------------------------------------------------------
# Sidebar header
--------------------------------------------------------------*/
.header {
  position: fixed; top: 0; left: 0; bottom: 0; width: 300px; padding: 22px 15px 20px;
  background: var(--sidebar-color); border-right: 1px solid var(--line-color);
  overflow-y: auto; z-index: 997; transition: left .3s ease;
}
.header .profile-img { margin: 0 auto 16px; width: 140px; height: 140px; padding: 4px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--accent-color), var(--accent-2), var(--accent-color)); }
.header .profile-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 20%;
  border: 4px solid var(--sidebar-color); display: block; }
.header .logo { line-height: 1.2; margin-bottom: 14px; text-align: center; }
.header .logo h1 { font-size: 25px; margin: 0; font-weight: 700; color: var(--heading-color); }
.header .tagline { font-family: var(--nav-font); font-size: 12.5px; color: var(--muted-color); margin-top: 6px; }
.header .social-links { margin: 0 0 18px; }
.header .social-links a {
  font-size: 16px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  margin: 0 3px; border-radius: 50%; color: var(--default-color); background: rgba(148, 163, 184, .1); transition: .25s;
}
.header .social-links a:hover { background: var(--accent-strong); color: #fff; transform: translateY(-2px); }

.header-toggle {
  position: fixed; top: 15px; right: 15px; z-index: 1030; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: var(--accent-strong); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
@media (min-width: 1200px) { .header ~ main, .header ~ .footer { margin-left: 300px; } }
@media (max-width: 1199px) { .header { left: -100%; } .header.header-show { left: 0; } }

.navmenu ul { margin: 0; padding: 0; list-style: none; }
.navmenu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 15px; margin-bottom: 4px; border-radius: var(--radius-sm);
  font-family: var(--nav-font); font-size: 15px; color: var(--nav-color); transition: .25s;
}
.navmenu a .navicon { font-size: 18px; }
.navmenu a:hover, .navmenu a.active { color: var(--nav-hover-color); background: rgba(59, 130, 246, .12); }
.navmenu a.active .navicon, .navmenu a:hover .navicon { color: var(--accent-color); }
.navmenu a.active { box-shadow: inset 3px 0 0 var(--accent-color); }

/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
main > section { padding: 88px 0; position: relative; overflow: clip; }
main > section.alt { background: var(--alt-background); }
.section-title { margin-bottom: 44px; max-width: 640px; }
.section-title h2 { font-size: 34px; font-weight: 700; margin-bottom: 14px; padding-bottom: 14px; position: relative; }
.section-title h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-2)); }
.section-title p { color: var(--default-color); font-size: 17px; }

/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/
main > section.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 0; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 28%; z-index: -3; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(8,11,19,.95) 0%, rgba(8,11,19,.86) 34%, rgba(8,11,19,.38) 62%, rgba(8,11,19,.08) 100%),
    linear-gradient(0deg, var(--background-color) 0%, rgba(11,15,25,0) 22%);
}
.hero-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: .5; pointer-events: none; }
.hero-glow.g1 { width: 420px; height: 420px; left: -80px; top: 12%; background: rgba(59,130,246,.45); animation: drift 14s ease-in-out infinite alternate; }
.hero-glow.g2 { width: 340px; height: 340px; left: 24%; bottom: -60px; background: rgba(139,92,246,.35); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(60px,-40px); } }

.hero-copy { padding-left: clamp(24px, 6vw, 90px); padding-right: 24px; max-width: 760px; margin-left: 0; margin-right: auto; }
.hero h2 { font-size: clamp(42px, 6.4vw, 78px); font-weight: 800; line-height: 1.04; margin: 0 0 18px; letter-spacing: -0.015em;
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.typed-line { font-size: clamp(19px, 2.4vw, 28px); color: #e6edfb; min-height: 1.5em; font-family: var(--heading-font); font-weight: 600;
  animation: rise .9s .15s cubic-bezier(.2,.7,.2,1) both; }
.typed-line .typed { color: #8fbaff; }
.typed-cursor { color: #8fbaff; }
.hero-place { margin-top: 14px; color: #c9d3e8; animation: rise .9s .3s cubic-bezier(.2,.7,.2,1) both; }
.hero-place i { color: var(--accent-text); margin-right: 4px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; animation: rise .9s .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.btn-solid, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; border-radius: 50px; border: 1px solid transparent;
  font-family: var(--nav-font); font-weight: 500; font-size: 15px; cursor: pointer; transition: .25s;
}
.btn-solid { background: var(--accent-strong); color: #fff; }
.btn-solid:hover { background: #1d4fd0; color: #fff; transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.04); color: #e8eefc; border-color: rgba(255,255,255,.28); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #cdd8ee; font-size: 22px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/
.about-photo { position: relative; max-width: 360px; }
.about-photo::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; border-radius: 22px; border: 2px solid var(--accent-color); opacity: .5; }
.about-photo img { position: relative; width: 100%; height: auto; border-radius: 22px; display: block; box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.about-lead { font-size: 26px; font-weight: 700; margin-bottom: 18px; }
.about-text p { margin-bottom: 14px; max-width: 70ch; }
.glance { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; }
.glance li { display: grid; grid-template-columns: 22px auto; column-gap: 10px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line-color); }
.glance i { color: var(--accent-color); grid-row: span 2; }
.glance .k { font-size: 13px; color: var(--muted-color); }
.glance .v { color: var(--heading-color); font-weight: 500; }

.offclock { position: relative; margin-top: 76px; border-radius: 22px; background: linear-gradient(160deg, #111a2e 0%, #0f1526 60%); border: 1px solid var(--line-color); overflow: hidden; }
.offclock-inner { position: relative; z-index: 2; padding: 38px 38px 120px; }
.offclock h3 { font-size: 26px; margin-bottom: 24px; }
.off-item { display: flex; gap: 14px; }
.off-item > i { flex: 0 0 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px;
  color: var(--accent-text); background: var(--accent-soft); }
.off-item h4 { font-size: 18px; margin-bottom: 4px; }
.off-item p { font-size: 15px; }
.curious { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.curious li { font-size: 13.5px; padding: 5px 13px; border-radius: 50px; border: 1px dashed rgba(125,179,255,.45); color: #cfe0fb; }
.ridge { position: absolute; left: -5%; right: -5%; bottom: 0; height: 130px; z-index: 1; pointer-events: none; }
.ridge svg { width: 100%; height: 100%; display: block; }
.ridge path { transition: transform .1s linear; }
.ridge .r3 { fill: rgba(59,130,246,.10); }
.ridge .r2 { fill: rgba(99,102,241,.16); }
.ridge .r1 { fill: rgba(139,92,246,.22); }

/*--------------------------------------------------------------
# Stats
--------------------------------------------------------------*/
main > section.stats { padding: 56px 0; }
.stat { text-align: center; padding: 8px 6px; }
.stat i { font-size: 26px; color: var(--accent-color); }
.stat .num { font-family: var(--heading-font); font-size: 44px; font-weight: 800; color: var(--heading-color); line-height: 1.15; margin-top: 4px; }
.stat .lbl { font-size: 14.5px; color: var(--default-color); max-width: 20ch; margin: 4px auto 0; }

/*--------------------------------------------------------------
# Shared cards
--------------------------------------------------------------*/
.card-item {
  position: relative; height: 100%; padding: 24px; border-radius: var(--radius); background: var(--surface-color); border: 1px solid var(--line-color);
  transition: border-color .25s, transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.card-item:hover, .card-item:focus-within { border-color: rgba(59,130,246,.55); transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0,0,0,.35); }
.card-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.card-head { min-width: 0; }
.card-item h3 { font-size: 19px; font-weight: 700; margin: 0 0 3px; line-height: 1.3; }
.card-item .org { color: var(--default-color); font-size: 15px; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-size: 13.5px; color: var(--muted-color); }
.meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--muted-color); margin-right: 14px; vertical-align: middle; opacity: .7; }
.summary { font-size: 15px; margin-bottom: 14px; }
.org-logo { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #fff; display: flex; align-items: center; justify-content: center; }
.org-logo.mono { background: var(--accent-soft); color: var(--accent-text); font-family: var(--heading-font); font-weight: 800; font-size: 17px; border: 1px solid rgba(59,130,246,.35); }
.org-logo.icon { background: var(--accent-soft); color: var(--accent-text); font-size: 25px; border: 1px solid rgba(59,130,246,.35); }
.project-card > .org-logo, .award-card > .org-logo { margin-bottom: 16px; }

.chips { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.chips li { font-size: 12.5px; padding: 4px 11px; border-radius: 50px; background: rgba(148,163,184,.1); color: #c6d0e4; }
.chips.big li { font-size: 14px; padding: 6px 14px; background: var(--accent-soft); color: #cfe0fb; }

.view-btn { margin-top: auto; align-self: flex-start; background: none; border: 0; padding: 0; color: var(--accent-text); font-family: var(--nav-font); font-size: 14.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.view-btn::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.view-btn i { transition: transform .25s; }
.card-item:hover .view-btn i { transform: translateX(4px); }
.view-btn:focus-visible { outline-offset: 6px; }

.badge-now { display: inline-block; vertical-align: middle; margin-left: 6px; font-family: var(--nav-font); font-size: 11.5px; font-weight: 500; padding: 2px 10px; border-radius: 50px; background: rgba(34,197,94,.14); color: #6ee79a; }

/*--------------------------------------------------------------
# Timeline
--------------------------------------------------------------*/
.timeline { position: relative; padding-left: 38px; max-width: 900px; }
.tl-track { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line-color); border-radius: 2px; }
.tl-fill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: top; transform: scaleY(var(--tl, 0));
  background: linear-gradient(180deg, var(--accent-color), var(--accent-2)); border-radius: 2px; }
.tl-item { position: relative; margin-bottom: 26px; }
.tl-dot { position: absolute; left: -38px; top: 26px; width: 16px; height: 16px; border-radius: 50%; background: var(--background-color); border: 3px solid var(--line-color); transition: .3s; }
.tl-item.reached .tl-dot { border-color: var(--accent-color); background: var(--accent-color); box-shadow: 0 0 0 6px var(--accent-soft); }

/*--------------------------------------------------------------
# Filters / certs / awards
--------------------------------------------------------------*/
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-chip { border: 1px solid var(--line-color); background: transparent; color: var(--default-color); padding: 7px 16px; border-radius: 50px; font-family: var(--nav-font); font-size: 14px; cursor: pointer; transition: .25s; }
.filter-chip:hover { border-color: var(--accent-color); color: #fff; }
.filter-chip.active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.cert-col.is-hidden { display: none; }
.cert-card .meta { margin: 0 0 14px; }
.award-card .level { font-family: var(--nav-font); font-size: 13px; color: var(--accent-text); margin-bottom: 4px; }
.award-card.winner { border-color: rgba(233,185,73,.55); background: linear-gradient(160deg, #1b1a1b 0%, var(--surface-color) 55%); }
.award-card.winner .level { color: var(--gold); }
.award-card.winner .org-logo.icon { background: rgba(233,185,73,.14); color: var(--gold); border-color: rgba(233,185,73,.45); }
.award-card.winner:hover { border-color: var(--gold); }

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact-card { display: flex; gap: 16px; align-items: center; padding: 18px 20px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface-color); border: 1px solid var(--line-color); }
.contact-card > i { flex: 0 0 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--accent-text); background: var(--accent-soft); }
.contact-card h3 { font-size: 16px; margin: 0 0 2px; }
.contact-card p { font-size: 15px; word-break: break-word; }
.contact-form { padding: 28px; border-radius: var(--radius); background: var(--surface-color); border: 1px solid var(--line-color); }
.contact-form label { display: block; font-size: 14px; color: var(--default-color); margin-bottom: 6px; }
.form-control { background: #0c1220; border: 1px solid rgba(148,163,184,.28); color: #fff; border-radius: var(--radius-sm); padding: 11px 14px; }
.form-control:focus { background: #0c1220; color: #fff; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(59,130,246,.25); }
.form-control:user-invalid { border-color: #f87171; }

.modal-content { background: var(--surface-raised); color: var(--default-color); border: 1px solid var(--line-color); border-radius: 18px; }
.modal-header, .modal-footer { border-color: var(--line-color); }
.modal-title { font-size: 20px; display: flex; gap: 10px; align-items: center; }
.modal-title i { color: #f59e0b; }
.modal-body p { font-size: 16px; }
.modal-email { margin-top: 10px; font-size: 17px; font-weight: 500; }
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: .75; }

/*--------------------------------------------------------------
# Detail panel
--------------------------------------------------------------*/
.detail-panel { --bs-offcanvas-width: min(780px, 100vw); background: #0d1220; color: var(--default-color); border-left: 1px solid var(--line-color); }
.detail-head { display: flex; gap: 18px; align-items: flex-start; padding: 26px 28px 22px; border-bottom: 1px solid var(--line-color); background: linear-gradient(180deg, #121a2e, #0d1220); }
.detail-tile .org-logo { width: 72px; height: 72px; flex-basis: 72px; font-size: 22px; }
.detail-titles { flex: 1; min-width: 0; }
.detail-kind { font-family: var(--nav-font); font-size: 13px; color: var(--accent-text); margin-bottom: 4px; }
.detail-titles h3 { font-size: 26px; line-height: 1.25; margin: 0 0 4px; }
.detail-org { font-size: 16px; color: #d2daea; }
.detail-panel .offcanvas-body { padding: 28px; }
.d-sec { margin-bottom: 30px; }
.d-sec h4 { font-size: 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.d-sec h4::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, var(--accent-color), var(--accent-2)); }
.d-sec p { margin-bottom: 12px; max-width: 68ch; }
.d-sec ul.d-list { padding-left: 0; list-style: none; margin: 0; }
.d-sec ul.d-list li { position: relative; padding-left: 22px; margin-bottom: 10px; max-width: 68ch; }
.d-sec ul.d-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-color); }
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.impact { padding: 16px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid rgba(59,130,246,.3); }
.impact .v { font-family: var(--heading-font); font-size: 30px; font-weight: 800; color: #fff; line-height: 1.1; }
.impact .l { font-size: 13.5px; margin-top: 6px; color: #cbd6ea; }
.course-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line-color); border-radius: var(--radius-sm); overflow: hidden; }
.course-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line-color); }
.course-list li:last-child { border-bottom: 0; }
.course-list .n { color: var(--heading-color); font-weight: 500; }
.course-list .d { color: var(--muted-color); font-size: 13.5px; text-align: right; }
.course-list .id { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted-color); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fact-list { display: grid; gap: 10px; }
.fact { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-color); background: var(--surface-color); }
.fact .k { color: var(--heading-color); font-weight: 500; }
.fact .v { color: var(--muted-color); font-size: 14px; }

/*--------------------------------------------------------------
# Footer, scroll top, preloader
--------------------------------------------------------------*/
.footer { padding: 34px 0; text-align: center; background: var(--sidebar-color); border-top: 1px solid var(--line-color); font-size: 14px; }
.footer .credits { margin-top: 6px; font-size: 13px; color: var(--muted-color); }
.scroll-top { position: fixed; right: 15px; bottom: -48px; z-index: 1000; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-strong); color: #fff; font-size: 24px; visibility: hidden; opacity: 0; transition: .3s; }
.scroll-top.active { visibility: visible; opacity: 1; bottom: 15px; }
.scroll-top:hover { color: #fff; background: #1d4fd0; }
#preloader { position: fixed; inset: 0; z-index: 99999; background: var(--background-color); display: flex; align-items: center; justify-content: center; }
#preloader::before { content: ""; width: 44px; height: 44px; border: 4px solid var(--accent-color); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991px) {
  main > section { padding: 68px 0; }
  .offclock-inner { padding: 28px 22px 110px; }
}
@media (max-width: 767px) {
  .hero::before { background:
    linear-gradient(0deg, rgba(8,11,19,.97) 0%, rgba(8,11,19,.88) 42%, rgba(8,11,19,.25) 78%, rgba(8,11,19,.1) 100%); }
  main > section.hero { align-items: flex-end; padding-bottom: 90px; }
  .hero-bg { object-position: 80% 20%; height: 100%; }
  .hero-copy { padding-left: 24px; }
  .section-title h2 { font-size: 28px; }
  .timeline { padding-left: 30px; }
  .tl-dot { left: -30px; }
  .tl-track { left: 5px; }
  .detail-head, .detail-panel .offcanvas-body { padding-left: 20px; padding-right: 20px; }
  .detail-titles h3 { font-size: 22px; }
}

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