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

:root {
  --green: #1b7a4a;
  --green-dark: #0f5c36;
  --green-light: #e6f5ed;
  --green-mid: #4caf7d;
  --green-bg: #eef7f2;
  --gray-50: #f8f9fa;
  --gray-100: #e9ecef;
  --gray-200: #dee2e6;
  --gray-400: #adb5bd;
  --gray-600: #495057;
  --gray-800: #343a40;
  --gray-900: #1a1a1a;
  --white: #ffffff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 850px;
  --shadow: 0 4px 32px rgba(15, 92, 54, 0.08);
}

body {
  font-family: var(--font);
  background: var(--green-bg);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 14px;
  padding: 40px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--max-w);
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 48px;
  box-shadow: var(--shadow);
}

/* ─── Header ─── */
.header {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--green-light);
}

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

.header-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green);
  background: var(--green-light);
}

.header-info h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: -0.5px;
  margin-bottom: 2px;
  line-height: 1.2;
}

.subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-mid);
  margin-bottom: 12px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600);
}

.contact-icon {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  font-weight: 700;
}

/* ─── Sections ─── */
.section { margin-bottom: 28px; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green-light);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-en {
  font-weight: 400;
  font-size: 11px;
  opacity: 0.4;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-content { font-size: 14px; color: var(--gray-600); }

/* ─── About ─── */
.about-text {
  margin-bottom: 8px;
  line-height: 1.7;
  font-size: 14px;
}

.about-text strong {
  color: var(--green-dark);
  font-weight: 600;
}

.about-en {
  opacity: 0.65;
  font-size: 13px;
  padding-left: 16px;
  border-left: 2px solid var(--green-light);
}

/* ─── Skills Grid ─── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.skill-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color 0.2s, background 0.2s;
}

.skill-card:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.skill-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--gray-800);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.skill-desc {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.45;
}

/* ─── Experience ─── */
.exp-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}

.exp-item:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

.exp-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-900);
}

.exp-date {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  font-family: var(--font-mono);
}

.exp-sub {
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 8px;
}

.exp-desc {
  padding-left: 20px;
  font-size: 13px;
  color: var(--gray-600);
  list-style: none;
  line-height: 1.6;
}

.exp-desc li {
  position: relative;
  margin-bottom: 3px;
}

.exp-desc li::before {
  content: '→';
  position: absolute;
  left: -20px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ─── Education ─── */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edu-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  min-width: 64px;
  padding-top: 1px;
}

.edu-body {
  flex: 1;
}

.edu-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
  display: block;
}

.edu-detail {
  font-size: 12px;
  color: var(--gray-400);
}

/* ─── Tools ─── */
.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tools-list span {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0;
  transition: background 0.2s;
}

.tools-list span:hover {
  background: #c8e6d5;
}

/* ─── Download ─── */
.download-bar {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid var(--green-light);
}

.btn-download {
  font-family: var(--font);
  background: var(--green);
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-download:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
}

/* ─── Footer ─── */
.footer {
  text-align: center;
  max-width: var(--max-w);
  width: 100%;
  margin: 16px auto 0;
  font-size: 11px;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

/* ─── Print via browser (fallback) ─── */
@media print {
  @page { margin: 8mm 12mm; size: A4; }
  body { background: white; padding: 0; display: block; font-size: 12px; }
  .page { box-shadow: none; border-radius: 0; padding: 0; max-width: 100%; margin: 0; }
  .btn-download, .download-bar, .footer { display: none; }
  .section { margin-bottom: 16px; }
  .section-title { margin-bottom: 8px; }
  .exp-item { margin-bottom: 12px; padding-bottom: 12px; }
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  body { padding: 12px; }
  .page { padding: 24px 18px; }
  .header { flex-direction: column; text-align: center; gap: 16px; }
  .contact { justify-content: center; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-en { padding-left: 0; border-left: none; }
  .edu-item { flex-direction: column; gap: 2px; }
  .edu-year { min-width: auto; }
}

@media (max-width: 420px) {
  .skills-grid { grid-template-columns: 1fr; }
}
