:root {
  color-scheme: light dark;

  /* Accent Color (Adaptive for light/dark) */
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;

  /* 1. Spacing Scale System (8pt Grid / 4px Half-step) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* 2. Typographic Scale & Weight */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.35rem;    /* 21.6px */
  --font-size-2xl: 1.75rem;   /* 28px */
  --font-size-3xl: 2.25rem;   /* 36px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* 3. Color & Contrast Tokens */
  --color-bg-card: transparent;
  --color-bg-tag: rgba(127, 127, 127, 0.08);
  --border-color: rgba(127, 127, 127, 0.15);
  --border-color-hover: rgba(127, 127, 127, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --max-width: 840px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --color-accent: #1d4ed8;
    --color-accent-hover: #1e40af;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  display: flex;
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 var(--space-8);
}

.sidebar {
  width: 260px;
  padding: var(--space-16) var(--space-8) var(--space-16) 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar h1 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.sidebar p {
  opacity: 0.65;
  margin-top: 0;
  margin-bottom: var(--space-10);
  font-size: var(--font-size-sm);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sidebar a {
  color: inherit;
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  opacity: 0.65;
  padding: var(--space-1) 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.sidebar a:hover {
  opacity: 1;
}

main {
  flex: 1;
  max-width: var(--max-width);
  padding: var(--space-16) 0 var(--space-24) var(--space-12);
}

section {
  margin-bottom: var(--space-24);
  padding-top: var(--space-16);
}

section h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-10);
  letter-spacing: -0.03em;
  line-height: 1.2;
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 64px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
}

.card {
  border: 0;
  border-bottom: 1px solid rgba(127, 127, 127, 0.12);
  border-radius: 0;
  padding: 0 0 var(--space-10) 0;
  margin-bottom: var(--space-10);
  background: transparent;
}

.card:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.card h3 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.01em;
}

.card p {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-base);
  line-height: 1.75;
  opacity: 0.85;
}

.skill-card {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
}

.summary {
  max-width: 720px;
  margin: var(--space-3) 0 var(--space-8);
  font-size: var(--font-size-lg);
  line-height: 1.75;
  opacity: 0.85;
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.focus-tags span {
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-tag);
  border: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

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

/* Strengths Section */
.strengths-wrapper {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px dashed var(--border-color);
}

.strengths-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-5);
  letter-spacing: -0.01em;
  opacity: 0.9;
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}

.strength-card {
  background: var(--color-bg-tag);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.strength-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.strength-card h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: inherit;
}

.strength-card p {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  opacity: 0.85;
  flex: 1;
}

.strength-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.strength-tags span {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
  opacity: 0.9;
}

.item-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-3);
}

.item-heading h3 {
  margin-bottom: var(--space-1);
}

.job-note {
  font-size: 0.88rem;
  opacity: 0.75;
  margin: 0 0 4px;
}

.role,
.meta {
  margin: 0;
}

.role {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  opacity: 0.9;
}

.meta {
  flex: 0 0 auto;
  opacity: 0.6;
  font-size: var(--font-size-sm);
  text-align: right;
}

ul {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding-left: 0;
}

li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-base);
  line-height: 1.75;
  opacity: 0.88;
}

li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.4;
}

strong {
  font-weight: var(--font-weight-semibold);
  opacity: 1;
}

a {
  color: inherit;
}

.project-github-link {
  color: var(--color-accent) !important;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  margin-left: var(--space-2);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.project-github-link:hover {
  opacity: 1;
  text-decoration: underline;
}

small {
  opacity: 0.65;
}

#contact small {
  display: block;
  margin-top: var(--space-6);
  opacity: 0.6;
}

.contact-links {
  font-size: var(--font-size-lg);
  line-height: 1.8;
}

.contact-links p {
  margin: var(--space-2) 0 0;
}

.print-resume-header,
.print-projects,
.print-skills {
  display: none;
}

@media (max-width: 860px) {
  body {
    display: block;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    padding: 24px 0;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  main {
    padding: 24px 0 80px;
  }

  section {
    margin-bottom: 76px;
    padding-top: 22px;
  }

  .item-heading {
    display: block;
  }

  .meta {
    margin-top: 4px;
    text-align: left;
  }
}

.print-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  background: transparent;
  cursor: pointer;
}

.print-mode .sidebar {
  display: none;
}

.print-mode main {
  max-width: 100%;
  padding-top: 40px;
}

body.print-mode {
  display: block;
  max-width: 860px;
  padding: 28px 36px 56px;
  color: #111;
  background: #fff;
  font-size: 14px;
  line-height: 1.48;
}

.print-mode main {
  padding: 0;
}

.print-mode .print-resume-header,
.print-mode .print-projects,
.print-mode .print-skills {
  display: block;
}

.print-mode #home,
.print-mode #taste,
.print-mode #contact,
.print-mode .print-button,
.print-mode .web-projects,
.print-mode .web-skills {
  display: none;
}

.print-mode .print-resume-header {
  margin-bottom: 36px;
  padding: 0;
}

.print-mode .print-resume-header h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.print-mode .print-title {
  margin: 4px 0 8px;
  font-weight: 700;
}

.print-mode .print-contact,
.print-mode .print-summary {
  margin: 0 0 5px;
}

.print-mode .print-intro p {
  margin: 0 0 8px;
}

.print-mode .print-contact {
  color: #333;
  font-size: 13px;
}

.print-mode .print-contact span {
  margin: 0 6px;
}

.print-mode .print-summary {
  margin-top: 12px;
}

.print-mode section {
  margin-bottom: 34px;
  padding-top: 0;
}

.print-mode section h2 {
  margin: 0 0 9px;
  font-size: 15px;
  line-height: 1.2;
}

.print-mode .card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 13px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-mode .card h3 {
  margin-bottom: 2px;
  font-size: 14px;
}

.print-mode .card p {
  margin-bottom: 5px;
}

.print-mode .item-heading {
  gap: 18px;
  margin-bottom: 4px;
}

.print-mode .role {
  font-size: 13px;
}

.print-mode .job-note {
  font-size: 12px;
  opacity: 0.7;
  margin: 0 0 3px;
}

.print-mode .meta {
  font-size: 12px;
}

.print-mode ul {
  list-style: disc;
  margin-top: 5px;
  padding-left: 18px;
}

.print-mode li {
  padding-left: 0;
  margin-bottom: 2px;
}

.print-mode li::before {
  display: none;
}

.print-mode #projects {
  break-before: page;
  page-break-before: always;
}

.print-mode .skill-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  margin-bottom: 8px;
  line-height: 1.45;
}

.print-mode .skill-row strong {
  font-size: 12px;
  white-space: nowrap;
}



.print-mode a {
  text-decoration: none;
}

@media print {
  @page {
    size: A4;
    margin: 14mm 13mm 16mm;
  }

  :root {
    color-scheme: light;
    --border: #d8d8d8;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    display: block;
    max-width: 100%;
    padding: 0;
    color: #111;
    background: #fff;
    font-size: 10.5pt;
    line-height: 1.55;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sidebar,
  .print-button {
    display: none !important;
  }

  main {
    max-width: 100%;
    padding: 0;
  }

  .print-resume-header,
  .print-projects,
  .print-skills {
    display: block;
  }

  #home,
  #taste,
  #contact,
  .web-projects,
  .web-skills {
    display: none;
  }

  .print-resume-header {
    margin-bottom: 26pt;
    padding: 0;
  }

  .print-resume-header h1 {
    margin: 0;
    font-size: 20pt;
    line-height: 1.1;
  }

  .print-title {
    margin: 3pt 0 6pt;
    font-weight: 700;
  }

  .print-contact,
  .print-summary {
    margin: 0 0 3pt;
  }

  .print-intro p {
    margin: 0 0 6pt;
  }

  .print-contact {
    color: #333;
    font-size: 9.5pt;
  }

  .print-contact span {
    margin: 0 4pt;
  }

  .print-summary {
    margin-top: 9pt;
  }

  section {
    margin-bottom: 25pt;
    padding-top: 0;
  }

  section h2 {
    margin: 0 0 7pt;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: 12pt;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    background: transparent;
  }

  .card {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    margin-bottom: 9pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .card h3 {
    margin-bottom: 4pt;
    font-size: 11pt;
  }

  .card p {
    margin-bottom: 4pt;
  }

  .summary {
    max-width: none;
    margin: 4pt 0 11pt;
    font-size: 10.5pt;
    line-height: 1.45;
    opacity: 0.78;
  }

  .focus-tags {
    gap: 5pt;
    margin-top: 9pt;
  }

  .focus-tags span {
    padding: 2pt 5pt;
    background: #f4f4f4;
    font-size: 9pt;
  }

  .item-heading {
    gap: 12pt;
    margin-bottom: 3pt;
  }

  .role {
    font-size: 10pt;
  }

  .job-note {
    font-size: 9pt;
    opacity: 0.7;
    margin: 0 0 3pt;
  }

  .meta {
    font-size: 9pt;
  }

  ul {
    list-style: disc;
    margin-top: 4pt;
    padding-left: 15pt;
  }

  li {
    padding-left: 0;
    margin-bottom: 2pt;
  }

  li::before {
    display: none;
  }

  #projects {
    break-before: page;
    page-break-before: always;
  }

  .skill-row {
    display: grid;
    grid-template-columns: 100pt 1fr;
    gap: 12pt;
    margin-bottom: 6pt;
    line-height: 1.45;
  }

  .skill-row strong {
    font-size: 9pt;
    white-space: nowrap;
  }



  a {
    color: #111;
    text-decoration: none;
  }
}
