:root {
  --bg: #0B0F19;
  --surface: #1B233A;
  --text: #E7EBF5;
  --text-muted: #8993AD;
  --accent: #6C8CFF;
  --border: #2a3350;
}

:root.light {
  --bg: #F5F7FB;
  --surface: #FFFFFF;
  --text: #1A1F2E;
  --text-muted: #5C6478;
  --accent: #4A63D6;
  --border: #DDE2EE;
}

* {
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, sans-serif;
  padding: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

h1 {
  font-size: 48px;
  font-weight: bold;
  letter-spacing: -1px;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--accent);
}

h2 {
  font-size: 24px;
  margin-top: 0;
  color: var(--accent);
}

header p {
  font-size: 18px;
  color: var(--text-muted);
}

section {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.6s ease-in;
}

a {
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: monospace;
  font-weight: 700;
  font-size: 16px;
}

.logo span {
  font-weight: 400;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}

nav a:hover {
  color: var(--text);
}

#themeToggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
}

.hero {
  min-height: calc(100vh - 65px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}

.kicker {
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-text h1 {
  font-size: 44px;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--text);
}

.hero-text h1 span {
  color: var(--accent);
}

.hero-role {
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 42ch;
  margin-bottom: 24px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-social {
  display: flex;
  gap: 16px;
}

.hero-social a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.hero-social a:hover {
  color: var(--accent);
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
}

.panel-tag {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.code-block {
  font-family: monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
  white-space: pre-wrap;
  margin-bottom: 16px;
}

.hero-photo-wrap {
  text-align: center;
}

.hero-photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 60%;
  border-radius: 10px;
  border: 2px solid var(--accent);
  display: block;
}

.photo-caption {
  font-family: monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-cta, .hero-social {
    justify-content: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  body { padding: 20px; }
  h1 { font-size: 32px; }
  h2 { font-size: 20px; }
  nav { flex-wrap: wrap; gap: 14px; }
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.cert-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cert-card:hover {
  border-color: var(--accent);
}

.cert-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.cert-info {
  padding: 10px 12px;
}

.cert-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.cert-org {
  font-size: 12px;
  color: var(--text-muted);
}

.section-title {
  color: var(--text);
  font-size: 32px;
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--accent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 20px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.highlight-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.highlight-item p {
  font-size: 13px;
  color: var(--text-muted);
}

.skills-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.skill-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.skill-symbol {
  font-family: monospace;
  color: var(--accent);
  font-size: 13px;
  display: block;
  margin-bottom: 12px;
}

.skill-item-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}

.skill-item-card p {
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}