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

body {
  font-family: 'Poppins', sans-serif;
  background: #0b75dd;
  min-height: 100vh;
  padding: 36px 12px 60px;
  position: relative;
  overflow-x: hidden;
}

strong { font-weight: 600;
}

html {
  scrollbar-gutter: stable;
}

a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

/* ── String theory canvas background ── */
#string-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.s1  { width:115px;height:115px; top:5%;  left:2%;   transform:rotate(18deg); }
.s2  { width:75px; height:75px;  top:24%; left:0.5%; transform:rotate(-12deg); background:rgba(255,255,255,0.08); }
.s3  { width:130px;height:130px; top:52%; left:3%;   transform:rotate(28deg); }
.s4  { width:88px; height:88px;  bottom:14%;left:0.5%;transform:rotate(-22deg);background:rgba(255,255,255,0.08);}
.s5  { width:125px;height:125px; top:3%;  right:0.5%;transform:rotate(12deg); }
.s6  { width:80px; height:80px;  top:32%; right:0%;  transform:rotate(-16deg);background:rgba(255,255,255,0.08);}
.s7  { width:105px;height:105px; top:62%; right:1%;  transform:rotate(22deg); }
.s8  { width:70px; height:70px;  bottom:6%;right:2%; transform:rotate(-9deg); background:rgba(255,255,255,0.08);}

/* ── Card ── */
.card {
  max-width: 70%;
  margin: 4vh auto;
  background: #222222;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

/* ── Navbar ── */
.topnav {
  background: #222222;
  height: 8vh;
  display: flex;
  align-items: center;
  padding: 0 1vw;
  gap: 10px;
  position: sticky;
  top: 10px;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  text-decoration: none;
}
.nav-icon {
  width: 45px; height: 45px;
  background: #0b75dd;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 500; color: #fff;
  margin-right: 1vw;
  margin-left: 0.8vw;
}
.nav-name { font-size: max(3.4vh, 28px); font-weight: 550; color: #fff; }

.nav-links { display:flex; align-items:center; gap:0; list-style:none; }
.nav-links li a {
  color: #999;
  font-size: max(2vh, 20px);
  text-decoration: none;
  padding: 4px 14px;
  transition: color 0.2s;
  white-space: nowrap;
  margin-right: 0.8vw;
}
.nav-links li a:hover, .nav-links li a.active { color: #fff; }

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 5vh 6vw 0;
}

.portrait {
  flex-shrink: 0;
  width: 23vw; height: 23vw;
  border-radius: 50%;
  background: #333;
  border: 0.75vw solid #3c3c3c;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  margin-right: 2vw;
}
.portrait img {
  width: 100%; height: auto;
  display: block;
}

.hero-body { flex: 1; }
.hero-role { font-size: 20px; color: #a8a8a8; margin-bottom: 10px; font-weight: 400; letter-spacing: 0.04em; }
.hero-name { font-size: 52px; font-weight: 700; color: #fff; line-height: 1.1; margin-bottom: 12px; }
.hero-title { font-size: 42px; font-weight: 550; color: #fff; margin-bottom: 6px; text-align: left;}
.hero-subtitle { font-size: 24px; font-weight: 550; color: #fff; margin-bottom: 4px; text-align: left;}
.hero-desc { font-size: max(18px, 1.4vh); color: #cdcccc; line-height: 1.4; margin-bottom: 6px; font-weight: 300; text-align: left;}
.hero-btns { display: flex; gap: 10px; }

.social-icons { display: flex; gap: 20px; margin-top: 15px; }
.social-icons a { color: #777; font-size: 3vh; transition: color 0.2s; }
.social-icons a:hover { color: #d5d5d5; }

.btn {
  padding: 8px 0px 8px 0px;
  border-radius: 40px;
  min-height: 3em;
  min-width: 9em;
  font-size: max(1.2vh, 16px);
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  text-decoration: none;
  justify-content: center;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.5s;
  border: 2px solid transparent;
  border-color: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  margin-right: 20px;
  margin-bottom: 10px;
  margin-top: 2vh;
}
.btn-out {color: #d5d5d5; outline: 2px solid #0b75dd;}
.btn-out:hover {color: #222222; background: #0b75dd; border-color: #0b75dd;}
.btn-blue { color: #d5d5d5; outline: 2px solid #d5d5d5;}
.btn-blue:hover {color: #222222; background: #d5d5d5; border-color: #d5d5d5;}

/* ── Divider ── */
hr.div { border: none; border-top: 1px solid #333; margin: 0 36px; }

/* ── Generic section ── */
.sec { padding: 3.5vh 3vw; }

.sec-title {
  font-size: 2.5vh; font-weight: 600; color: #fff;
  border-bottom: 2px solid #333;
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}
.sec-title::after {
  content: '';
  position: absolute;
  bottom: 1px; left: 0;
  width: 100%; height: 4px;
  background: #0b75dd;
}

/* --─ At a Glance ── */
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 0 16px 0; }
.cv-column {display: flex;flex-direction: column; gap: 12px; align-items: flex-start; }
.cv-column h3 { font-size: 22px; font-weight: 400; color: #fff; text-align: left;}
.cv-column ul { font-size: 18px; color: #cdcccc; line-height: 1.45; font-weight: 300; text-align: left;}


/* ── Skills + Experience ── */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 48px max(24px, 5vw); margin: 0 16px 0}
.skl { display: flex; gap: 12px; align-items: flex-start; }
.skl-icon { color: #0b75dd; flex-shrink: 0; width: 2.4vw; text-align: center;}

/* ── Current Projects ── */
.project { display: flex; align-items:start; gap: 32px; margin-top: 8px;}
.project img { width: max(360px, 16vw); border-radius: 8px;  border: 8px solid transparent; border-color: white; margin-top: 8px; }
.project-img.no-border { border: 0; }
.project figcaption { font-size: max(14px, 1.1vh); color: #cdcccc; line-height: 1.4; font-weight: 300; text-align: justify; font-style: italic;}


/* ── Research ── */
  .graphic-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1; /* matches the roughly 2:1 width-to-height ratio */
  }
  .graphic-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
  }

  .img-text {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

  .img-text img {
  width: max(360px, 18vw);
  border-radius: 8px;
}

  .img-text figcaption { font-size: max(14px, 1.1vh); color: #cdcccc; line-height: 1.4; font-weight: 300; text-align: justify; font-style: italic; margin-top: 2px; margin-bottom:24px;}


/* ── Markdown ── */
.md { font-size: max(18px, 1.4vh); color: #cdcccc; line-height: 1.4; font-weight: 300; text-align: left;}
.md h1 { font-size: 42px; font-weight: 550; color: #fff; margin-bottom: 32px; text-align: left;}
.md h2 { font-size: 28px; font-weight: 450; color: #fff; margin-bottom: 6px; margin-top: 5vh; text-align: left;}
.md h3 { font-size: 22px; font-weight: 400; color: #fff; margin-bottom: 12px; text-align: left;}

.md blockquote {
  border-left: 4px solid #0b75dd;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-size: max(18px, 1.4vh);
  text-align: center;
  font-style: italic;
  margin-bottom: 12px;
}

/* ── Contact ── */
.contact-wrapper {
  max-width: 40%;
  margin: 0 auto;
  margin-bottom: 3vh;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

input, textarea {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid #cdcdcd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}

textarea {
  min-height: 15vh;
  resize: vertical;
}

button {
  font-family: inherit;
  font-size: 18px;
  background: #0b75dd;
  color: white;
  padding: 0.7em 1em;
  padding-left: 0.9em;
  display: flex;
  align-items: center;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  max-width: fit-content;
  align-self: center;
}

button span {
  display: block;
  margin-left: 0.3em;
  transition: all 0.3s ease-in-out;
}

button svg {
  display: block;
  transform-origin: center center;
  transition: transform 0.3s ease-in-out;
}

button:hover .svg-wrapper {
  animation: fly-1 0.6s ease-in-out infinite alternate;
}

button:hover svg {
  transform: translateX(1.2em) rotate(45deg) scale(1.1);
}

button:hover span {
  transform: translateX(5em);
}

button:active {
  transform: scale(0.95);
}

@keyframes fly-1 {
  from {
    transform: translateY(0.1em);
  }

  to {
    transform: translateY(-0.1em);
  }
}



/* ── Footer ── */
.footer {
  background: #1e1e1e;
  border-top: 1px solid #333;
  padding: 13px 36px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.f-social { display: flex; gap: 1.4vw; }
.f-social a { font-size: max(1.2vh, 16px); color: #555; text-decoration: none; transition: color 0.2s; }
.f-social a:hover { color: #0b75dd; }
.f-copy { font-size: max(1.2vh, 16px); color: #444; }

/* ── Scroll top btn ── */
.scrolltop {
  position: fixed; bottom: 18px; right: 18px;
  width: 36px; height: 36px;
  background: #252525;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #888; font-size: 13px;
  text-decoration: none; z-index: 200;
  transition: all 0.2s;
}
.scrolltop:hover { background: #0b75dd; color: #fff; border-color: #0b75dd; }

/* ── back btn ── */
.backbtn {
  position: relative; top: 2vh; left: 2.05vw;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #888; font-size: 24px;
  text-decoration: none; z-index: 200;
  transition: all 0.2s;
}
.backbtn:hover { color: #fff; }
