:root {
  --bg: #080a0e;
  --surface: #0e1117;
  --surface2: #141824;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #e8eaf0;
  --muted: #7a8090;
  --accent: #4fffb0;
  --accent2: #4fc3ff;
  --accent3: #ff7eb6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Syne", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.hdr-left {
  justify-self: start;
}

.hdr-center {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hdr-right {
  justify-self: end;
}

.toggle-container {
  width: 80px;
  height: 36px;
  background: var(--surface2);
  border-radius: 18px;
  cursor: pointer;
  border: 1px solid var(--border);
  position: relative;
}

#toggle-ball {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: left 0.3s ease;
}

.toggle-container.active #toggle-ball {
  left: 46px;
}

.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.profile-info {
  text-align: center;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.profile-dept {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  font-family: "Space Mono", monospace;
  font-weight: 400;
}

.profile-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
  background: rgba(79, 255, 176, 0.08);
  border: 1px solid rgba(79, 255, 176, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 17px;
  transition: all 0.2s;
  text-decoration: none;
  background: var(--surface2);
}

.nav-links a:hover {
  color: var(--accent);
  border-color: rgba(79, 255, 176, 0.3);
  background: rgba(79, 255, 176, 0.06);
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

.sec-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.about-body {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.about-text {
  flex: 2;
  min-width: 200px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 400;
}

.stats-col {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  font-family: "Space Mono", monospace;
}

.stat-lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.t-item {
  display: flex;
  gap: 16px;
}

.t-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}

.t-line {
  width: 1px;
  flex: 1;
  background: var(--border);
  margin: 4px 0;
  min-height: 20px;
}

.t-item:last-child .t-line {
  display: none;
}

.t-content {
  padding-bottom: 24px;
  flex: 1;
}

.t-header {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.t-role {
  font-size: 15px;
  font-weight: 700;
}

.chip {
  font-size: 11px;
  font-family: "Space Mono", monospace;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid;
  font-weight: 400;
}

.chip-mobile {
  color: #4fc3ff;
  border-color: rgba(79, 195, 255, 0.3);
  background: rgba(79, 195, 255, 0.07);
}

.chip-backend {
  color: #ff7eb6;
  border-color: rgba(255, 126, 182, 0.3);
  background: rgba(255, 126, 182, 0.07);
}

.chip-year {
  color: var(--muted);
  border-color: var(--border);
  background: var(--surface2);
}

.t-company {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.t-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 6px;
  font-weight: 400;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.proj-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    border-color 0.2s,
    transform 0.2s;
  position: relative;
  overflow: hidden;
}

.proj-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.2s;
}

.proj-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.proj-card:hover::before {
  opacity: 1;
}

.proj-card:hover .proj-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.proj-tag {
  font-size: 10px;
  font-family: "Space Mono", monospace;
  padding: 2px 8px;
  border-radius: 20px;
  align-self: flex-start;
  font-weight: 400;
}

.tag-ml {
  background: rgba(79, 255, 176, 0.1);
  color: var(--accent);
  border: 1px solid rgba(79, 255, 176, 0.2);
}

.tag-fullstack {
  background: rgba(79, 195, 255, 0.1);
  color: var(--accent2);
  border: 1px solid rgba(79, 195, 255, 0.2);
}

.tag-data {
  background: rgba(255, 126, 182, 0.1);
  color: var(--accent3);
  border: 1px solid rgba(255, 126, 182, 0.2);
}

.proj-name {
  font-size: 15px;
  font-weight: 700;
}

.proj-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  font-weight: 400;
}

.proj-arrow {
  align-self: flex-end;
  font-size: 14px;
  color: var(--muted);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all 0.2s;
}

.certs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}

.cert-card:hover {
  border-color: var(--border-hover);
}

.cert-name {
  font-size: 14px;
  font-weight: 600;
}

.cert-issuer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}

.cert-badge {
  margin-left: auto;
  font-size: 10px;
  font-family: "Space Mono", monospace;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(79, 255, 176, 0.08);
  color: var(--accent);
  border: 1px solid rgba(79, 255, 176, 0.2);
  white-space: nowrap;
  font-weight: 400;
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s;
}
.skill-pill:hover {
  border-color: var(--border-hover);
}
.skill-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.skill-pill i {
  font-size: 20px;
}

@media (max-width: 620px) {
  header {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hdr-left,
  .hdr-center,
  .hdr-right {
    justify-self: center;
  }
  .about-body {
    flex-direction: column;
  }
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}