html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 2rem auto;
    max-width: 960px;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0 1rem;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 5rem;
}

.name {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    font-size: 1.5rem;
    color: var(--icon-color);
    align-self: center;
}

.contact {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact div p {
    margin: 0 0 0.5rem 0;
}

.contact div p i {
    color: var(--icon-color);
    margin-right: 0.5rem;
}

.label {
    font-weight: 700;
}

.section {
    display: flex;
}

.section-title {
    width: 150px;
    font-family: 'Arimo', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    color: var(--section-title-color);
}

.section-content {
    flex-grow: 1;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

section:last-of-type .section-content:last-child {
    border-bottom: none;
    margin-bottom: 0;
}


.job-title, .edu-degree, .cert-title, .skills-title, .proj-title {
    font-weight: bold;
    margin: 0;
}

.job-company, .edu-institution {
    font-weight: normal;
    margin: 0.3rem 0 0.6rem 0;
}

.job-description, .edu-description {
    font-weight: 350;
    margin: 0;
    padding-left: 1.2rem;
    list-style-type: disc;
}

details.edu-classes {
    padding: 1rem;
    margin-bottom: 0.6rem;
    background-color: var(--details-bg);
    border: 1px solid var(--details-border);
    border-radius: 0.5rem;
}

details.edu-classes summary {
    cursor: pointer;
    font-weight: 600;
}

details.edu-classes ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding-left: 1.5rem;
    list-style-type: "- ";
}

.fav-class {
  font-weight: 500;
  /* color: var(--icon-color); */
}

.fav-class::before {
  content: "★ ";
}

.item {
    margin-bottom: 2rem;
}

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

.proj-title i {
  margin-left: 0.2rem;
  color: var(--icon-color);
}

.skills-title i {
    margin-right: 0.2rem;
    color: var(--icon-color);
}

.proj-title i:first-child {
  margin-left:0.5rem;
}

.cert-grid, .skills-grid, .proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.cert-card, .skills-card, .proj-card {
    padding-bottom: 0.5rem;
}

.cert-card div:not(.cert-title), .skills-card span, .proj-card p {
    font-weight: 350;
}

.skills-card span + span::before {
    content: " · ";
}

.section-content p:first-of-type, .section-content div {
    margin-top: 0;
}

/* Default light theme */
:root {
  --bg-color: #fafafa;
  --text-color: #111;
  --section-title-color: #444;
  --border-color: #111;
  --details-bg: #f9f9f9;
  --details-border: #ddd;
  --icon-color: #555;
}

/* Dark mode from system */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --section-title-color: #ccc;
    --border-color: #333;
    --details-bg: #1e1e1e;
    --details-border: #333;
    --icon-color: #aaa;
  }
}

/* Manual override: dark mode via URL */
html[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #f0f0f0;
  --section-title-color: #ccc;
  --border-color: #333;
  --details-bg: #1e1e1e;
  --details-border: #333;
  --icon-color: #aaa;
}

/* Manual override: light mode via URL */
html[data-theme="light"] {
  --bg-color: #fafafa;
  --text-color: #111;
  --section-title-color: #444;
  --border-color: #111;
  --details-bg: #f9f9f9;
  --details-border: #ddd;
  --icon-color: #555;
}


@media screen and (max-width: 600px) {
    .section {
    flex-direction: column;
    }

    .section-title {
    width: auto;
    margin-bottom: 0.5rem;
    }
}


/* Print mode */
/* html[data-print="true"] body {
    margin: 0;
    padding: 0;
    background-color: white !important;
    width: 100%;
    max-width: none;
}

html[data-print="true"] .header-row {
    display: block;
    margin-bottom: 2rem;
}

@page {
    margin: 1.5cm;
    size: A4;
}

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

.section-content {
    border-bottom: none;
    break-inside: avoid;
    page-break-after: auto;
} */

html[data-print="true"] body {
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
  background-color: white !important;
}

html[data-print="true"] .header-row {
    display: block;
    margin-bottom: 3rem;
}

html[data-print="true"] .section-content {
  border-bottom: 2px solid black;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  break-inside: avoid;
}

html[data-print="true"] #professional .section-content {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0
}