/* Single, cleaned stylesheet for the site */
/* Variables */
:root{
  --int-blue: #1781e3;
  --int-blue-active: #086adb;
  --int-green: #1b8712;
  --white: #ffffff;
  --muted: #6b7280;
  --text: #0f1724;
  --bg: #f8fafb;
  --card: #ffffff;
  --card-bg: var(--card);
  --divider: #e6eef7;
  --shadow: 0 6px 20px rgba(16,24,40,0.06);
  --radius: 12px;
  --font-main: 'Roboto', Arial, sans-serif;
  --azure: var(--int-blue);
  --horizon: #ffffff;
}

/* Small utility for screen-reader-only text */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Inline svg icon styling */
.icon-inline{ display:inline-block; vertical-align:middle; margin-right:.45rem; fill:currentColor; color:var(--int-blue); }
.icon-inline[width]{ width:1em; height:1em; }

/* Font fallbacks and smoothing */
body{ font-family: var(--font-main); font-weight:400; }
h1, .main-title{ font-weight:700; letter-spacing:-0.01em; }
h2{ font-weight:600; }
p, li{ font-weight:400; }

[data-theme="dark"]{
  --bg: #0b1220;
  --card: #0f1724;
  --text: #e6eef7;
  --muted: #9ca3af;
  --divider: #16202a;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}

/* Reset */
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font-main);
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
}

a{ color:var(--int-blue); }
a:focus, a:hover{ text-decoration:underline; }
img{ max-width:100%; display:block; height:auto; }

.container{ max-width:1100px; margin:0 auto; padding:0 1.25rem; }
.divider{ border:0; border-top:1px solid var(--divider); margin:2.25rem 0; }

/* Utilities */
.card{ background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow); padding:1.25rem; }
.badge{ display:inline-block; padding:.2rem .6rem; border-radius:6px; font-weight:600; font-size:.9rem; }
/* Improve badge contrast */
.badge-blue{ background:#0b63b8; color: #fff; }
.badge-green{ background:#0f8a3e; color: #fff; }
.badge-yellow{ background:#f59e0b; color:#10202a; }

/* Header */
.main-header{ position:sticky; top:0; z-index:60; background:var(--card); box-shadow:0 2px 8px rgba(0,0,0,0.04); }
.header-content{ display:flex; align-items:center; gap:1rem; padding:.8rem 1.25rem; max-width:1100px; margin:0 auto; }
.logo{ display:flex; align-items:center; gap:.6rem; }
.logo-img{ width:48px; height:48px; border-radius:50%; object-fit:cover; border:2px solid var(--int-blue); }
.logo-title{ font-weight:700; color:var(--int-blue); font-size:1.1rem; }

/* Header shrink modifier */
.main-header.shrink{ padding:0.25rem 0; box-shadow:0 6px 18px rgba(0,0,0,0.06); }
.main-header.shrink .logo-img{ width:40px; height:40px; }
.main-header.shrink .logo-title{ font-size:1rem; }

.nav-list{ margin-left:auto; display:flex; gap:.6rem; list-style:none; padding:0; align-items:center; }
.nav-list a{ padding:.45rem .75rem; border-radius:8px; color:var(--muted); font-weight:600; transition: all 180ms ease; }
.nav-list a[aria-current="page"], .nav-list a:hover, .nav-list a:focus{ background: rgba(8,106,219,0.08); color:var(--int-blue); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(8,106,219,0.06); }
.nav-toggle{ display:none; background:none; border:0; font-size:1.3rem; color:var(--int-blue); }
#theme-toggle{ background:none; border:0; font-size:1.2rem; margin-left:.5rem; color:var(--int-blue); }

/* Hero */
.hero-section{ padding:3rem 0; color:var(--white); background: linear-gradient(135deg,#07102a 0%,#0f2b57 50%,#2e7dd7 100%); position:relative; }
.hero-grid{ display:flex; gap:2rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.hero-info{ max-width:520px; }
.main-title{ margin:0; font-size:2.4rem; color:var(--white); }
.hero-role{ margin:.5rem 0; font-weight:600; color:rgba(255,255,255,0.92); }
.hero-desc{ margin:.8rem 0 1.25rem 0; color:rgba(255,255,255,0.9); }
.cta-button{ background:var(--int-blue); color:#fff; padding:.7rem 1.25rem; border-radius:8px; border:0; font-weight:700; box-shadow: 0 8px 24px rgba(8,106,219,0.12); transition: transform 180ms ease, box-shadow 180ms ease; }
.cta-button{ padding:.8rem 1.4rem; font-size:1rem; }
.cta-button:hover, .cta-button:focus{ transform: translateY(-4px); box-shadow: 0 18px 48px rgba(8,106,219,0.18); }

/* Larger tap targets for mobile */
.nav-list a, .cta-button, .cta-link{ min-height:44px; display:inline-flex; align-items:center; }

.cta-link{ display:inline-flex; align-items:center; gap:.5rem; color:#fff; padding:.55rem .9rem; border-radius:8px; border:1px solid rgba(255,255,255,0.12); transition: transform 120ms ease; }
.cta-link:hover, .cta-link:focus{ transform: translateY(-2px); }

.hero-illustration img{ width:260px; max-width:45vw; }

/* About / Work / Teasers */
.about-grid{ display:flex; gap:1.5rem; align-items:flex-start; flex-wrap:wrap; }
.about-card{ text-align:center; padding:1rem; }
.profile-img{ width:110px; height:110px; border-radius:50%; object-fit:cover; border:3px solid var(--int-blue); margin:0 auto .5rem; }
.about-details{ flex:1; min-width:260px; }

.teaser-grid{ display:flex; gap:1rem; flex-wrap:wrap; }
.teaser{ display:flex; gap:1rem; align-items:flex-start; min-width:260px; }
.teaser img{ width:80px; height:80px; border-radius:8px; object-fit:cover; }

/* Image and media sizing improvements */
img.responsive-img, .hero-illustration img { max-width: 100%; height: auto; display: block; }
.hero-illustration { display:flex; align-items:center; justify-content:center; }
.hero-illustration img { max-width: 320px; width:100%; height:auto; }
@media (min-width:1200px){ .hero-illustration img { max-width: 380px; } }

/* Normalize media in cards and teasers */
.card img, .teaser img, .org-icon, .interest-card img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; }
.profile-img { width:110px; height:110px; }
@media (min-width:900px){ .profile-img { width:120px; height:120px; } }

/* icon sizing */
.icon-32 { width:40px; height:40px; }

/* Certifications: horizontal scroll on small, grid on larger screens */
.certifications-cards { display:flex; gap:1rem; overflow-x:auto; padding:.5rem 0; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; }
.certifications-cards::-webkit-scrollbar{ height:8px; }
.certifications-cards::-webkit-scrollbar-thumb{ background:rgba(15,23,36,0.12); }
@media (max-width:420px){ .hero-illustration img{ max-width:240px; } }
.certifications-cards > .cert-card { scroll-snap-align:start; }
@media (min-width:900px){
  .certifications-cards { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:1rem; overflow:visible; scroll-snap-type:none; }
  .certifications-cards > .cert-card { scroll-snap-align: unset; }
}

/* Make cards visually consistent */
.cert-card, .teaser, .about-card, .org-card, .language-card, .interest-card { min-height: 150px; }
.certifications-cards .cert-card { display:flex; flex-direction:column; justify-content:space-between; min-height:180px; }

/* Avoid horizontal overflow */
html, body { overflow-x: hidden; }
.container { overflow: visible; }

/* Tighter spacing for large screens */
@media(min-width:1100px){
  .hero-grid{ gap:3rem; }
  .about-grid{ gap:2rem; }
  .cert-card { min-height:200px; }
  .logo-img { width:56px; height:56px; }
}

/* Accordion */
.accordion{ width:100%; }
.accordion-item{ border-bottom:1px solid var(--divider); }
.accordion-header{ width:100%; text-align:left; padding:1rem; background:none; border:0; display:flex; align-items:center; gap:.6rem; font-weight:600; cursor:pointer; }
.accordion-header[aria-expanded="true"]{ background: rgba(8,106,219,0.06); }
.accordion-body{ padding: .75rem 1.25rem 1.25rem 2rem; display:none; }
.accordion-body.show{ display:block; }

/* Certifications */
.certifications-cards{ display:flex; gap:1rem; overflow-x:auto; padding:.5rem 0; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; }
.certifications-cards > .cert-card{ scroll-snap-align:start; }
.cert-card{ min-width:260px; max-width:320px; text-align:left; display:flex; flex-direction:column; gap:.5rem; align-items:flex-start; padding:1rem; border-radius:10px; }
.cert-card:hover, .cert-card:focus-within{ transform: translateY(-6px); box-shadow: 0 16px 40px rgba(8,106,219,0.06); }
.cert-card{ transition: transform .18s ease, box-shadow .18s ease; }
.cert-card .cert-meta{ color:var(--muted); font-size:.95rem; }
.cert-card .icon-32{ width:40px; height:40px; }
.cert-link{ color:var(--int-blue); font-weight:600; }

/* Skills */
.skills-columns{ display:flex; gap:2rem; }
.skills-list{ list-style:none; padding:0; margin:0; }
.skills-list li{ margin-bottom:.6rem; }

/* Education table */
.education-table{ width:100%; border-collapse:collapse; background:var(--card); border-radius:8px; overflow:hidden; box-shadow:var(--shadow); }
.education-table th, .education-table td{ padding:.8rem 1rem; border-bottom:1px solid var(--divider); text-align:left; }
.education-table th{ background: rgba(8,106,219,0.06); }
.education-table tr:last-child td{ border-bottom:none; }

/* Languages / Orgs / Interests */
.languages-grid, .org-grid, .interests-grid{ display:flex; gap:1rem; flex-wrap:wrap; }
.language-card, .org-card, .interest-card{ padding:1rem; min-width:160px; text-align:center; }

/* Footer */
.main-footer{ background:var(--card); padding:2rem 0; border-top:1px solid var(--divider); }
.footer-grid{ display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.footer-link{ color:var(--int-blue); }

/* Back to top */
#back-to-top{ position:fixed; right:1.5rem; bottom:1.5rem; width:44px; height:44px; border-radius:50%; background:var(--int-blue); color:#fff; border:0; display:none; align-items:center; justify-content:center; font-size:1.25rem; box-shadow:var(--shadow); cursor:pointer; }
#back-to-top.show{ display:flex; }

/* Responsive */
@media (max-width:900px){
  .nav-list{ display:none; position:absolute; right:1rem; top:64px; background:var(--card); flex-direction:column; padding:.5rem; border-radius:8px; box-shadow:var(--shadow); }
  .nav-list.open{ display:flex; }
  .nav-toggle{ display:inline-block; }
  .header-content{ padding:.6rem 1rem; }
  .hero-grid{ flex-direction:column; text-align:center; }
  .hero-illustration img{ width:200px; }
  .about-grid{ flex-direction:column; }
  .certifications-cards{ flex-direction:row; }
  .skills-columns{ flex-direction:column; }
}

@media (max-width:600px){
  .container{ padding:0 .6rem; }
  .main-title{ font-size:1.6rem; }
}

/* Small refinements for mobile layout */
@media (max-width:900px){
  .header-content{ flex-direction:column; gap:1rem; align-items:flex-start; }
  .logo{ justify-content:center; margin-bottom:.5rem; }
  .nav-list{ width:100vw; right:0; left:0; min-width:unset; border-radius:0; top:56px; }
  .hero-info{ width:100%; padding:0 .5rem; }
  .hero-illustration img{ width:180px; max-width:90vw; }
  .about-card{ max-width:100vw; min-width:0; margin:0 auto; padding:1rem .5rem; }
  .cert-card{ min-width:0; max-width:100vw; width:100%; margin:0 auto; padding:1rem .5rem; }
}

/* Theme switching removed - keep variables only; dark-mode styles disabled */

/* Mobile fullscreen nav when body has .nav-open */
@media (max-width:900px){
  body.nav-open{ overflow:hidden; }
  body.nav-open .nav-list{ position:fixed; inset:0; display:flex; flex-direction:column; padding:3.25rem 1rem; background: linear-gradient(180deg, rgba(255,255,255,0.98), var(--card-bg)); z-index:1200; gap:0.75rem; align-items:flex-start; justify-content:flex-start; opacity:0; transform: translateY(-6px) scale(0.995); transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease; }
  body.nav-open.showing .nav-list{ opacity:1; transform: translateY(0) scale(1); }
  body.nav-open .nav-list a{ width:100%; padding:1rem 0; font-size:1.05rem; }
}

/* CTA and header mobile tweaks */
.cta-button{ border-radius:10px; padding:1rem 1.25rem; font-size:1.02rem; }
.cta-link{ padding:.8rem 1.05rem; border-radius:10px; }
@media (max-width:640px){
  .main-header{ padding:.45rem .6rem; }
  .logo-img{ width:40px; height:40px; }
  .header-content{ gap:.6rem; }
  .nav-toggle{ font-size:1.9rem; }
}

/* Extra small phones */
@media (max-width:380px){
  .main-title{ font-size:1.4rem; }
  .hero-desc{ font-size:.98rem; }
  .hero-illustration img{ max-width:160px; }
}

/* Breakpoint tuning: 320 / 375 / 414 */
@media (max-width:375px){
  .cta-button, .cta-link{ display:block; width:100%; text-align:center; }
  .hero-illustration img{ max-width:150px; }
  .certifications-cards{ gap:.6rem; }
  .cert-card{ padding:.85rem; }
}
@media (max-width:414px){
  .main-title{ font-size:1.55rem; }
  .hero-desc{ font-size:1rem; }
  .logo-title{ font-size:1rem; }
}

/* Medium phones and small tablets */
@media (min-width:415px) and (max-width:767px){
  .hero-illustration img{ max-width:180px; }
  .cta-button{ padding:.95rem 1.2rem; }
  .cert-card{ min-width:220px; max-width:280px; }
}

/* Tablet */
@media (min-width:768px) and (max-width:1023px){
  .hero-grid{ gap:2rem; }
  .hero-illustration img{ max-width:260px; }
}

/* Desktop adjustments */
@media (min-width:1024px){
  .cta-button{ padding: .85rem 1.4rem; }
}

/* Small helpers */
.icon-32{ width:32px; height:32px; filter:grayscale(0.15) contrast(1.05); }

/* Loading bar fallback style */
#loading-bar{ position:fixed; top:0; left:0; height:3px; background:var(--azure); width:0; z-index:1000; pointer-events:none; transition: width 280ms ease; }

/* Accordion body show/hide */
.accordion-body{ display:none; }
.accordion-body.show{ display:block; }

/* Responsive nav menu */
.nav-toggle{ display:none; background:none; border:none; font-size:1.7rem; color:var(--int-blue); margin-left:1rem; cursor:pointer; user-select:none; }
@media (max-width:900px){
  .nav-list{ display:none; flex-direction:column; background:var(--card); position:absolute; top:60px; right:1.5rem; min-width:180px; box-shadow:var(--shadow); border-radius:var(--radius); z-index:1000; }
  .nav-list.open{ display:flex; }
  .nav-toggle{ display:inline-block; }
}

/* Hero improvements */
.hero-role{ font-size:1.12rem; font-weight:600; color:rgba(255,255,255,0.95); margin-bottom:.5em; }
.hero-desc{ font-size:1.02rem; color:rgba(255,255,255,0.92); margin-bottom:1.2em; }

/* Header alignment tweaks */
.header-content{ justify-content:flex-start; gap:2rem; padding:.7rem 1.25rem; }
.logo{ display:flex; align-items:center; gap:.7rem; }

/* Ensure focus styles are visible */
:focus{ outline:3px solid rgba(24, 125, 240, 0.18); outline-offset:3px; }

/* Typography scale and readability */
h1, .main-title{ font-size:2.2rem; line-height:1.05; margin-bottom:.25rem; }
h2{ font-size:1.4rem; margin-bottom:.6rem; }
h3{ font-size:1.05rem; margin-bottom:.4rem; }
p{ color:var(--text); font-size:1rem; }

/* Inline icons used in links */
.icon-inline{ width:20px; height:20px; display:inline-block; vertical-align:middle; margin-right:.45rem; }
.fab.icon-inline{ font-size:1.05rem; }

/* Responsive image helper */
.responsive-img{ width:100%; height:auto; max-height:260px; object-fit:cover; border-radius:8px; }

/* Preserve intrinsic aspect ratio to reduce layout shifts */
.hero-illustration { aspect-ratio: 4 / 3; }
.profile-img, .org-icon, .teaser img, .interest-card img { aspect-ratio: 1 / 1; }
.icon-32{ aspect-ratio:1/1; }

/* Skip link visible on focus */
.skip-link{ position:absolute; left:1rem; top:0.5rem; background:var(--card); color:var(--int-blue); padding:.4rem .6rem; border-radius:6px; box-shadow:var(--shadow); z-index:9999; transform:translateY(-120%); transition:transform .18s ease; }
.skip-link:focus{ transform:translateY(0); outline:3px solid rgba(24,125,240,0.16); }

/* Prefer transform-based, GPU friendly transitions */
.cta-button, .cta-link, .nav-list a, .cert-link{ transition: transform .18s cubic-bezier(.2,.9,.2,1), box-shadow .18s ease; }

/* Reveal animations for sections */
.reveal{ opacity:0; transform: translateY(10px); transition: opacity .42s ease, transform .42s ease; will-change: transform, opacity; }
.reveal.revealed{ opacity:1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){ .reveal, .reveal.revealed{ transition:none; transform:none; opacity:1; } }

/* Hero and layout tweaks for better balance */
.hero-section{ padding:2.25rem 0; }
.hero-info{ text-align:left; }
@media (max-width:900px){ .hero-info{ text-align:center; } .hero-section{ padding:1.6rem 0; } }

/* Center mobile nav and constrain width to avoid overflow */
@media (max-width:900px){
  .nav-list{ left:50%; transform:translateX(-50%); width:calc(100% - 2rem); max-width:420px; }
}

/* Slightly smaller badges on compact screens */
@media (max-width:600px){ .badge{ padding:.16rem .5rem; font-size:.85rem; } }

/* Certification card tweaks */
.cert-card h3{ font-size:1rem; margin:0 0 .35rem 0; }
.cert-meta{ display:block; margin-bottom:.6rem; }

/* Subtle transition for interactive elements */
.nav-list a, .cta-button, .cta-link, .cert-link{ transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }

/* Certifications carousel improvements */
.certifications-wrapper{ display:flex; align-items:center; gap:.6rem; position:relative; }
.certifications-wrapper .slider-btn{ background:var(--card); border:1px solid var(--divider); width:36px; height:36px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; font-size:1.4rem; cursor:pointer; box-shadow:var(--shadow); }
.certifications-wrapper .slider-btn[aria-hidden="true"]{ opacity:0; pointer-events:none; }

/* Polished button visuals */
.certifications-wrapper .slider-btn{ background:var(--int-blue); color:#fff; border:0; width:44px; height:44px; border-radius:10px; font-weight:700; font-size:1.15rem; }
.certifications-wrapper .slider-btn:hover{ transform: translateY(-3px); }
.certifications-wrapper .slider-btn:focus{ outline:3px solid rgba(24,125,240,0.18); outline-offset:3px; box-shadow:0 10px 30px rgba(8,106,219,0.12); }

/* Card animation & active state */
.certifications-cards > .cert-card{ transition: transform .28s cubic-bezier(.2,.9,.2,1), box-shadow .28s ease, opacity .2s ease; will-change: transform, opacity; }
.cert-card.active{ transform: translateY(-8px) scale(1.03); box-shadow: 0 24px 60px rgba(8,106,219,0.12); }

@keyframes cert-card-enter { from { opacity:0; transform: translateY(12px) scale(.995); } to { opacity:1; transform: translateY(0) scale(1); } }
.cert-card.entering{ animation: cert-card-enter .42s cubic-bezier(.2,.9,.2,1) both; }

@media (prefers-reduced-motion: reduce){
  .certifications-cards > .cert-card, .cert-card.entering, .cert-card.active{ transition:none; animation:none; transform:none; }
  .certifications-wrapper .slider-btn{ transition:none; }
}
.certifications-cards{ scroll-snap-type:x proximity; scroll-padding: 1rem; padding: .6rem 0; }
.certifications-cards > .cert-card{ scroll-snap-align:center; min-width:82%; max-width:86%; margin:0 6%; }

/* Indicators */
.cert-indicators{ display:flex; gap:.4rem; justify-content:center; margin-top:.6rem; }
.cert-indicators button{ width:8px; height:8px; border-radius:50%; background:rgba(15,23,36,0.12); border:0; }
.cert-indicators button[aria-current="true"]{ background:var(--int-blue); }

@media (min-width:900px){
  .certifications-wrapper .slider-btn{ display:none; }
  .certifications-cards > .cert-card{ scroll-snap-align:start; min-width:260px; max-width:320px; margin:0; }
  .cert-indicators{ display:none; }
}

