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

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #1c2230;
  --border:    #30363d;
  --accent:    #58a6ff;
  --accent2:   #3fb950;
  --text:      #e6edf3;
  --text-muted:#8b949e;
  --radius:    8px;
  --font:      'Inter', sans-serif;
  --mono:      'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.4rem;
}

section {
  padding: 5rem 0;
}

section:nth-child(even) {
  background: var(--bg2);
}

/* ===== TAGS ===== */
.tag {
  display: inline-block;
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  font-family: var(--mono);
  font-weight: 500;
}

.tag.small {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: #79c0ff;
  color: #0d1117;
}

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

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

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg3);
}

.nav-links a.nav-cta {
  background: var(--accent);
  color: #0d1117;
  font-weight: 600;
  padding: 0.4rem 1rem;
}

.nav-links a.nav-cta:hover {
  background: #79c0ff;
}

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

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 6rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-label {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== TERMINAL ===== */
.hero-terminal {
  flex: 1;
  min-width: 300px;
  max-width: 480px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.82rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.terminal-bar {
  background: var(--bg3);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
}

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

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.terminal-title {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.terminal-body {
  padding: 1.2rem;
  min-height: 240px;
  color: var(--accent2);
  line-height: 1.8;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .out {
  color: var(--text-muted);
}

.terminal-body .cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

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

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.about-text strong {
  color: var(--text);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

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

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

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

.skill-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.skill-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.skill-card ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.skill-card ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== EXPERIENCE / TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

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

.timeline-content {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.timeline-content:hover {
  border-color: var(--accent);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.job-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.company {
  display: block;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.1rem;
}

.period {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.job-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.job-bullets {
  margin-bottom: 1rem;
}

.job-bullets li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem 0 0.3rem 1.25rem;
  position: relative;
  line-height: 1.6;
}

.job-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 0.35rem;
}

.job-bullets strong {
  color: var(--text);
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* ===== EDUCATION ===== */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: border-color 0.2s;
}

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

.edu-year {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
  min-width: 100px;
}

.edu-details h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.edu-uni {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.grade {
  font-size: 0.8rem;
  background: rgba(63, 185, 80, 0.15);
  color: var(--accent2);
  border: 1px solid rgba(63, 185, 80, 0.3);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.5rem;
  font-weight: 500;
}

/* ===== CONTACT ===== */
.contact-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: border-color 0.2s, transform 0.2s;
  color: var(--text);
}

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

.contact-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--accent);
  font-family: var(--mono);
  word-break: break-all;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #hero {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .hero-tags {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-terminal {
    max-width: 100%;
    width: 100%;
  }

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

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

@media (max-width: 600px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.6rem 0.75rem;
  }

  .hamburger {
    display: flex;
  }

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

  .job-header {
    flex-direction: column;
  }

  .edu-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .section-title {
    font-size: 1.6rem;
  }
}
