:root {
  --bg: #0f1724;
  --card: #0b1220;
  --text: #e6eef8;
  --muted: #94a3b8;
  --accent: #06b6d4;
  --glass: rgba(255, 255, 255, 0.03);
}

:root.light {
  --bg: #f7fafc;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #475569;
  --accent: #06b6d4;
  --glass: rgba(2, 6, 23, 0.03);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--bg), #071020 80%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === HERO === */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px 20px;
  text-align: center;
  min-height: auto;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.hero-inner {
  max-width: 960px;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.hero-image img {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
  display: block;
  margin: 0 auto 18px;
}

.hero-title {
  font-size: 32px;
  margin: 0 0 8px;
}

.hero-sub {
  margin: 0 0 12px;
  color: var(--muted);
}

.hero-quote {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero-links {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.no-hero-page::before,
.no-hero-page header::before,
.no-hero-page main::before {
    content: none !important;
    display: none !important;
}


/* === CONTAINERS / SECTIONS === */
.container {
  max-width: 1000px;
  margin: 24px auto;
  padding: 0 20px;
}

.section {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.chips span {
  display: inline-block;
  background: var(--glass);
  padding: 6px 10px;
  border-radius: 999px;
  margin: 6px;
  color: var(--muted);
}

/* === STACKED SECTIONS === */
.section.stacked {
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color, #1c2735);
  background: none;
}

.section.stacked h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

#about h3 {
  text-align: center;
  margin-bottom: 10px;
}

.section.stacked p {
  text-align: center;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 20px auto;
}

.section.stacked ul {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.section.stacked ul li {
  margin: 8px 0;
  background: var(--card);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chips span {
  background: var(--glass);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* === CARDS === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.card h3 {
  margin: 0 0 8px;
}

.btn {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #042027;
  text-decoration: none;
  font-weight: 600;
}

/* === NOTES & COMMANDS === */
.notes li {
  margin: 8px 0;
}

.cmd {
  background: rgba(0, 0, 0, 0.12);
  padding: 14px;
  border-radius: 8px;
  overflow: auto;
  color: var(--muted);
}

/* === FOOTER === */
.site-footer {
  padding: 18px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* === RESPONSIVENESS === */
@media (max-width: 900px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-image img {
    width: 140px;
    height: 140px;
  }
}

/* === UTILITIES === */
a {
  color: var(--accent);
}

.center {
  text-align: center;
}

.centered-badges {
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.muted {
  color: var(--muted);
}

blockquote {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 8px auto;
  max-width: 700px;
}

/* === CERTIFICATIONS === */
#certifications {
  margin: 60px auto;
  max-width: 900px;
  padding: 0 20px;
  text-align: center;
}

#certifications h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: var(--text);
}

.cert-section {
  margin-bottom: 40px;
}

.cert-section h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 5px;
}

.cert-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.cert-item {
  background: var(--card);
  border-radius: 12px;
  padding: 15px;
  width: 220px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cert-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.cert-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.cert-item p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* === HERO ALIGNMENT FIX === */
.hero,
.platform-hero,
.writeups-hero,
.exploit-hero,
.ctf-hero,
.section-hero {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 10px !important;
  padding: 40px 20px 12px !important;
}

.hero h1,
.platform-hero h1,
.writeups-hero h1,
.exploit-hero h1,
.ctf-hero h1,
.section-hero h1 {
  margin: 0 !important;
  width: 100% !important;
  line-height: 1.1 !important;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem) !important;
}

.hero p,
.platform-hero p,
.writeups-hero p,
.exploit-hero p,
.ctf-hero p,
.section-hero p {
  margin: 0 !important;
  max-width: 860px !important;
  width: 100% !important;
  color: var(--muted) !important;
  line-height: 1.45 !important;
}

.flag {
  background: rgba(0, 255, 128, 0.12);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: monospace;
  text-align: center;
  color: #00ff88;
  font-weight: bold;
  margin: 16px 0;
  border: 1px solid rgba(0, 255, 128, 0.2);
}

.award-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: opacity 0.2s ease;
}

.award-link:hover {
  opacity: 0.8;
}

.info-icon {
    display: inline-block;
    width: 17px;
    height: 17px;
    line-height: 17px;
    border-radius: 50%;
    background: var(--accent);
    color: #041f27;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    margin-left: 8px;
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-4px);
}

.tooltip {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.15s ease;
    z-index: 100;
}

/* =========================
   MOBILE FIXES (<= 768px)
   ========================= */
@media (max-width: 768px) {

  /* HERO */
  .hero {
    min-height: auto;
    padding: 64px 16px 40px;
    text-align: center;
  }

  .hero-inner {
    max-width: 100%;
  }

  .hero-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-top: 8px;
  }

  /* HERO BUTTONS */
  .hero-links {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 24px;
  }

  .hero-links .btn {
    width: 100%;
    justify-content: center;
  }

  /* ABOUT GRID */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* TECH STACK BADGES */
  .centered-badges {
    justify-content: center;
  }

  .centered-badges img {
    max-width: 100%;
  }

  /* SECTIONS */
  .section {
    padding: 28px 16px;
  }

  /* CATEGORIES CHIPS */
  .chips {
    justify-content: center;
    gap: 8px;
  }

  .chips span {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  /* COMMANDS */
  pre.cmd {
    font-size: 0.8rem;
    overflow-x: auto;
  }
}
