/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #1c2128;
  --border:    #30363d;
  --text:      #e6edf3;
  --text-muted:#8b949e;
  --accent:    #00cc6a;
  --accent2:   #00bcd4;
  --red:       #ff5555;
  --yellow:    #f0c060;
  --nav-bg:    rgba(13,17,23,0.92);
  --shadow:    0 24px 80px rgba(0,0,0,0.5);
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius:    8px;
  --max-w:     1100px;
}

[data-theme="light"] {
  --bg:        #f6f8fa;
  --bg2:       #ffffff;
  --bg3:       #eaeef2;
  --border:    #d0d7de;
  --text:      #1f2328;
  --text-muted:#57606a;
  --accent:    #0a7c3e;
  --accent2:   #0969da;
  --nav-bg:    rgba(246,248,250,0.92);
  --shadow:    0 24px 80px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--bg3); text-decoration: none; }

.nav-cta {
  background: rgba(0,255,136,0.1) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(0,255,136,0.3);
}

.nav-cta:hover { background: rgba(0,255,136,0.2) !important; }

.theme-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  margin-left: auto;
}

.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 16px;
  line-height: 1;
  transition: background 0.15s;
  opacity: 0.5;
}

.theme-btn:hover { opacity: 0.8; }
.theme-btn.active { background: var(--bg2); opacity: 1; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.nav-mobile {
  list-style: none;
  padding: 8px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
}

.nav-mobile a {
  color: var(--text-muted);
  font-size: 14px;
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
}

.nav-mobile a:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.hidden { display: none !important; }

/* ── Sections ── */
section { padding: 96px 24px; }
section:nth-child(even) { background: var(--bg2); }

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 22px;
  margin-bottom: 40px;
  color: var(--text);
}

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 56px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 48px;
}

.hero-content { flex: 1; }

.hero-pre {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.prompt { color: var(--accent); margin-right: 6px; }

#hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

#hero h2 {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 400;
  color: var(--accent2);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(0,255,136,0.06);
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent);
  color: #0d1117;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.85; text-decoration: none; }

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover { border-color: var(--accent); background: var(--bg3); text-decoration: none; }

/* ── Terminal widget ── */
.hero-terminal {
  flex: 0 0 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.terminal-bar {
  background: #1c2128;
  padding: 10px 14px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.t-red, .t-yellow, .t-green {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.t-red    { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green  { background: #28c840; }

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  min-height: 240px;
  color: #e6edf3;
  background: #0d1117;
}

.t-line { display: block; }
.t-prompt { color: var(--accent); }
.t-cmd   { color: var(--text); }
.t-out   { color: var(--text-muted); }
.t-hi    { color: var(--accent2); }
.t-warn  { color: var(--yellow); }
.t-cursor {
  display: inline-block;
  width: 9px; height: 15px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── About ── */
.about-text {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 48px;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Timeline ── */
.timeline { position: relative; padding-left: 28px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 48px;
}

.tl-dot {
  position: absolute;
  left: -25px;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(0,255,136,0.5);
}

.tl-dot-sm {
  width: 10px; height: 10px;
  left: -23px;
  background: var(--bg3);
  border-color: var(--border);
  box-shadow: none;
}

.tl-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tl-logo-wrap {
  flex-shrink: 0;
}

.tl-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  display: block;
}

.tl-role {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.tl-company {
  font-size: 13px;
  color: var(--accent2);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.tl-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 3px 10px;
  background: var(--bg3);
  border-radius: 20px;
  border: 1px solid var(--border);
}

.tl-content ul {
  list-style: none;
  padding: 0;
}

.tl-content li {
  color: var(--text-muted);
  font-size: 14px;
  padding: 3px 0 3px 16px;
  position: relative;
}

.tl-content li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
}

/* ── Achievements ── */
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.achieve-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.achieve-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}


.achieve-icon { font-size: 24px; margin-bottom: 10px; }

.achieve-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}

.achieve-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

.achieve-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent2);
}

.achieve-link {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* ── Org logo (initials fallback) ── */
.org-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.1;
}

.cert-issuer-logo,
.cert-issuer-header .org-logo {
  width: 36px;
  height: 36px;
  font-size: 10px;
}

.tl-logo-wrap .org-logo {
  width: 40px;
  height: 40px;
}

/* ── Certifications ── */
.cert-issuers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.cert-issuer-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}

.cert-issuer-card:hover { border-color: var(--accent2); }

.cert-issuer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.cert-issuer-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}

.cert-issuer-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.cert-issuer-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.cert-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(0,188,212,0.1);
  border: 1px solid rgba(0,188,212,0.3);
  border-radius: 4px;
  color: var(--accent2);
  flex-shrink: 0;
  white-space: nowrap;
}

.cert-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Education & Courses ── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.edu-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}

.edu-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edu-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.2s;
}

.edu-card:hover { border-color: var(--accent2); }

.edu-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.edu-degree {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.edu-school {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent2);
  margin-top: 3px;
}

@media (max-width: 900px) {
  .edu-grid { grid-template-columns: 1fr; }
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

/* ── Projects ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.project-card:hover { border-color: var(--accent); }

.project-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.project-icon { font-size: 28px; }

.project-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.project-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent2);
  margin-top: 2px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 10px;
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.2);
  color: var(--accent);
  border-radius: 20px;
}

/* ── Contact ── */
.contact-inner { text-align: center; }
.contact-inner .section-title { text-align: left; }

.contact-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

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

.contact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--bg3);
  text-decoration: none;
  color: var(--accent);
}

.contact-icon {
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
  width: 20px;
  text-align: center;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  #hero {
    flex-direction: column;
    padding: 96px 24px 64px;
    min-height: auto;
    gap: 40px;
  }
  .hero-terminal { flex: none; width: 100%; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  section { padding: 72px 20px; }
  .about-stats { gap: 24px; }
  .tl-content { padding: 16px; }
}
