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

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent2: #3fb950;
  --accent3: #d2a8ff;
  --yellow: #e3b341;
  --orange: #f0883e;
  --red: #f85149;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

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

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

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

section {
  padding: 90px 0;
}

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

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

/* ===== 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: all 0.3s;
}

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

.nav-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

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

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

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

.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;
  flex-direction: column;
  justify-content: center;
  padding: 80px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-avatar {
  flex-shrink: 0;
}

.avatar-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 0 40px rgba(88,166,255,0.2);
}

.hero-greeting {
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-title {
  font-family: 'Fira Code', monospace;
  font-size: 1.1rem;
  color: var(--accent2);
  margin-bottom: 20px;
}

.hero-bio {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: 'Fira Code', monospace;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.85; text-decoration: none; }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

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

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: 'Fira Code', monospace;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollAnim 1.5s ease-in-out infinite;
}

@keyframes scrollAnim {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.5); }
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.about-focus h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
  letter-spacing: normal;
}

.focus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.focus-list li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about-stats {
  display: flex;
  gap: 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  flex: 1;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

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

/* ===== SKILLS ===== */
.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.skill-group-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green { background: var(--accent2); }
.dot.blue { background: var(--accent); }
.dot.yellow { background: var(--yellow); }
.dot.purple { background: var(--accent3); }
.dot.orange { background: var(--orange); }
.dot.red { background: var(--red); }
.dot.cyan { background: #00d4ff; }

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

.skill-tags span {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: 'Fira Code', monospace;
  transition: border-color 0.2s, color 0.2s;
}

.skill-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Language table */
.lang-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  padding: 10px 16px;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.lang-row:last-child { border-bottom: none; }

.lang-row.header {
  background: var(--bg3);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lang-bar {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.lang-bar div {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== EXPERIENCE ===== */
#experience { background: var(--bg2); }

.timeline {
  position: relative;
  padding-left: 32px;
}

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

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

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg2);
  box-shadow: 0 0 0 3px var(--border);
}

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

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

.tc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tc-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.company {
  color: var(--accent);
  font-size: 0.875rem;
}

.period {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  white-space: nowrap;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
}

.period.current {
  border-color: var(--accent2);
  color: var(--accent2);
}

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

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.timeline-card ul {
  padding-left: 18px;
  margin-bottom: 14px;
}

.timeline-card ul li {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.tc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tc-tags span {
  background: rgba(88,166,255,0.1);
  border: 1px solid rgba(88,166,255,0.2);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: 'Fira Code', monospace;
}

/* ===== EDUCATION ===== */
.edu-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.edu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.edu-table thead tr {
  background: var(--bg3);
}

.edu-table th {
  padding: 12px 16px;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.edu-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.edu-table tbody tr:last-child td { border-bottom: none; }

.edu-table tbody tr:hover td { background: var(--bg3); }

.edu-table td strong { color: var(--text); }

.badge-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  background: rgba(63,185,80,0.1);
  border: 1px solid rgba(63,185,80,0.3);
  color: var(--accent2);
}

.badge-status.ongoing {
  background: rgba(88,166,255,0.1);
  border: 1px solid rgba(88,166,255,0.3);
  color: var(--accent);
}

/* ===== CERTIFICATES ===== */
#certificates { background: var(--bg2); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.2s;
}

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

.cert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cert-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.cert-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 24px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}

.contact-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.contact-card svg {
  width: 20px;
  height: 20px;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; width: 100%; }

  .container { padding: 0 20px; width: 100%; box-sizing: border-box; }

  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 16px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  #hero { padding: 80px 20px 60px; }
  .hero-content { flex-direction: column; text-align: center; gap: 32px; }
  .hero-text h1 { font-size: 2rem; }
  .hero-badges { justify-content: center; }
  .hero-cta { justify-content: center; }

  #about { overflow: hidden; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-text, .about-focus { width: 100%; max-width: 100%; overflow: hidden; }
  .about-stats { justify-content: center; }
  .focus-list li { word-break: break-word; }

  .tc-header { flex-direction: column; }
  .period { align-self: flex-start; }

  .lang-row { grid-template-columns: 1fr 1fr; }
  .lang-row.header span:nth-child(3), .lang-row.header span:nth-child(4),
  .lang-row span:nth-child(3), .lang-row span:nth-child(4) { display: none; }

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

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

  .contact-links { flex-direction: column; }
  .contact-card { width: 100%; justify-content: center; }

  .timeline { padding-left: 24px; }

  .edu-table th:nth-child(4),
  .edu-table td:nth-child(4) { display: none; }
}
