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

/* ── Tokens: Dark ── */
:root,
[data-theme="dark"] {
  --bg:          #060810;
  --surface:     #0d1017;
  --surface-2:   #111520;
  --border:      #1a1f30;
  --border-2:    #242b42;
  --accent:      #4d8ef0;
  --accent-glow: rgba(77, 142, 240, 0.15);
  --accent-dim:  rgba(77, 142, 240, 0.08);
  --text:        #e8ecf8;
  --text-2:      #8892aa;
  --muted:       #4a5168;
  --tag-bg:      #131828;
  --tag-text:    #6a8de0;
  --btn-border:  #2a3358;
}

/* ── Tokens: Light ── */
[data-theme="light"] {
  --bg:          #f4f6fc;
  --surface:     #ffffff;
  --surface-2:   #edf0f9;
  --border:      #dde2f0;
  --border-2:    #c8d0e8;
  --accent:      #2d6ae0;
  --accent-glow: rgba(45, 106, 224, 0.12);
  --accent-dim:  rgba(45, 106, 224, 0.06);
  --text:        #111828;
  --text-2:      #4a5570;
  --muted:       #8892aa;
  --tag-bg:      #e8ecf8;
  --tag-text:    #2d6ae0;
  --btn-border:  #c0caec;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--accent); text-decoration: none; }
ul { list-style: none; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(6, 8, 16, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .navbar {
  background: rgba(244, 246, 252, 0.88);
}

.nav-logo {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--accent); }

.nav-controls { display: flex; gap: 8px; }

.ctrl-btn {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  transition: color 0.15s, border-color 0.15s;
}

.ctrl-btn:hover { color: var(--accent); border-color: var(--accent); }
.ctrl-btn.icon-only { padding: 5px 10px; }

[data-theme="dark"] .icon-sun  { display: inline; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: inline; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 100px 40px 60px;
  max-width: 1000px;
  margin: 0 auto;
}

.glow-orb {
  position: fixed;
  top: -10%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 142, 240, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
}

.hero-text { flex: 1; }

.hero-greeting {
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 8px;
  font-weight: 500;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.name-accent { color: var(--accent); }

.hero-role {
  font-size: 1.05rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-2);
  margin-bottom: 20px;
  height: 28px;
}

.typewriter { color: var(--accent); }

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.bio {
  color: var(--text-2);
  max-width: 480px;
  font-size: 0.96rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

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

.hero-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4ade80;
  letter-spacing: 0.3px;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  color: var(--text-2);
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}

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

/* ── Avatar ── */
.hero-photo {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent) 0%, #9b5cf6 100%);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(77, 142, 240, 0.08);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.avatar-label {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  letter-spacing: 0.5px;
}

/* ── Sections ── */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 40px;
}

#projects, #certs {
  max-width: 1200px;
}

.section-intro {
  text-align: center;
  margin-bottom: 48px;
}

.section-intro h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-intro p {
  font-size: 0.9rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Project Cards ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 860px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

.accent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.accent-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 30px var(--accent-glow);
  transform: translateY(-3px);
}

.card-body {
  padding: 22px 22px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-emoji { font-size: 1.2rem; line-height: 1; }

.card-title-row h3 {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.card-ext-link {
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

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

.card-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.5;
}

.card-body ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-body li {
  font-size: 0.84rem;
  color: var(--text-2);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.card-body li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}

.tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 3px 9px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Stack ── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.stack-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s;
}

.stack-item:hover { border-color: var(--accent); }

.stack-dot { display: none; }

.stack-item span {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stack-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* ── Certificates ── */
.certs-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cert-card {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cert-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.cert-left {
  width: 4px;
  background: var(--accent);
  flex-shrink: 0;
}

.cert-body {
  flex: 1;
  padding: 20px 24px;
}

.cert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cert-header h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cert-issuer {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}

.cert-date {
  color: var(--muted);
  font-style: normal;
}

.cert-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  border: 1px solid var(--border-2);
  padding: 5px 12px;
  border-radius: 6px;
  transition: color 0.15s, border-color 0.15s;
  font-family: 'JetBrains Mono', monospace;
}

.cert-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Contact ── */
.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 56px 40px;
  text-align: center;
  background-image: radial-gradient(ellipse at 50% 0%, var(--accent-dim) 0%, transparent 70%);
}

.contact-text {
  color: var(--text-2);
  font-size: 0.97rem;
  margin-bottom: 28px;
}

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

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .hero { padding: 100px 24px 60px; min-height: auto; }
  .hero-inner { flex-direction: column-reverse; align-items: center; text-align: center; }
  .bio { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .avatar-ring { width: 160px; height: 160px; }
  .section { padding: 64px 24px; }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-list { grid-template-columns: 1fr; }
  .contact-box { padding: 36px 24px; }
  .cert-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
