:root{
  --bg: #ffffff;
  --text: #111;
  --muted: #555;
  --line: #eaeaea;
  --card: #ffffff;
  --shadow: 0 6px 18px rgba(0,0,0,.10);
  --accent: #b51f3a; /* red like screenshot */
}

body.dark{
  --bg: #0f1115;
  --text: #f2f2f2;S
  --muted: #b7b7b7;
  --line: rgba(255,255,255,.10);
  --card: #161a22;
  --shadow: 0 10px 25px rgba(0,0,0,.45);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

.container{
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Header */
.header{
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
}
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 0;
}
.brand{
  font-weight: 800;
  font-size: 20px;
}
.navlinks{
  display:flex;
  gap: 22px;
  align-items:center;
  font-weight: 700;
  letter-spacing: .5px;
}
.navlink{
  color: var(--text);
  text-decoration:none;
  font-size: 15px;
  padding: 8px 6px;
  border-bottom: 2px solid transparent;
}
.navlink.active{
  color: var(--accent);
  border-bottom-color: transparent;
}
.navright{
  display:flex;
  align-items:center;
  gap: 4px;
}
.resume{
  display:flex;
  gap:10px;
  align-items:center;
  text-decoration:none;
  color: var(--text);
  font-weight: 800;
}
.resume i{ color: var(--text); }
.iconbtn{
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font-size: 18px;
}
.divider{
  height: 1px;
  background: var(--line);
}

/* Hero */
.hero{
  display:grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  padding: 55px 0 35px;
  align-items:center;
}
.photo-wrap{
  position: relative;
  width: 380px;
  height: 380px;
  margin: 0 auto;
}
.circle-bg{
  position:absolute;
  inset: 45px;
  background: var(--accent);
  border-radius: 50%;
  z-index: 0;
}
.photo{
  position:absolute;
  width: 270px;
  height: 270px;
  object-fit: cover;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: var(--shadow);
}
.photo-fallback{
  position:absolute;
  width: 270px;
  height: 270px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border-radius: 50%;
  display:grid;
  place-items:center;
  border: 2px dashed var(--line);
  color: var(--muted);
}
.blob{
  position:absolute;
  width: 320px;
  height: 120px;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  background: var(--bg);
  border-radius: 0 0 160px 160px;
  z-index: 1;
}

.hello{
  color: var(--accent);
  font-size: 28px;
  margin: 0 0 8px;
}
.title{
  font-size: 26px;
  margin: 0 0 12px;
  line-height: 1;
  font-weight: 900;
}
.bio{
  color: var(--muted);
  line-height: 1.75;
  font-size: 15.8px;
  max-width: 62ch;
}
.btn{
  display:inline-block;
  margin-top: 18px;
  padding: 14px 26px;
  background: var(--accent);
  color: #fff;
  text-decoration:none;
  font-weight: 900;
  border-radius: 0;
  letter-spacing:.5px;
  border: none;
}
.down{
  display:flex;
  width: 52px;
  height: 52px;
  margin-top: 22px;
  align-items:center;
  justify-content:center;
  color: var(--accent);
  text-decoration:none;
  font-size: 26px;
}

/* Sections */
.section{
  padding: 28px 0 70px;
}
.section-title{
  font-size: 26px;
  margin: 0;
  font-weight: 900;
}
.section-sub{
  margin: 6px 0 28px;
  color: var(--muted);
  font-size: 16px;
}

/* Skills cards grid */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card{
  background: var(--card);
  border: 1px solid rgba(0,0,0,.04);
  box-shadow: var(--shadow);
  border-radius: 6px;
  padding: 24px;
}
body.dark .card{ border-color: var(--line); }
.card-icon{
  width: 52px;
  height: 52px;
  display:grid;
  place-items:center;
  color: var(--accent);
  font-size: 20px;
  margin-bottom: 10px;
}
.card h3{
  margin: 6px 0 10px;
  font-size: 28px;
}
.card p{
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.level{
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e5e5;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(181,31,58,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(181,31,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(181,31,58,0); }
} 

/* Each experience item */
.t-item {
  position: relative;
  margin-bottom: 32px;
}

/* RED DOT */
.t-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 18px;
  width: 16px;
  height: 16px;
  background-color: #b51f3a; /* red */
  border-radius: 50%;
  z-index: 5;
  animation: pulse 2s infinite;
}
.dot{
  position:absolute;
  left: 0px;
  top: 16px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
}
.t-card{
  background: var(--card);
  border: 1px solid rgba(0,0,0,.04);
  box-shadow: var(--shadow);
  border-radius: 6px;
  padding: 22px 22px 18px;
}
body.dark .t-card{ border-color: var(--line); }
.t-card h3{
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 900;
}
.company{
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 6px;
}
.date{
  color: var(--muted);
  margin-bottom: 10px;
}
.t-card ul{
  margin: 0;
  padding-left: 18px;
}
.t-card li{
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Contact */
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items:center;
}
.info-circle{
  width: 220px;
  height: 220px;
  border: 16px solid #000;
  border-radius: 50%;
  display:grid;
  place-items:center;
  margin: 0 auto;
  background: transparent;
}
body.dark .info-circle{ border-color: #fff; }
.info-circle i{
  font-size: 110px;
  color: #000;
}
body.dark .info-circle i{ color: #fff; }

.contact-form{
  display:flex;
  flex-direction:column;
  gap: 18px;
}
.contact-form input,
.contact-form textarea,
.contact-form select{
  padding: 18px 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  font-size: 16px;
}
.phone-row{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
}
.btn.wide{
  width: 100%;
  padding: 18px;
  font-size: 16px;
  cursor:pointer;
}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.footer-inner{
  color: var(--muted);
}

/* Responsive */
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: repeat(2, 1fr); }
  .contact-grid{ grid-template-columns: 1fr; }
  .title{ font-size: 52px; }
}
@media (max-width: 640px){
  .navlinks{ display:none; }
  .cards{ grid-template-columns: 1fr; }
  .photo-wrap{ width: 320px; height: 320px; }
  .circle-bg{ inset: 40px; }
}

.cards,
.timeline {
  position: relative;
}

/* SKILLS cards hover */
.card {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0.3s;
}

.card:hover {
  transform: translateY(-12px) scale(1.04);
  z-index: 20;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

/* EXPERIENCE cards hover */
.t-item {
  position: relative;
}

.t-card {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0.3s;
}

.t-card:hover {
  transform: translateX(6px) scale(1.02);
  z-index: 30;
  box-shadow: 0 30px 70px rgba(0,0,0,0.28);
}

/* Focused container for academic reading */
.container-small {
  width: min(800px, 92%);
  margin: 0 auto;
}

.pub-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Individual Publication Card */

.pub-card {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  transition: transform 0.2s ease;
}

.pub-card:last-child {
  border-bottom: none;
}

.pub-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 10px 0;
  color: var(--text);
  line-height: 1.3;
}

.pub-meta {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 15px;
  font-style: italic;
}

.pub-meta strong {
  color: var(--text);
  font-style: normal;
}

.pub-description {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 20px;
}

/* Link Button for Papers */
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pub-link i {
  font-size: 16px;
}

.pub-link:hover {
  text-decoration: underline;
}

/* Responsive adjustment for the small container */
@media (max-width: 640px) {
  .pub-title {
    font-size: 20px;
  }
}




/* --- Blog / Conference Gallery Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-img {
  width: 100%;
  height: 200px;
  object-fit: cover; /* Ensures photos aren't stretched */
  display: block;
}

.blog-content {
  padding: 15px;
}

.blog-date {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.blog-conf-name {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: var(--text);
}

.blog-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}



/* --- Lightbox / Lightroom Effect --- */
.clickable {
  cursor: zoom-in;
  transition: opacity 0.3s;
}

.clickable:hover {
  opacity: 0.9;
}

/* The Modal (background) */
.lightbox {
  display: none; 
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  backdrop-filter: blur(5px);
}

/* Modal Content (Image) */
.lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {transform:scale(0.8); opacity: 0;}
  to {transform:scale(1); opacity: 1;}
}

/* Caption Text */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  font-weight: 700;
}

/* Close Button */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}






/* --- Urgent News Bar Styles --- */
.news-bar {
  background: var(--accent); /* Uses your signature red */
  color: #fff;
  padding: 10px 0;
  font-size: 14px;
  position: relative;
  z-index: 1001;
  animation: slideDown 0.5s ease-out;
}

.news-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding-right: 40px; /* Space for close button */
}

.news-badge {
  background: #fff;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.news-text {
  margin: 0;
  font-weight: 500;
}

.news-text a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
  margin-left: 5px;
}

.news-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
}

.news-close:hover {
  opacity: 1;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Ensure header sticks below news bar or adjust top */
.header {
  top: 0;
}



/* Refined News Bar */
.news-bar {
  background: linear-gradient(90deg, var(--accent), #e63946); /* Subtle gradient for attraction */
  color: #fff;
  padding: 12px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2); /* Glassmorphism look */
  border: 1px solid #fff;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
}

/* Pulse animation to draw the eye to the "New" badge */
@keyframes pulse-white {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.news-badge {
  animation: pulse-white 2s infinite;
}

html {
  scroll-behavior: smooth;
}