* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #0d1117;
  color: #c9d1d9;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  font-size: 15px;
}

body.light {
  background: #ffffff;
  color: #24292f;
}

body.light .top-nav,
body.light .card,
body.light .nav-links {
  background: #f6f8fa;
  border-color: #d0d7de;
}

body.light .nav-links a,
body.light .sub-text,
body.light .info-item,
body.light .typewriter {
  color: #57606a;
}

body.light input,
body.light textarea {
  background: #ffffff;
  border-color: #d0d7de;
  color: #24292f;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 50px 0;
}

/* Nav bar */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  z-index: 99;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  font-family: monospace;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 15px;
}

.nav-links a {
  color: #8b949e;
  text-decoration: none;
  font-size: 14px;
}

.nav-links a:hover {
  color: #58a6ff;
}

.nav-btns button {
  background: none;
  border: 1px solid #30363d;
  color: inherit;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggler {
  display: none;
}

/* Hero */
.hero {
  padding-top: 100px;
  padding-bottom: 40px;
}

.status-pill {
  display: inline-block;
  font-size: 12px;
  color: #8b949e;
  border: 1px solid #30363d;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #238636;
  border-radius: 50%;
  margin-right: 4px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
}

.highlight {
  color: #a371f7;
}

.typewriter {
  font-size: 1.4rem;
  color: #8b949e;
  margin: 5px 0 15px;
}

.blink {
  animation: blink 0.8s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.bio-lead {
  color: #8b949e;
  margin-bottom: 20px;
  max-width: 520px;
}

.cta-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  padding: 7px 15px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-main {
  background: #8957e5;
  color: #fff;
}

.btn-outline {
  border: 1px solid #30363d;
  color: inherit;
  background: none;
}

.btn-block {
  width: 100%;
}

.socials {
  display: flex;
  gap: 12px;
}

.socials a {
  color: #8b949e;
  font-size: 16px;
}

/* Content & Grids */
.heading {
  margin-bottom: 20px;
}

.heading .sub {
  color: #a371f7;
  font-size: 11px;
  text-transform: uppercase;
  font-family: monospace;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
}

.card-icon {
  font-size: 18px;
  color: #a371f7;
  margin-bottom: 6px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
}

/* Skills */
.skill-row {
  margin-bottom: 12px;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.track {
  height: 5px;
  background: #21262d;
  border-radius: 2px;
}

.fill {
  height: 100%;
  background: #8957e5;
  width: 0;
  transition: width 0.5s ease;
}

/* Projects */
.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 15px;
}

.filter-btn {
  background: none;
  border: 1px solid #30363d;
  color: #8b949e;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
}

.filter-btn.active {
  background: #8957e5;
  color: #fff;
  border-color: transparent;
}

.p-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.p-banner {
  height: 90px;
  padding: 8px;
}

.b-1 { background: #1f6beb; }
.b-2 { background: #238636; }
.b-3 { background: #da3633; }

.p-banner .badge {
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
}

.p-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.p-content p {
  color: #8b949e;
  font-size: 13px;
  margin: 6px 0 10px;
  flex: 1;
}

.tags {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.tags span {
  font-size: 10px;
  background: #21262d;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
}

.btn-text {
  background: none;
  border: none;
  color: #58a6ff;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

/* Contact Form */
.info-list {
  margin-top: 10px;
}

.info-item {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #8b949e;
  margin-bottom: 8px;
  font-size: 13px;
}

.form-field {
  margin-bottom: 10px;
}

.form-field label {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  color: inherit;
  padding: 6px;
  border-radius: 4px;
  outline: none;
}

.err-text {
  color: #f85149;
  font-size: 11px;
  display: none;
}

.form-field.has-error .err-text {
  display: block;
}

.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #f85149;
}

/* Modal */
.modal-wrapper {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: 0.15s;
  z-index: 100;
}

.modal-wrapper.open {
  visibility: visible;
  opacity: 1;
}

.modal-body {
  width: 90%;
  max-width: 380px;
  position: relative;
}

.modal-x {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}

.footer {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #30363d;
  color: #8b949e;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 700px) {
  .menu-toggler {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 160px;
    background: #161b22;
    border: 1px solid #30363d;
    flex-direction: column;
    padding: 10px;
  }
  .nav-links.show {
    display: flex;
  }
}
