@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrains/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrains/JetBrainsMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrains/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrains/JetBrainsMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrains/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-family: "Inter", "JetBrains Mono", monospace;
  --font-family-tag: "JetBrains Mono", monospace;
  --color-primary: #000000;

  --color-bg: #F8F8F8;
  --color-surface: #ffffff;
  --color-text: #000000;
  --color-text-muted: #676767;
  --color-text-secondary: #909090;
  --color-skill-bg: #EFEFEF;
  --color-skill-text: #474747;
  --color-border: #dddddd;
}

[data-theme="dark"] {
  --color-primary: #ffffff;
  --color-bg: #000000;
  --color-surface: #141414;
  --color-text: #e8e8e8;
  --color-text-muted: #909090;
  --color-text-secondary: #666666;
  --color-skill-bg: #1e1e1e;
  --color-skill-text: #9b9b9b;
  --color-border: #333333;
}

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

* {
  font-family: var(--font-family);
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

main {
  width: 1200px;
}

main > header {
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  margin-top: 120px;
  margin-bottom: 150px;
}

main > header h1 {
  font-size: 36px;
  font-weight: 700;
}

main > header h3 {
  margin-top: 10px;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text-muted);
}

main > header img {
  width: 266px;
  height: 266px;
  border-radius: 266px;
  margin-bottom: 36px;
}

main > header p {
  max-width: 620px;
  
  margin-top: 16px;
  color: var(--color-text-muted);
}

.stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: "JetBrains Mono";
  text-align: center;
}

.secondary {
  color: var(--color-text-muted);
}

.icon-btn {
  margin: 4px;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.icon-btn:hover {
  opacity: 0.7;
}

section {
  margin-top: 100px;
}

section h1 {
  font-weight: bolder;
}

.education {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.education-item {
  background-color: var(--color-surface);
  padding: 20px 24px;
  border-radius: 24px;
}

.education-item h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.education-meta {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.education-detail {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.8;
}

#projects {
  display: flex;
  margin-top: 24px;
  gap: 16px;
}

.project {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  width: 233px;
  border-radius: 24px;
  gap: 22px;
  background-color: var(--color-surface);
  text-decoration: none;
}

.project .projects-content {
  flex: 1;
}

.project .projects-content .skills {
  margin-top: auto;
  padding-top: 12px;
}

.project:hover h3 {
  opacity: 0.8;
}

.project h3 {
  color: var(--color-text);
}

.project p {
  color: var(--color-text-muted);
}

.projects-content {
  gap: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.projects-content p {
  font-size: 12px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.expertise-card {
  background-color: var(--color-surface);
  padding: 20px 24px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.expertise-card-title {
  display: flex;
  gap: 8px;
  color: var(--color-text);
}

.expertise-card-title svg {
  margin-top: 2px;
}

.expertise-card-title h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.expertise-card > p {
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.8;
  flex: 1;
}

.experiences {
  margin: 0 auto;
  padding-top: 32px;
}

.job {
  margin-bottom: 60px;
}

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

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

.job-header > header h3 {
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-favicon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

.job-header > header p {
  color: var(--color-text-muted);
  font-size: 14px;
  max-width: 250px;
}

.job-info {
  flex: 1;
  margin-left: 60px;
}

.position h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.period {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.description {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 25px;
}

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

.skill {
  background-color: var(--color-skill-bg);
  border: none;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: -0.3px;
  font-size: 12px;
  color: var(--color-skill-text);
  font-family: var(--font-family-tag);
}

#contact {
  text-align: center;
  padding-bottom: 200px;
  padding-top: 100px;
}

.contact-tagline {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 12px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background-color: var(--color-surface);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 0.7;
}

#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-skill-bg);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  z-index: 100;
  transition: opacity 0.2s;
}

#theme-toggle:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  main {
    width: 100%;
    padding: 30px 32px;
  }

  main > header {
    margin-top: 80px;
    margin-bottom: 60px;
  }

  main > header img {
    width: 180px;
    height: 180px;
    border-radius: 180px;
  }

  #projects {
    padding-bottom: 8px;
  }

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

  .job-info {
    margin-left: 0;
    margin-top: 20px;
  }

  h2 {
    font-size: 24px;
  }

  .job-header > header p {
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  main {
    width: 100%;
    padding: 40px 32px;
  }

  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  #contact {
    padding-top: 60px;
    padding-bottom: 100px;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  #projects {
    flex-direction: column;
    gap: 12px;
  }

  .project {
    width: 100%;
  }

  .job {
    margin-bottom: 40px;
  }

  .position h2 {
    font-size: 18px;
  }

  .education-item {
    padding: 16px 18px;
  }
}

footer {
  width: 100%;
  text-align: center;
  padding: 80px 20px;
  margin-top: auto;
  color: var(--color-text-muted);
  font-size: 13px;
}

@media print {
  @page {
    margin: 20mm 15mm;
  }

  body {
    background-color: white;
    font-size: 11pt;
  }

  main {
    width: 100%;
  }

  main > header {
    margin-top: 0;
    margin-bottom: 32pt;
  }

  main > header img {
    width: 180px;
    height: 180px;
    border-radius: 120px;
    margin-bottom: 16pt;
  }

  section {
    margin-top: 28pt;
    page-break-inside: avoid;
  }

  .job {
    page-break-inside: avoid;
    margin-bottom: 28pt;
  }

  .position {
    page-break-inside: avoid;
  }

  .education-item {
    page-break-inside: avoid;
    background-color: white;
    border: 1px solid #ddd;
  }

  .project {
    background-color: white;
    border: 1px solid #ddd;
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .expertise-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40pt;
  }

  .expertise-card {
    background-color: white;
    padding: 0px;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #projects {
    flex-wrap: nowrap;
  }

  #theme-toggle {
    display: none;
  }

  .skill {
    background-color: #f0f0f0;
    -webkit-print-color-adjust: exact;
    font-size: 10px;
    padding: 2px 7px;
    print-color-adjust: exact;
  }

  main > header > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20pt;
    margin: 8pt 0;
  }

  .icon-btn {
    display: flex;
    align-items: center;
    gap: 5pt;
    font-size: 10pt;
  }

  .icon-btn::after {
    content: attr(data-username);
    color: var(--color-primary);
  }

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

  footer {
    padding: 24pt 0 0;
    font-size: 9pt;
  }
}
