:root {
  --accent: #1868DB;
}

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

html {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #EC521B;
  color: #000;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f5f5f5;
}

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

.page {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  padding: 56px 64px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.top-nav-action {
  color: #888;
  cursor: pointer;
  font-size: 13px;
}

.top-nav-action:hover {
  color: #EC521B;
}

/* Header */
.resume-header {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 16px;
}

.resume-name {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.resume-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}

.resume-contact {
  font-size: 13px;
  color: #555;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.resume-contact .dot {
  color: #ccc;
}

.resume-contact a {
  border-bottom: 1px solid transparent;
}

.resume-contact a:hover {
  border-bottom-color: #EC521B;
  color: #EC521B;
}

/* Summary */
.resume-summary {
  font-size: 13px;
  line-height: 1.55;
  color: #444;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.resume-summary .section-title {
  margin-bottom: 10px;
}

/* Sections */
.section {
  margin-bottom: 28px;
  break-inside: avoid;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

/* Education */
.edu-line {
  font-size: 13.5px;
  line-height: 1.65;
  color: #444;
  margin-bottom: 4px;
}

.edu-line:last-child {
  margin-bottom: 0;
}

.edu-inst {
  font-weight: 700;
  color: #1a1a1a;
}

.edu-degree {
  font-weight: 400;
  color: #555;
}

.edu-year {
  color: #999;
  margin-left: 8px;
}

.edu-sep {
  color: #bbb;
  margin: 0 4px;
}

/* Entries (Experience, Projects, Education) */
.entry {
  margin-bottom: 20px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.entry-head > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.entry-org {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.entry-div {
  color: #bbb;
  font-size: 12px;
}

.entry-role {
  font-size: 14px;
  color: #444;
}

.project-name {
  font-weight: 700;
  color: #1a1a1a;
}

.entry-device {
  font-size: 13px;
  color: #999;
}

.entry-date {
  font-size: 12.5px;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

.entry-sub {
  margin-top: 8px;
  margin-bottom: 10px;
}

.entry-sub:last-child {
  margin-bottom: 0;
}

.entry-sub-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.entry-sub ul,
.achievements {
  list-style: none;
  padding: 0;
}

.entry-sub ul li,
.achievements li {
  font-size: 13px;
  line-height: 1.55;
  color: #444;
  margin-bottom: 3px;
}

.entry-sub ul li strong,
.achievements li strong {
  color: #1a1a1a;
  font-weight: 500;
}

.entry-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #444;
  margin-top: 4px;
}

/* Skills */
.skills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skills-group {
  display: flex;
  gap: 12px;
}

.skills-cat {
  font-size: 12.5px;
  font-weight: 700;
  color: #1a1a1a;
  min-width: 72px;
  flex-shrink: 0;
}

.skills-group p {
  font-size: 13px;
  line-height: 1.55;
  color: #444;
}

/* Print */
@page {
  size: A4;
  margin: 0;
}

@media print {
  body {
    background: #fff;
  }

  .page {
    max-width: none;
    margin: 0;
    padding: 0 20mm;
    box-shadow: none;
  }

  .top-nav {
    display: none;
  }

  .resume-header {
    margin-bottom: 12px;
    padding: 10mm 0 10px;
  }

  .resume-title {
    margin-bottom: 10px;
  }

  .resume-summary {
    font-size: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .section {
    margin-bottom: 12px;
    break-inside: auto;
  }

  .section.projects-page {
    page-break-before: always;
    padding-top: 10mm;
  }

  .section-title {
    margin-bottom: 8px;
    padding-bottom: 4px;
  }

  .entry {
    margin-bottom: 12px;
    break-inside: auto;
  }

  .entry-sub {
    margin-top: 4px;
    margin-bottom: 6px;
  }

  .entry-sub ul li,
  .achievements li {
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 2px;
  }

  .entry-sub ul li::before,
  .achievements li::before {
    content: none;
  }

  .entry-sub-label {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .skills-group {
    gap: 6px;
  }

  .skills-group p {
    font-size: 12px;
    line-height: 1.45;
  }

  .edu-line {
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 2px;
  }

  .resume-contact {
    font-size: 12px;
  }

  .resume-contact a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: none;
  }
}

/* Screen only */
@media screen and (max-width: 860px) {
  .page {
    margin: 0;
    padding: 32px 28px;
    box-shadow: none;
  }

  .entry-head {
    flex-direction: column;
    gap: 2px;
  }

  .entry-date {
    margin-left: 0;
  }

  .skills-group {
    flex-direction: column;
    gap: 2px;
  }
}
