/* =========================
   Theme system (dark/light)
   ========================= */
:root{
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --max: 1080px;
  --pad: 18px;
  --pad2: 24px;

  --fs-title: clamp(2rem, 4vw, 3.2rem);
  --fs-h2: clamp(1.3rem, 2.4vw, 1.8rem);
}

html[data-theme="dark"]{
  --bg: #0b0c10;
  --surface: #12131a;
  --surface2:#181a24;
  --text:#eef0f6;
  --muted:#a8adbf;
  --line: rgba(255,255,255,.08);
  --accent:#7c9cff;
  --chipbg: rgba(255,255,255,.04);
  --hoverbg: rgba(255,255,255,.06);
  --panelbg: rgba(0,0,0,.18);
}

html[data-theme="light"]{
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface2:#f1f3f9;
  --text:#111422;
  --muted:#56607a;
  --line: rgba(17,20,34,.12);
  --accent:#355cff;
  --chipbg: rgba(17,20,34,.04);
  --hoverbg: rgba(17,20,34,.06);
  --panelbg: rgba(17,20,34,.04);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  color: var(--text);
  line-height:1.6;
  background:
    radial-gradient(1200px 600px at 10% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(800px 500px at 80% 10%, rgba(0,0,0,.05), transparent 60%),
    var(--bg);
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

a{color:inherit}
img{max-width:100%; height:auto; display:block}

.container{max-width:var(--max); margin:0 auto; padding: 0 var(--pad)}
.section{padding: 56px 0}
.section__title{font-size: var(--fs-h2); margin:0 0 14px}
.section__head{display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin-bottom:14px}
.section__hint{margin:0; color:var(--muted); font-size:.95rem}

.muted{color:var(--muted)}
.small{font-size:.92rem}

.inlineLink{
  color: var(--accent);
  text-decoration:none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.inlineLink:hover{border-bottom-color: var(--accent)}

/* Accessibility */
.skip-link{
  position:absolute; left:-999px; top:10px;
  background: var(--surface2); border:1px solid var(--line);
  padding:10px 12px; border-radius:12px; z-index:9999;
}
.skip-link:focus{left:10px}

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom:1px solid var(--line);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px var(--pad);
}
.brand{
  display:flex; gap:10px; align-items:center;
  text-decoration:none;
}
.brand__dot{
  width:12px; height:12px; border-radius:999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent);
}
.brand__text{font-weight:700; letter-spacing:.2px}

.topbar__actions{display:flex; align-items:center; gap:10px}

.nav{display:none; gap:18px}
.nav__link{
  text-decoration:none; color:var(--muted);
  padding:8px 10px; border-radius:12px;
}
.nav__link:hover{color:var(--text); background: var(--hoverbg)}

/* Theme button */
.themebtn{
  display:grid; place-items:center;
  width:42px; height:42px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--chipbg);
  cursor:pointer;
}
.themebtn:hover{background: color-mix(in srgb, var(--accent) 14%, var(--chipbg))}
.themebtn__icon{font-size:1.05rem; opacity:.9}

/* Mobile nav button */
.navbtn{
  display:inline-flex; flex-direction:column; gap:6px;
  border:1px solid var(--line);
  background: var(--chipbg);
  padding:10px 10px;
  border-radius:14px;
  cursor:pointer;
}
.navbtn__bar{width:20px; height:2px; background: var(--text); opacity:.85}

.mobileNav{
  border-bottom:1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
}
.mobileNav__inner{padding: 10px var(--pad) 14px}
.mobileNav__link{
  display:block;
  padding:12px 12px;
  border-radius:14px;
  text-decoration:none;
  color:var(--muted);
}
.mobileNav__link:hover{background: var(--hoverbg); color:var(--text)}

/* Hero */
.hero{padding: 46px 0 10px}
.hero__inner{
  display:grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items:center;
}
.hero__title{
  font-size: var(--fs-title);
  margin:0 0 8px;
  letter-spacing:-.5px;
}
.hero__subtitle{margin:0 0 12px; font-size:1.05rem}
.hero__lead{margin:0 0 14px; color:var(--muted); max-width:65ch}
.hero__chips{display:flex; flex-wrap:wrap; gap:10px}

.chip{
  border:1px solid var(--line);
  background: var(--chipbg);
  padding: 8px 12px;
  border-radius: 999px;
  font-size:.92rem;
  color: var(--text);
}

.hero__media{display:flex; justify-content:flex-start}
.avatar{
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chipbg);
  box-shadow: var(--shadow);
  object-fit: cover;
}

/* Social icons under hero */
.hero__socials{
  display:flex;
  gap:14px;
  margin-top:16px;
}
.hero__socials a{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid var(--line);
  background: var(--chipbg);
  transition: all .15s ease;
  text-decoration:none;
}
.hero__socials a:hover{
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--accent) 14%, var(--chipbg));
}
.hero__socials svg{
  width:20px;
  height:20px;
  fill: var(--text);
  opacity: .92;
}

/* Cards & grids */
.card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface2) 88%, transparent));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card--padded{padding: var(--pad2)}

.grid{display:grid; gap:16px}
.grid--3{grid-template-columns: 1fr}

/* Project cards */
.card__top{
  width:100%;
  text-align:left;
  padding: 18px;
  border:0;
  background: transparent;
  cursor:pointer;
  color:inherit;
}
.card__top:focus-visible{outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px}
.card__titleRow{display:flex; align-items:center; justify-content:space-between; gap:10px}
.card__title{margin:0; font-size:1.08rem}
.card__desc{margin: 8px 0 0; color:var(--muted)}

.pill{
  font-size:.84rem;
  color: color-mix(in srgb, var(--text) 88%, transparent);
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 6px 10px;
  border-radius: 999px;
  white-space:nowrap;
}

.card__body{
  border-top:1px solid var(--line);
  background: var(--panelbg);
  padding: 16px 18px 18px;
}
.card__media img{
  border-radius: 14px;
  border:1px solid var(--line);
  background: var(--chipbg);
  margin-bottom: 14px;
}

.proj__block h4{margin: 14px 0 6px; font-size:1rem}
.proj__block p{margin:0; color:var(--muted)}
.steps{margin:0; padding-left: 18px; color:var(--muted)}
.tags{margin:0; display:flex; flex-wrap:wrap; gap:8px}

/* Professional tags */
.tag{
  font-size:.85rem;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--surface2) 70%, transparent);
  color: color-mix(in srgb, var(--text) 92%, transparent);
  letter-spacing:.2px;
}

/* Certificates */
.cert{
  margin:0;
  padding: 12px;
  cursor:pointer;
  transition: transform .12s ease;
}
.cert:hover{transform: translateY(-2px)}
.cert__img{
  width:100%;
  border-radius: 14px;
  border:1px solid var(--line);
  background: var(--chipbg);
}
.cert__cap{padding: 10px 2px 2px}
.cert__cap strong{display:block; font-weight:650}
.cert__cap .muted{display:block; font-size:.92rem; margin-top:2px}

/* Contact */
.contact__row{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.contact__label{color:var(--muted); font-size:.92rem}
.contact__link{
  display:inline-block;
  margin-top:4px;
  text-decoration:none;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: var(--chipbg);
}
.contact__link:hover{background: var(--hoverbg)}

/* Modal */
.modal{
  position:fixed; inset:0;
  display:none;
  z-index:100;
}
.modal[aria-hidden="false"]{display:block}
.modal__overlay{
  position:absolute; inset:0;
  background: rgba(0,0,0,.65);
}
.modal__panel{
  position:relative;
  width:min(980px, calc(100% - 24px));
  margin: 18px auto;
  border-radius: 18px;
  border:1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal__head{
  display:flex; justify-content:space-between; align-items:center;
  padding: 12px 14px;
  border-bottom:1px solid var(--line);
  background: color-mix(in srgb, var(--surface2) 80%, transparent);
}
.modal__title{font-weight:650; color: color-mix(in srgb, var(--text) 92%, transparent)}
.modal__close{
  cursor:pointer;
  border:1px solid var(--line);
  background: var(--chipbg);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 14px;
}
.modal__body{padding: 14px}
.modal__img{
  width:100%;
  height:auto;
  border-radius: 14px;
  border:1px solid var(--line);
  background: var(--chipbg);
}

/* Footer */
.footer{
  border-top:1px solid var(--line);
  padding: 18px 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.footer__inner{
  display:flex; flex-direction:column; gap:10px;
  align-items:flex-start;
}
.footer__links{display:flex; flex-wrap:wrap; gap:10px}
.footer__link{
  color: var(--muted);
  text-decoration:none;
  padding: 6px 10px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: var(--chipbg);
}
.footer__link:hover{color: var(--text); background: var(--hoverbg)}

/* Reveal animation */
.reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 720px){
  .nav{display:flex}
  .navbtn{display:none}

  .hero__inner{grid-template-columns: 1.15fr .85fr; gap: 26px}
  .hero__media{justify-content:flex-end}
  .avatar{width: 160px; height: 160px}

  .grid--3{grid-template-columns: repeat(2, 1fr)}
  .contact__row{grid-template-columns: repeat(3, 1fr)}
  .footer__inner{flex-direction:row; justify-content:space-between; align-items:center}
}

@media (min-width: 980px){
  .grid--3{grid-template-columns: repeat(3, 1fr)}
  .section{padding: 70px 0}
}

/* Subtle background text */
.bg-text {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
  font-size: clamp(8rem, 20vw, 20rem);
  font-weight: 900;
  color: var(--accent);
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
  letter-spacing: 2px;
  word-wrap: break-word;
  padding: 2rem;
  transform: rotate(-5deg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  user-select: none;
}

/* Make sure it doesn't interfere with content on mobile */
@media (max-width: 76px) {
  .bg-text {
    font-size: clamp(1rem, 10vw, 5rem);
    opacity: 0.02;
    transform: rotate(-3deg);
  }
}

/* For very small screens */
@media (max-width: 48px) {
  .bg-text {
    font-size: clamp(1rem, 3vw, 6rem);
    opacity: 0.015;
    transform: rotate(-2deg);
  }
}

/* Hide scrollbar but keep scrolling functionality */
body {
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  color: var(--text);
  line-height:1.6;
  background:
    radial-gradient(1200px 600px at 10% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(800px 500px at 80% 10%, rgba(0,0,0,.05), transparent 60%),
    var(--bg);
  /* Hide scrollbar code */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
  overflow-y: scroll;        /* Ensure scrollbar space is reserved */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  background: transparent;
  display: none;
}

/* Optional: If you want to hide on all elements */
*::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  background: transparent;
  display: none;
}