:root {
  --bg: #0f172a;
  --bg-secondary: #111827;
  --card: #111827;
  --card2: #1a2235;
  --accent: #22c55e;
  --accent-dim: rgba(34, 197, 94, 0.12);
  --accent-glow: rgba(34, 197, 94, 0.25);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.06);
  --font: 'Poppins', sans-serif;
  --mono: 'Fira Code', monospace;
  --radius: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}


body.light-mode {
  --bg: #f1f5f9;
  --bg-secondary: #ffffff;
  --card: #ffffff;
  --card2: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}


header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

body.light-mode header {
  background: rgba(241, 245, 249, 0.9);
}

#navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 62px;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}


#themeToggle {
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.2s;
}

#themeToggle:hover {
  background: var(--accent);
  color: #0a1a0f;
}


.live-clock {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}


.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}


.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 6rem 2.5rem 4rem;
}

.sec-header {
  margin-bottom: 2.5rem;
}

.sec-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.sec-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}


.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  padding: 0.25rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1.4rem;
  display: inline-block;
  letter-spacing: 0.06em;
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.accent {
  color: var(--accent);
}

.hero-role {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 2rem;
}


.terminal {
  background: #0a0f1a;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.07);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0d1424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #27c93f; }

.term-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.term-body {
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.9;
}

.prompt { color: var(--accent); }
.cmd    { color: #fff; }
.muted  { color: var(--muted); }
.small  { font-size: 0.72rem; }

.term-line {
  color: var(--muted);
  padding-left: 1rem;
}

.term-line::before {
  content: "→ ";
  color: var(--accent);
}


.blink {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.5s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}


.greeting {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 1.4rem;
  min-height: 1.4rem;
}


.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  border: none;
  font-family: 'Poppins', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #0a1a0f;
}

.btn-primary:hover {
  background: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.btn-outline:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.full-width {
  width: 100%;
  text-align: center;
}


.about-grid {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.about-text {
  flex: 1;
  color: var(--muted);
  font-size: 0.93rem;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-focus {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}

.focus-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
}


.hero-inner {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
}

.hero-photo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

.hero-photo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid rgba(255,255,255,0.04);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}

.resume-btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.06);
}

@media (min-width: 880px) {
  .hero-inner { flex-direction: row; }
  .hero-content { flex: 1; }
  .hero-photo-wrap { width: 300px; margin-top: 0; }
  .hero-photo { width: 320px; height: 320px; }
}

.focus-list li {
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  padding-left: 1.2rem;
  position: relative;
}

.focus-list li:last-child {
  border-bottom: none;
}

.focus-list li::before {
  content: "▹";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-size: 0.72rem;
  top: 0.5rem;
}


.subsec-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.edu-table-wrapper {
  overflow-x: auto;
}

.edu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.edu-table th {
  background: var(--card);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.edu-table td {
  padding: 0.8rem 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.edu-table tr:hover td {
  background: var(--card2);
  color: var(--text);
}


.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.skill-group {
  min-width: 200px;
}

.skill-group-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text);
  font-family: var(--mono);
  cursor: default;
  transition: all 0.2s;
}

.badge:hover {
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
}


.certs-section {
  margin-top: 0.5rem;
}

.certs-box {
  margin-top: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.6rem;
}

.certs-list li {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.certs-list li:last-child {
  border-bottom: none;
}

.hidden {
  display: none;
}


.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  flex: 1 1 280px;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.project-card:hover {
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card.featured {
  flex: 1 1 100%;
}

.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.proj-icon { font-size: 1.4rem; }

.proj-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.proj-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.proj-link:hover {
  color: var(--accent);
  border-color: rgba(34, 197, 94, 0.4);
}

.featured-badge {
  font-family: var(--mono);
  font-size: 0.69rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.proj-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.proj-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.2rem;
  flex: 1;
}

.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.proj-tag {
  font-family: var(--mono);
  font-size: 0.69rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
}


.contact-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}


.contact-terminal {
  flex: 1;
  background: #0a0f1a;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(34, 197, 94, 0.06);
}

.term-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.6rem 0;
}

.ct-line {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.ct-key {
  color: var(--accent);
  min-width: 70px;
}

.ct-line a {
  color: var(--text);
  transition: color 0.2s;
}

.ct-line a:hover {
  color: var(--accent);
}


.contact-form {
  flex: 1.4;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 0.84rem;
  padding: 0.6rem 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(34, 197, 94, 0.5);
}

.form-group select {
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
}


.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}

.radio-label input {
  accent-color: var(--accent);
}

.form-group input[type="checkbox"] {
  accent-color: var(--accent);
  margin-right: 0.4rem;
}


/* char-count removed */


.error-msg {
  font-size: 0.75rem;
  color: #f87171;
  font-family: var(--mono);
  min-height: 1rem;
}


.success-msg {
  margin-top: 1rem;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-family: var(--mono);
  text-align: center;
}


footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}


.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


@media (max-width: 900px) {
  .about-grid {
    flex-direction: column;
  }
  .contact-layout {
    flex-direction: column;
  }
  .nav-links {
    gap: 1.2rem;
  }
}


@media (max-width: 650px) {
  .section {
    padding: 5rem 1.4rem 3rem;
  }

  .hero-name {
    letter-spacing: -1px;
  }

  
  .nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .live-clock {
    display: none;
  }

  .projects-grid {
    flex-direction: column;
  }

  .project-card.featured {
    flex: 1 1 auto;
  }

  .skills-grid {
    flex-direction: column;
    gap: 1.5rem;
  }
}