/* Finance-themed dark/light using CSS variables */
:root {
  --bg: #0b0d0e;
  --text: #e6e8ea;
  --muted: #a0a6ad;
  --card: #121416;
  --border: #1e2327;
  --accent: #22c55e; /* green */
  --accent-2: #3b82f6; /* blue */
}

html[data-theme="light"]{
  --bg:#f9fafb;
  --text:#0b1220;
  --muted:#4b5563;
  --card:#ffffff;
  --border:#e5e7eb;
  --accent:#16a34a;
  --accent-2:#2563eb;
}

*{box-sizing:border-box}
body{
  margin:0; background:var(--bg); color:var(--text); font:16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial;
}
.container{ width: min(1100px, 92vw); margin: 0 auto; }
.card-grid.two { align-items: stretch; }  /* default */



.experience-item {
  display: flex;
  align-items: flex-start;
  gap: 20px; /* was 16px */
  margin-bottom: 28px; /* more breathing room */
}

.exp-logo img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 8px; /* optional rounded corners */
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px; /* slightly more padding for larger size */
}

.exp-content {
  flex: 1;
}


/* ---- Cards / grids ---- */
.card-grid { display:grid; gap:20px; margin-top:14px; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px){ .card-grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px){ .card-grid.two, .card-grid.three { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
}
.card.compact .media { padding: 12px; background: var(--bg); }
.card .media { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #0f1215; }
.card .media img { width: 100%; height: 100%; object-fit: cover; display:block; }
.card .media.media-logo { aspect-ratio: auto; display:flex; align-items:center; justify-content:center; }
.card .media.media-logo img { width: 110px; height: 110px; object-fit: contain; }

.card-body { padding: 16px 16px 18px; }
.card-body h3 { margin: 6px 0 6px; font-size: 18px; }
.card-body .meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }

/* Badges & small lists */
.badge-row { display:flex; gap:8px; margin-bottom:6px; flex-wrap:wrap; }
.badge { background: rgba(34,197,94,.15); color:#7ae28f; border:1px solid rgba(34,197,94,.25); padding:3px 8px; border-radius:999px; font-size:12px; }
html[data-theme="light"] .badge { color:#166534; border-color:#bbf7d0; background:#dcfce7; }
.badge-outline { background:transparent; color:var(--muted); border:1px dashed var(--border); }

ul.mini { margin: 8px 0 0 18px; padding: 0; display:grid; gap:4px; }
ul.mini li { font-size:14px; color:var(--text); }

/* Buttons row */
.btn-row { display:flex; gap:10px; margin-top:12px; }
.btn { display:inline-block; padding:10px 14px; background:var(--accent-2); color:#fff; border-radius:10px; text-decoration:none; font-weight:600; }
.btn:hover { opacity:.95; }
.btn-outline { background:transparent; border:1px solid var(--border); color:var(--text); }
.btn-outline:hover { border-color: var(--accent-2); color:#fff; background: var(--accent-2); }



/* Academic cards layout */
.academics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
}

.academic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.academic-card .image {
  width: 100%;
  aspect-ratio: 16 / 6; /* shorter image strip */
  overflow: hidden;
  background: var(--bg);
}
.academic-card .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.academic-card .content {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.academic-card .badges {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.academic-card .badge {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.25);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
html[data-theme="light"] .academic-card .badge {
  background: #dcfce7;
  color: #166534;
}

.academic-card h3 {
  font-size: 18px;
  margin: 0 0 4px;
}
.academic-card .meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.academic-card ul {
  margin: 0;
  padding-left: 20px;
  flex: 1;
}
.academic-card ul li {
  font-size: 14px;
  line-height: 1.5;
}

.academic-card .image {
  width: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px; /* space around the logo */
}

.academic-card .image img {
  max-width: 100%;
  max-height: 140px; /* was 100px – increase this for larger logo */
  object-fit: contain; /* keeps entire logo visible */
}

.academic-card .image {
  background: #fff; /* or a light neutral color */
  border-bottom: 1px solid var(--border);
}


.btn-github {
    border-color: #28a745; /* Green border */
    color: #28a745; /* Green text */
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-github i {
    margin-right: 6px; /* Space between icon and text */
}

.btn-github:hover {
    background-color: #28a745; /* Green background on hover */
    color: white; /* White text on hover */
}


/* --- Shared cards --- */
.list-card .list-title { margin: 4px 0 8px; font-size: 18px; }
ul.bullet { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
ul.bullet li { font-size: 14.5px; line-height: 1.55; }

/* --- Publications --- */
.pubs-grid .pub-card { display: grid; grid-template-columns: 240px 1fr; }
@media (max-width: 800px){ .pubs-grid .pub-card { grid-template-columns: 1fr; } }

.media-thumb { background: var(--bg); display:flex; align-items:center; justify-content:center; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Venue badge tint */
.badge-venue { background: rgba(59,130,246,.15); color:#93c5fd; border:1px solid rgba(59,130,246,.25); }
html[data-theme="light"] .badge-venue { background:#dbeafe; color:#1d4ed8; border-color:#bfdbfe; }

/* --- Testimonials --- */
.quote-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 14px 22px;
  position: relative;
  box-shadow: 0 8px 22px rgba(0,0,0,.10);
}
.quote-card .quote-mark {
  position:absolute; top:-8px; left:12px; font-size:42px; color:var(--border);
}
.quote-card p { margin: 10px 0 14px; }
.quote-card .person { display:flex; gap:12px; align-items:flex-start; border-top:1px dashed var(--border); padding-top:10px; }
.quote-card .avatar { width:34px; height:34px; border-radius:999px; background:linear-gradient(135deg,var(--border),transparent); border:1px solid var(--border); }
.quote-card .name { font-weight:700; }
.quote-card .role { font-size:13px; color:var(--muted); }
.quote-card .link { font-size:13px; text-decoration:none; border-bottom:1px dashed var(--accent-2); color:var(--accent-2); }
.quote-card .link:hover { border-bottom-style:solid; }


.quote-card .avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.quote-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 14px 22px;
  position: relative;
  box-shadow: 0 8px 22px rgba(0,0,0,.10);
  height: auto; /* Ensure height adjusts to content */
  min-height: unset; /* Remove any fixed min-height if set */
  display: flex;
  flex-direction: column;
}

.quote-card p {
  margin: 10px 0 14px;
  overflow: visible; /* Ensure full text shows */
  display: block;
  white-space: normal; /* Prevent single-line truncation */
}



/* Nav */
.nav { position: sticky; top:0; z-index:10; background:linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0)); backdrop-filter:saturate(180%) blur(6px); }
.nav-inner{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.nav a{ color:var(--muted); text-decoration:none; margin:0 10px; }
.nav a:hover{ color:var(--text); }
.brand a{ font-weight:800; letter-spacing:.5px; color:var(--text); }

.toggle{ border:1px solid var(--border); background:var(--card); color:var(--muted); padding:6px 10px; border-radius:999px; cursor:pointer; }

/* Hero */
.hero{ display:grid; grid-template-columns: 1.2fr .8fr; gap:40px; padding:64px 0 24px; align-items:center; }
.hero .hero-photo img{ width: 300px; height: 300px; border-radius: 999px; object-fit: cover; display:block; margin-left:auto; box-shadow:0 15px 40px rgba(0,0,0,.45); }
.hero h1{ font-size: clamp(36px, 7vw, 56px); margin:0 0 8px; }
.muted{ color:var(--muted); }
.cta{ display:inline-block; margin-top:18px; background:var(--accent); color:white; padding:14px 20px; border-radius:12px; text-decoration:none; font-weight:700; box-shadow:0 10px 30px rgba(34,197,94,.25); }
.worked-with{ margin-top:22px; font-size:14px; }

/* Sections */
section{ padding:60px 0; border-top:1px solid var(--border); }
h2{ font-size:30px; margin:0 0 8px; }
.center{ text-align:center; }
.grid.two{ display:grid; grid-template-columns:1fr 1fr; gap:28px; }
.card-list{ display:grid; gap:12px; padding-left:20px; }
.timeline article{ background:var(--card); border:1px solid var(--border); border-radius:14px; padding:18px; margin:12px 0; }
.timeline .meta{ color:var(--muted); font-size:14px; margin-bottom:8px; }

/* Case studies */
.case{ display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:center; margin:28px 0; }
.case figure{ margin:0; }
.case img{ width:100%; border-radius:16px; border:1px solid var(--border); }
.case .pill{ background:rgba(59,130,246,.15); color:#93c5fd; padding:4px 10px; border-radius:999px; font-size:12px; }
.case .btn{ display:inline-block; margin-top:12px; padding:10px 14px; background:var(--accent-2); color:white; border-radius:10px; text-decoration:none; }

/* Testimonials */
.testimonials blockquote{ background:var(--card); border:1px solid var(--border); border-radius:16px; padding:16px 18px; margin:0; }
.testimonials footer{ color:var(--muted); margin-top:10px; }

/* Blog */
.posts{ list-style:none; padding:0; }
.posts li{ padding:10px 0; border-bottom:1px dashed var(--border); display:flex; justify-content:space-between; }
.posts a{ color:var(--text); text-decoration:none; }
.posts a:hover{ color:var(--accent-2); }

.post h1{ margin-bottom:6px; }
.post-body :is(h2,h3){ margin-top:24px; }

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

@media (max-width: 900px){
  .hero{ grid-template-columns:1fr; text-align:center; }
  .hero .hero-photo img{ margin: 0 auto; }
  .grid.two, .case{ grid-template-columns:1fr; }
}

/* --- Mobile burger button --- */
.burger{ display:none; width:42px; height:34px; border-radius:10px; border:1px solid var(--border); background:var(--card); }
.burger span{ display:block; width:20px; height:2px; background:var(--text); margin:5px auto; }

/* --- Collapse the bottom nav on small screens --- */
@media (max-width: 860px){
  .burger{ display:inline-block; }

  /* grid columns shrink on small screens (keeps your current style) */
  .site-nav .nav-top{ grid-template-columns: 70px 1fr 110px; }

  .nav-bottom{
    display:grid; grid-template-columns: 1fr 1fr;
    gap:12px; padding:10px 0;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-bottom[data-open="true"]{ max-height: 360px; } /* expanded */

  .nav-bottom a{
    text-align:center; padding:10px 6px; border-radius:10px; background:transparent;
  }
  .nav-bottom a:hover{ background: rgba(59,130,246,.08); }
}



/* ---- Two-line nav with centered About/Blogs ---- */
.site-nav{
  position: sticky; top:0; z-index:50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  /* subtle depth so text stays readable over light backgrounds */
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
}

/* -------- About: card layout -------- */
.about-cards h2 { margin-bottom: 10px; }

.about-grid{
  display:grid; gap:20px;
  grid-template-columns: 1.3fr .9fr;
}
@media (max-width: 900px){
  .about-grid{ grid-template-columns: 1fr; }
}

/* Custom colors for different blog promos */
.promo-drunkkalam {
  background: linear-gradient(90deg, rgba(255,215,0,0.08), transparent);
}
html[data-theme="light"] .promo-drunkkalam {
  background: linear-gradient(90deg, #fff9e5, transparent);
}

.promo-quantquill {
  background: linear-gradient(90deg, rgba(137,207,240,0.1), transparent);
}
html[data-theme="light"] .promo-quantquill {
  background: linear-gradient(90deg, #e6f6ff, transparent);
}



/* Blog cards */
.blog-card .media { width:100%; aspect-ratio: 16/9; overflow:hidden; background: var(--bg); }
.blog-card .media img { width:100%; height:100%; object-fit: cover; display:block; }
.post-title { margin:6px 0; font-size:18px; line-height:1.35; }
.blog-card .meta { color: var(--muted); font-size: 13.5px; margin-bottom: 6px; }

/* Promos already exist in your About section; reuse with different tints */
.promo-drunkkalam { background: linear-gradient(90deg, rgba(255,215,0,0.08), transparent); }
html[data-theme="light"] .promo-drunkkalam { background: linear-gradient(90deg, #fff9e5, transparent); }
.promo-quantquill { background: linear-gradient(90deg, rgba(137,207,240,0.1), transparent); }
html[data-theme="light"] .promo-quantquill { background: linear-gradient(90deg, #e6f6ff, transparent); }




/* Primary card */
.about-main .about-header{
  display:flex; gap:14px; align-items:center; margin-bottom:8px;
}
.about-avatar{
  width:64px; height:64px; border-radius:999px; overflow:hidden;
  border:1px solid var(--border); background: var(--bg);
}
.about-avatar img{ width:100%; height:100%; object-fit:cover; }
.about-name{ margin:0; }
.about-tag{ color:var(--muted); margin:2px 0 0; font-size:14px; }
.about-main .lead{ font-size:16.5px; line-height:1.65; }

/* Links line */
.about-links{
  margin-top:12px; display:flex; flex-wrap:wrap; gap:8px 12px;
  font-size:14px; color:var(--muted);
}
.about-links a{ color: var(--accent-2); text-decoration:none; border-bottom:1px dashed var(--accent-2); }
.about-links a:hover{ border-bottom-style:solid; }

/* Side card */
.about-side h3{ margin: 6px 0 6px; font-size:16px; }
.badge-cloud{ display:flex; flex-wrap:wrap; gap:8px; }
.badge-cloud .badge{ font-size:12px; }
.badge-cloud.muted .badge{ color:var(--muted); border-color:var(--border); }

/* Details (progressive disclosure) */
.about-details{ margin-top:10px; border-top:1px dashed var(--border); padding-top:8px; }
.about-details > summary{ cursor:pointer; font-weight:600; margin-bottom:6px; }
.about-details[open] > summary{ color: var(--accent-2); }

/* Blog promo tile */
.promo-card{
  display:flex; align-items:center; justify-content:space-between;
  margin-top:14px; padding:12px 14px; border-radius:12px;
  border:1px dashed var(--border); text-decoration:none;
  background: linear-gradient(90deg, rgba(34,197,94,.08), transparent);
  transition: border-color .2s ease, transform .15s ease;
}
html[data-theme="light"] .promo-card{ background: linear-gradient(90deg, #e8f9ee, transparent); }
.promo-card h4{ margin:0 0 2px; }
.promo-card p{ margin:0; color:var(--muted); font-size:14px; }
.promo-card .promo-action{
  font-weight:700; padding:6px 10px; border-radius:8px;
  border:1px solid var(--border); background: var(--card);
}
.promo-card:hover{ transform: translateY(-1px); border-color: var(--accent-2); }

/* Reuse existing button styles; ensure spacing fits */
.about .btn-row{ margin-top:10px; display:flex; gap:10px; flex-wrap:wrap; }


/* GRID: brand | center links | toggle */
.site-nav .nav-top{
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap: 12px;
  padding: 10px 0 6px;
}

.site-nav .brand a{
  color: var(--text);
  font-weight: 800;
  letter-spacing: .5px;
  text-decoration: none;
}

.site-nav .nav-center{
  display: inline-flex;
  justify-content: center;
  gap: 20px;
}
.site-nav .nav-center a{
  color: var(--text);               /* full contrast */
  text-decoration: none;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
}
.site-nav .nav-center a:hover{
  background: rgba(59,130,246,.10); /* blue tint hover */
}

.site-nav .nav-right{
  display:flex; justify-content:flex-end; align-items:center;
}
.site-nav .toggle{
  border:1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding:6px 10px; border-radius:999px; cursor:pointer;
}

/* bottom row tabs */
.site-nav .nav-bottom{
  display:flex; flex-wrap:wrap; gap:22px; justify-content:center;
  padding: 10px 0 12px;
  border-top: 1px solid var(--border);
}
.site-nav .nav-bottom a{
  position:relative; text-decoration:none;
  color: var(--muted); font-weight:600; padding:6px 2px;
}
.site-nav .nav-bottom a:hover{ color: var(--text); }
.site-nav .nav-bottom a::after{
  content:""; position:absolute; left:0; bottom:-4px; height:2px; width:0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}
.site-nav .nav-bottom a:hover::after{ width:100%; }

/* ---- Stronger light-mode contrast on the first line ---- */
html[data-theme="light"] .site-nav{
  background: #ffffff;                 /* solid white, no cloudy gradient */
  box-shadow: 0 6px 14px rgba(0,0,0,.07);
}
html[data-theme="light"] .site-nav .nav-center a{ color:#0b1220; }
html[data-theme="light"] .site-nav .toggle{ color:#0b1220; }

/* mobile */
@media (max-width: 720px){
  .site-nav .nav-top{ grid-template-columns: 70px 1fr 70px; }
  .site-nav .nav-center{ gap:14px; }
  .site-nav .nav-bottom{ gap:14px; }
}
