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

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-alt: #21242f;
  --border: #2a2d3a;
  --accent: #4f8ef7;
  --accent-dim: rgba(79, 142, 247, 0.12);
  --text: #e8eaf0;
  --text-muted: #8b90a0;
  --text-dim: #555a6e;
  --radius: 12px;
  --radius-sm: 6px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Header */
.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

.header .title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 6px;
}

.header .location {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.linkedin-link:hover {
  opacity: 0.75;
}

.header-nav {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}

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

.header-nav a:hover {
  color: var(--text);
}

/* Sections */
.section {
  padding: 56px 0 0;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* About */
.about-text {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.8;
  max-width: 700px;
}

.about-text + .about-text {
  margin-top: 16px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.skill-group h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-group ul li {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

.timeline-item {
  display: flex;
  gap: 28px;
  padding-bottom: 40px;
  position: relative;
}

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

.timeline-marker {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
  position: relative;
  z-index: 1;
}

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

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

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

.job-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

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

.job-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.job-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-end;
}

.job-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.job-location {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.job-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(79, 142, 247, 0.2);
}

/* Education */
.education-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

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

.education-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.institution {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 4px;
}

.edu-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

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

/* Footer */
.footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 640px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 0 32px;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .header-nav {
    gap: 16px;
  }

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

  .job-meta {
    align-items: flex-start;
  }

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

  .timeline::before {
    display: none;
  }

  .timeline-marker {
    display: none;
  }

  .timeline-item {
    gap: 0;
  }
}
