/* =============================
     VLSI Theme
     ============================= */
  :root{
    --space-900:#0A0E1F; --space-800:#0F1629;
    --bg: var(--space-900);
    --text:#E2E8F0; --heading:#F1F5F9; --muted:#94A3B8;

    --accent:#06B6D4; --accent-2:#0EA5E9;
    --accent-purple:#8B5CF6;

    --card:rgba(15,22,41,.60);
    --border:rgba(148,163,184,.15);
    --shadow:0 28px 60px rgba(0,6,22,.55);
    --glass-blur:12px;

    --radius-md:16px; --radius-pill:9999px; --nav-h:70px;

    --hover-glow: rgba(6,182,212,.40);
    --glow:0 0 30px var(--hover-glow);

    --easing:cubic-bezier(.2,.65,.2,1); --dur:280ms;
    --hero-nudge: 22px;
  }
  @media (max-width:768px){ :root{ --hero-nudge: 14px; } }

  html[data-theme="light"]{
    --bg:#FFFFFF;
    --text:#1E293B;
    --heading:#0F172A;
    --muted:#475569;

    --accent:#0891B2;
    --accent-2:#06B6D4;

    --card: rgba(255,255,255,.75);
    --border: rgba(0,0,0,.15);
    --shadow: 0 18px 40px rgba(10,10,20,.12);
    --hover-glow: rgba(8,145,178,.45);
    --glow:0 0 36px var(--hover-glow);
  }

  *{ box-sizing:border-box; margin:0; padding:0; }
  html, body{
    color:var(--text); background:var(--bg);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    line-height:1.6; scroll-behavior:smooth;
    text-rendering: optimizeLegibility;
  }

  html{ scroll-padding-top: var(--nav-h); }

  h1,h2,h3{
    font-family:"Space Grotesk", Inter, system-ui, sans-serif;
    letter-spacing:.2px;
    color:var(--heading);
    font-weight:700;
  }
  a{ color:var(--accent); text-decoration:none; transition: filter var(--dur) var(--easing) }
  a:hover{ filter: brightness(1.15) }
  .container{ width:100%; max-width:1140px; margin:0 auto; padding:0 1.2rem }

  /* Background gradients */
  body{
    position: relative;
    background:
      radial-gradient(1200px 700px at 50% -260px, rgba(6,182,212,.15), transparent 70%),
      linear-gradient(180deg, #0A0E1F 0%, #0A0E1F 60%, #0D1323 100%);
  }
  html[data-theme="light"] body{
    background:
      radial-gradient(700px 450px at 80% -12%, rgba(6,182,212,.08), transparent 72%),
      linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 60%);
  }

  nav, header, main, footer { position: relative; z-index: 1; }

  /* =============================
     HAMBURGER NAVIGATION
     ============================= */
  .nav-wrap{
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 1000; 
    display:flex; align-items:center; 
    background: transparent;
    padding:.6rem 0;
    transition: background 280ms var(--easing);
  }
  
  body.nav-scrolled .nav-wrap{
    background: linear-gradient(180deg, rgba(10,14,31,.95), rgba(15,22,41,.85));
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
  }

  .nav-container{
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-brand{
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1001;
  }

  .nav-controls{
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1001;
  }

  /* Hamburger button */
  .hamburger{
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0;
    z-index: 1001;
  }

  .hamburger span{
    display: block;
    width: 100%;
    height: 2px;
    background: var(--heading);
    border-radius: 2px;
    transition: all 280ms var(--easing);
  }

  .hamburger.active span:nth-child(1){
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2){
    opacity: 0;
  }

  .hamburger.active span:nth-child(3){
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile menu overlay */
  .nav-menu{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10,14,31,.98), rgba(15,22,41,.95));
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms var(--easing);
    z-index: 999;
    padding-top: var(--nav-h);
  }

  html[data-theme="light"] .nav-menu{
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95));
  }

  .nav-menu.active{
    opacity: 1;
    pointer-events: all;
  }

  .nav-menu a{
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--heading);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    transition: all 280ms var(--easing);
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .nav-menu a:hover{
    background: rgba(6,182,212,.2);
    color: var(--accent);
    transform: translateX(5px);
  }

  /* Theme toggle button */
  .theme-toggle{
    width:40px; height:40px; display:flex; align-items:center; justify-content:center;
    border:none; background:rgba(6,182,212,.15); color:var(--accent);
    border-radius:50%; cursor:pointer;
    transition: all var(--dur) var(--easing);
  }
  .theme-toggle:hover{ background:rgba(6,182,212,.25); transform:rotate(20deg) }
  .theme-toggle svg{ width:20px; height:20px }

  /* =============================
     HERO SECTION
     ============================= */
  .hero{
    min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; padding:calc(var(--nav-h) + 2rem) 1.2rem 4rem; position: relative;
  }
  
  .profile-image{
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 4px solid var(--accent);
    box-shadow: 0 8px 32px rgba(6,182,212,.4), 0 0 0 8px rgba(6,182,212,.1);
    transition: all var(--dur) var(--easing);
    background: var(--card);
  }
  
  .profile-image:hover{
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(6,182,212,.5), 0 0 0 12px rgba(6,182,212,.15);
  }
  
  .profile-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .logo-name{
    font-size:clamp(2rem, 5vw, 3.5rem); font-weight:800; margin-bottom:.3rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent;
    background-clip:text;
  }
  .logo-subtitle{
    font-size:1.2rem; color:var(--muted); margin-bottom:1.5rem; letter-spacing:1px; text-transform:uppercase;
  }
  .hero h2{
    font-size:clamp(1.15rem, 2.5vw, 1.5rem); max-width:700px; color:var(--text); margin:0 auto 2rem; font-weight:500;
  }

  /* CTA buttons */
  .cta-row{
    display:flex; gap:1rem; flex-wrap:wrap; justify-content:center; margin-bottom:3rem;
  }
  .btn{
    display:inline-block; padding:.9rem 2rem; border-radius:var(--radius-md);
    font-weight:600; background:linear-gradient(135deg, var(--accent), var(--accent-2));
    color:#fff; border:none; cursor:pointer; transition: all var(--dur) var(--easing);
    box-shadow: 0 6px 20px rgba(6,182,212,.35);
  }
  .btn:hover{ transform:translateY(-3px); box-shadow:0 10px 28px rgba(6,182,212,.5) }
  .btn.outline{
    background:transparent; color:var(--accent);
    border:2px solid var(--accent); box-shadow:none;
  }
  .btn.outline:hover{ background:rgba(6,182,212,.10) }

  /* Stats cards */
  .stats-grid{
    display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
    gap:1.5rem; max-width:600px; margin:0 auto;
  }
  .stat-card{
    background:var(--card); backdrop-filter:blur(var(--glass-blur));
    border:1px solid var(--border); border-radius:var(--radius-md);
    padding:1.5rem; text-align:center; box-shadow:var(--shadow);
    transition: all var(--dur) var(--easing);
  }
  .stat-card:hover{ transform:translateY(-4px); box-shadow:var(--glow), var(--shadow) }
  .stat-number{ font-size:2.5rem; font-weight:800; color:var(--accent); line-height:1 }
  .stat-label{ margin-top:.5rem; color:var(--muted); font-size:.9rem; text-transform:uppercase; letter-spacing:.5px }

  /* =============================
     SECTIONS
     ============================= */
  section{
    padding:5rem 0; position:relative; overflow:hidden;
  }
  .section-inner{ max-width:1140px; margin:0 auto; padding:0 1.2rem }
  .section-title{
    font-size:clamp(2rem, 4vw, 2.75rem); text-align:center; margin-bottom:3rem;
  }

  /* Card Grid */
  .cards{
    display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
    gap:2rem;
  }
  .card{
    background:var(--card); backdrop-filter:blur(var(--glass-blur));
    border:1px solid var(--border); border-radius:var(--radius-md);
    padding:1.8rem; box-shadow:var(--shadow);
    transition: all var(--dur) var(--easing);
  }
  .card:hover{ transform:translateY(-6px); box-shadow:var(--glow), var(--shadow) }
  .card h3{ margin-bottom:1rem; font-size:1.4rem }
  .card p{ color:var(--muted) }

  /* Project Images - FIXED FOR DESKTOP */
  .project-image{
    width:100%; 
    height: 200px;
    border-radius:12px; 
    overflow:hidden; 
    margin-bottom:1.2rem;
    background: rgba(6,182,212,.05);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .project-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }

  /* Project metadata grid */
  .project-meta{
    display:grid; grid-template-columns:repeat(2, 1fr); gap:.8rem;
    margin:1rem 0;
  }
  .metric-item{ text-align:center }
  .metric-value{ font-weight:700; color:var(--accent); font-size:.95rem }
  .metric-label{ font-size:.8rem; color:var(--muted); margin-top:.2rem }

  /* Pills/Tags */
  .pills{
    display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1rem;
  }
  .pill{
    display:inline-block; padding:.4rem .9rem; border-radius:var(--radius-pill);
    background:rgba(6,182,212,.15); color:var(--accent);
    font-size:.85rem; font-weight:500; border:1px solid rgba(6,182,212,.25);
  }

  /* Timeline for Experience */
  .timeline{
    max-width:900px; margin:0 auto; position:relative; padding-left:40px;
  }
  .timeline::before{
    content:''; position:absolute; left:0; top:0; bottom:0; width:2px;
    background:linear-gradient(180deg, transparent, var(--accent), transparent);
  }
  .timeline-item{
    position:relative; padding-left:30px; margin-bottom:2.5rem;
  }
  .timeline-item::before{
    content:''; position:absolute; left:-44px; top:12px;
    width:12px; height:12px; border-radius:50%;
    background:var(--accent); border:3px solid var(--bg);
    box-shadow: 0 0 0 4px rgba(6,182,212,.2);
  }

  /* Certifications Grid */
  .cert-grid{
    display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
    gap:2rem;
  }
  .cert-card{
    display:flex; flex-direction:column;
  }
  .cert-image{
    width:100%; 
    height:180px;
    border-radius:12px; 
    overflow:hidden; 
    margin-bottom:1rem;
    background: rgba(6,182,212,.05);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cert-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }
  .cert-status{
    font-size:.85rem; color:var(--muted); margin-bottom:.5rem; text-transform:uppercase; letter-spacing:.5px;
  }
  .cert-title{
    font-size:1.15rem; margin-bottom:.75rem; line-height:1.4;
  }
  .cert-meta{
    color:var(--muted); font-size:.95rem; line-height:1.6; flex-grow:1; margin-bottom:1rem;
  }
  .cert-tag{
    display:inline-block; padding:.4rem .9rem; border-radius:var(--radius-pill);
    background:rgba(139,92,246,.15); color:var(--accent-purple);
    font-size:.85rem; font-weight:500; border:1px solid rgba(139,92,246,.25);
  }

  /* Reveal Animations */
  .reveal{ opacity:1; transform:none; transition: opacity var(--dur) var(--easing), transform var(--dur) var(--easing) }
  .reveal.is-hidden{ opacity:0; transform: translateY(40px) }
  .reveal.is-visible{ opacity:1; transform:none }

  /* Footer */
  footer{ text-align:center; padding:2rem 1rem; color:var(--muted); border-top:1px solid var(--border) }

  /* Go to Top Button */
  .go-to-top{
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(6,182,212,.35);
    opacity: 0;
    pointer-events: none;
    transition: all var(--dur) var(--easing);
    z-index: 999;
  }
  .go-to-top.visible{
    opacity: 1;
    pointer-events: all;
  }
  .go-to-top:hover{
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(6,182,212,.5);
  }

  /* Responsive adjustments */
  @media (max-width:768px){
    .stats-grid{ grid-template-columns: repeat(2, 1fr) }
    .timeline{ padding-left:20px }
    .timeline-item{ padding-left:20px }
    .timeline-item::before{ left:-33px }
  }

  @media (max-width:600px){
    .project-meta{ grid-template-columns: 1fr }
  }

  @media (prefers-reduced-motion:reduce){
    *{ transition:none !important; animation:none !important }
  }
  /* =============================
   Featured Blog Posts Grid
   ============================= */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  /* Inherits from .card styling already in your CSS */
  display: flex;
  flex-direction: column;
}

.blog-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.blog-card .btn {
  margin-top: auto; /* Pushes button to bottom */
  width: fit-content;
}

/* View All Card - spans full width */
.view-all-card {
  grid-column: 1 / -1; /* Spans both columns */
  background: linear-gradient(135deg, 
    rgba(6,182,212,.12) 0%, 
    rgba(14,165,233,.08) 100%);
  border: 2px solid rgba(6,182,212,.25);
  transition: all var(--dur) var(--easing);
}

.view-all-card:hover {
  border-color: rgba(6,182,212,.45);
  background: linear-gradient(135deg, 
    rgba(6,182,212,.18) 0%, 
    rgba(14,165,233,.12) 100%);
}

.view-all-card h3 {
  font-size: 1.75rem;
}

/* Light theme adjustments */
html[data-theme="light"] .view-all-card {
  background: linear-gradient(135deg, 
    rgba(8,145,178,.10) 0%, 
    rgba(6,182,212,.06) 100%);
  border-color: rgba(8,145,178,.30);
}

html[data-theme="light"] .view-all-card:hover {
  border-color: rgba(8,145,178,.50);
  background: linear-gradient(135deg, 
    rgba(8,145,178,.15) 0%, 
    rgba(6,182,212,.10) 100%);
}

/* Responsive - stack on mobile */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .view-all-card {
    grid-column: 1; /* No spanning needed in single column */
  }
}