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

:root {
  --bg: #0a0e14;
  --bg-elevated: #111820;
  --bg-card: #151c27;
  --border: #1e2a3a;
  --border-hover: #2a3a4f;
  --text: #e6edf3;
  --text-muted: #8b9cb3;
  --text-dim: #5c6b7f;
  --accent: #3ee0a0;
  --accent-dim: #2ab57a;
  --accent-glow: rgba(62, 224, 160, 0.15);
  --cyan: #56d4dd;
  --orange: #f0a060;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --radius: 12px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Background ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 42, 58, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 42, 58, 0.4) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(62, 224, 160, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Typography helpers ===== */
.mono {
  font-family: var(--font-mono);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(10, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo-bracket {
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: 0.2s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1rem;
  color: var(--text-muted);
  padding: 8px 0;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* ===== Main content ===== */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
}

.hero-greeting {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 1.4em;
}

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

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

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 420px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0e14;
}

.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Terminal card */
.hero-terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0d131a;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  margin-left: 8px;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.terminal-body {
  padding: 20px;
  line-height: 1.8;
}

.terminal-body .prompt {
  color: var(--accent);
  margin-right: 8px;
}

.terminal-body .output {
  color: var(--text-muted);
  margin-left: 18px;
  margin-bottom: 12px;
}

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

/* ===== Sections ===== */
.section {
  padding: 90px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}

.section-number {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1.05rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.about-card h3 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 500;
}

.about-card ul {
  list-style: none;
}

.about-card li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.about-card li:last-child {
  border-bottom: none;
}

.about-card li span {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== Career Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s;
}

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

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.skill-category:hover {
  border-color: var(--border-hover);
}

.skill-category h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

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

.skill-tags span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  background: rgba(62, 224, 160, 0.08);
  color: var(--accent);
  border: 1px solid rgba(62, 224, 160, 0.2);
  border-radius: 6px;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.timeline-item.current .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow), 0 0 12px var(--accent-glow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.timeline-header .mono {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.timeline-header .current-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(62, 224, 160, 0.1);
  border: 1px solid rgba(62, 224, 160, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.company {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 4px;
  font-weight: 500;
}

.location {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.timeline-content ul {
  list-style: none;
  color: var(--text-muted);
}

.timeline-content li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.timeline-content li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== Certifications ===== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

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

.cert-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.cert-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ===== Education ===== */
.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.education-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.education-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Contact ===== */
.contact-section {
  text-align: center;
  padding-bottom: 100px;
}

.contact-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Contact Form */
.contact-form-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: #ff5f56;
}

.form-actions {
  text-align: center;
  margin-top: 28px;
}

.submit-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.submit-btn:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.form-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.social-link svg {
  opacity: 0.8;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-note {
  margin-top: 6px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding-top: calc(var(--nav-height) + 48px);
  }

  .hero-terminal {
    order: -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-name {
    font-size: 2.2rem;
  }

  .section {
    padding: 70px 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

