:root {
  --bg: #0d0c1d;
  --bg-elev: #161b33;
  --text: #e6e8ef;
  --muted: #aab0c0;
  --line: #2a2f52;
  --primary: #474973; /* indigo */
  --accent: #73d2de;  /* cyan */
  --success: #10b981;
  --blue: #3b82f6;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

:root.theme-light {
  --bg: #ffffff;
  --bg-elev: #f5f7fb;
  --text: #0e1222;
  --muted: #4a5165;
  --line: #e6e8ef;
  --primary: #3740a0;
  --accent: #0ea5b7;
  --shadow: 0 10px 24px rgba(0,0,0,.1);
}

.container {
  max-width: 1250px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  margin-top: 150px; /* Increase this value for more space below header */
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, #15193b 0%, transparent 60%), var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); font-weight: 600;  }
h3 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--text); opacity: .9; }

.section {
  padding: 72px 20px;
  border-top: 1px solid var(--line);
}
.section:nth-child(even) { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%); }
.section:nth-child(odd) { background: var(--bg); }




.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(13,12,29,0.85); /* semi-transparent for effect */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}



.logo {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent, #4fd1c5);
  letter-spacing: 1px;
  text-decoration: none; /* Prevent underline */
}

.site-nav {
  display: flex;
  gap: 22px;
  padding: 0; /* Remove nav padding and border */
  border: none;
  background: transparent;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 500;
  padding: 6px 14px;
  border: 2px dotted var(--accent, #4fd1c5); /* Dotted border for each link */
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  color: var(--accent);
  background: rgba(79, 209, 197, 0.08);
  border-color: var(--blue);
}


.theme-toggle {
  margin-left: 24px;
}







.icon-sun::before { content: "☀️"; }
:root.theme-light .icon-sun::before { content: "🌙"; }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.hero__content .subtitle { color: var(--muted); margin: .6rem 0 1rem; }
.stack-chips { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack-chips li {
  font: 600 12px/1 JetBrains Mono, monospace; color: var(--text);
  border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; opacity: .9;
}
.badges .badge {
  display: inline-block; font: 600 12px/1 JetBrains Mono, monospace; color: var(--bg);
  background: linear-gradient(90deg, var(--accent), var(--blue)); padding: 8px 10px; border-radius: 8px; text-decoration: none;
}

.profile-photo,
.hero__image img {
  width: 250px;
  height: 250px;
  object-fit: cover;      /* Crops and centers the image */
  border-radius: 50%;     /* Makes it perfectly round */
  box-shadow: 0 4px 24px rgba(60, 80, 180, 0.10);
  border: 3px solid var(--accent, #4fd1c5);
  display: block;
  margin: 0 auto;
  background: #181a20;
}

.btn { display: inline-block; text-decoration: none; border-radius: 10px; padding: 10px 14px; transition: transform .15s ease, box-shadow .15s ease; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary { border: 1px solid var(--line); color: var(--text); }
.btn + .btn { margin-left: 8px; }

.bullets { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.skills-grid, .projects-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow);
}
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card__list { margin: 10px 0 0 18px; color: var(--muted); }

.project { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg-elev); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.tags li { font: 600 11px/1 JetBrains Mono, monospace; color: var(--accent); border: 1px dashed var(--accent); padding: 4px 8px; border-radius: 999px; }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.cert { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); border: 1px solid var(--line); padding: 12px; border-radius: 12px; background: var(--bg-elev); }
.cert img { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--line); }

.contact-list { list-style: none; padding: 0; margin: 0 0 14px; color: var(--muted); }
.contact-form { display: grid; gap: 10px; max-width: 640px; }
.contact-form label { display: grid; gap: 6px; font-size: .95rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px;
}

.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text);
  border-radius: 999px; width: 44px; height: 44px; cursor: pointer; display: none;
}

.site-footer {
  padding: 24px 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; background: var(--bg);
}

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}

/* ...existing code... */

/* Skills Card Improvements */


.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns for 2 rows with 6 cards */
  gap: 2rem;
  margin: 2rem auto 0 auto;
  max-width: 1100px;
  padding: 0 32px; /* horizontal padding */
}



.card {
  background: var(--card-bg, #23272f);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(60, 80, 180, 0.10);
  padding: 1.5rem 1.2rem;
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 8px 32px rgba(60, 80, 180, 0.18);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  color: var(--accent, #4fd1c5);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Alternate card backgrounds and accent colors */
.skills-grid .card:nth-child(1) {
  --card-bg: #23272f;
  --accent: #4fd1c5;
}
.skills-grid .card:nth-child(2) {
  --card-bg: #1a202c;
  --accent: #f6ad55;
}
.skills-grid .card:nth-child(3) {
  --card-bg: #23272f;
  --accent: #10b981;
}
.skills-grid .card:nth-child(4) {
  --card-bg: #1a202c;
  --accent: #3b82f6;
}
.skills-grid .card:nth-child(5) {
  --card-bg: #23272f;
  --accent: #f472b6;
}
.skills-grid .card:nth-child(6) {
  --card-bg: #1a202c;
  --accent: #f59e42;
}
.skills-grid .card:nth-child(7) {
  --card-bg: #23272f;
  --accent: #a78bfa;
}

/* ...existing code... */



.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem; /* more space between projects */
  max-width: 1100px;
  margin: 2rem auto 0 auto;
  padding: 0 32px;
}

.project {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.2rem;
  box-shadow: 0 2px 12px rgba(60, 80, 180, 0.08);
  margin-bottom: 0;
  position: relative;
}

.project-org {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent, #4fd1c5);
  margin-bottom: 0.5rem;
  display: block;
}

.experience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem; /* Adds space between cards */
  margin-top: 1.5rem;
}

.section {
  padding: 72px 20px;
  border-top: 1px solid var(--line);
}
.contact-form {
  background: var(--bg-elev);
  padding: 2rem 2rem 1.5rem 2rem;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(60, 80, 180, 0.08);
  max-width: 480px;
  margin: 2rem auto;
}

.contact-form input,
.contact-form textarea {
  background: #23272f;
  color: var(--text);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 12px;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #4fd1c5;
  outline: none;
}

.contact-form button {
  background: linear-gradient(90deg, #4fd1c5, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(60, 80, 180, 0.10);
  transition: background 0.2s;
  max-width: 140px;      /* Limit button width */
  margin: 0 auto;        /* Center the button */
  display: block;
}

.contact-form button:hover {
  background: linear-gradient(90deg, #3b82f6, #4fd1c5);
}

.cert {
  min-width: 0;
  max-width: 340px;
  padding: 16px;
  font-size: 1rem;
}
.cert img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.btn-verify {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.95rem;
  padding: 7px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #4fd1c5, #3b82f6);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 8px rgba(60, 80, 180, 0.10);
  transition: background 0.2s;
}
.btn-verify:hover {
  background: linear-gradient(90deg, #3b82f6, #4fd1c5);
}

.contact-info {
  margin-bottom: 2rem;
  background: var(--bg-elev);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  box-shadow: 0 2px 8px rgba(60, 80, 180, 0.08);
}
.contact-list li {
  margin-bottom: 8px;
  font-size: 1rem;
}
.contact-list a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}
.contact-list a:hover {
  color: var(--blue);
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.logo {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent, #4fd1c5);
  letter-spacing: 1px;
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  margin-left: 24px;
}

/* Responsive container and section padding */
@media (max-width: 900px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
    margin-top: 110px;
  }
  .section {
    padding: 48px 8px;
  }
}

/* Responsive header/nav */
@media (max-width: 700px) {
  .header-flex {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8px;
    position: relative;
  }
  .logo {
    font-size: 1.4rem;
    margin-bottom: 0;
    margin-right: 12px;
  }
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
   .site-nav {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--bg-elev);
    flex-direction: column;
    gap: 12px;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    z-index: 99;
  }
  .site-nav.open {
    display: flex;
  }
}

/* Responsive grids */
@media (max-width: 900px) {
  .skills-grid,
  .projects-grid,
  .cert-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0;
  }
}

@media (max-width: 600px) {
  .container {
    padding-left: 4px;
    padding-right: 4px;
    margin-top: 70px;
  }
  .section {
    padding: 32px 2px;
  }
  .skills-grid,
  .projects-grid,
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .profile-photo,
  .hero__image img {
    width: 140px;
    height: 140px;
  }
  .contact-form {
    padding: 1rem 0.5rem;
    max-width: 100%;
  }
}

/* Make images and cards scale */
img, .profile-photo {
  max-width: 100%;
  height: auto;
}
.card, .project, .cert {
  min-width: 0;
  word-break: break-word;
}

/* Hamburger button styles */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto; /* Push hamburger to the right */
  margin-right: 0;
}
.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--accent, #4fd1c5);
  border-radius: 2px;
}

/* Responsive nav */
@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    position: absolute;
    top: 60px;
    right: 16px;
    background: var(--bg-elev);
    flex-direction: column;
    gap: 12px;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    display: none;
    z-index: 99;
  }
  .site-nav.open {
    display: flex;
  }
  .header-flex {
    position: relative;
  }
}