@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/Inter-Regular.ttf') format('truetype');
}

/* ================================
   Base layout and typography
================================= */
body {
  background: #0e1117;
  color: #c9d1d9;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 2rem;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 2rem 1.5rem;
}

.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ================================
   Header and contact
================================= */
header h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2rem;
  color: #58a6ff;
  margin: 0;
}

header h2 {
  font-size: 1.2rem;
  color: #8b949e;
  margin-top: 0.2rem;
}

.summary {
  font-size: 0.9rem;
  color: #c9d1d9;
  line-height: 1.4;
  margin-top: 1rem;
}


.contact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #8b949e;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-line {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.contact a {
  color: #58a6ff;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}


/* ================================
   Section spacing and headings
================================= */
.main section {
  margin-top: 1rem;
}

h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  text-transform: lowercase;
  color: #58a6ff;
  margin-bottom: 1rem;
}

/* ================================
   Experience & blocks
================================= */
.block {
  margin-bottom: 1.2rem;
  border-left: 2px solid #30363d;
  padding-left: 1rem;
}

.block .meta {
  font-size: 0.9rem;
  color: #8b949e;
}

.block .title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin-top: 0.2rem;
  color: #c9d1d9;
}

.block .title span {
  color: #6e7681;
  font-weight: 400;
}

.block .desc {
  margin-top: 0.4rem;
  color: #d2d7de;
  font-size: 0.95rem;
}

.job-details {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  background: #0d1117;
  padding: 0.5rem 0.8rem;
  border-left: 2px solid #30363d;
  border-radius: 4px;
  color: #a1a1a1;
  max-width: 700px;
}

.job-details summary {
  font-family: 'JetBrains Mono', monospace;
  color: #4fa6ff;
  font-size: 0.8rem;
  cursor: pointer;
  padding-bottom: 0.2rem;
}

.job-details summary:hover {
  color: #6cbaff;
}

.job-details p {
  margin: 0.5rem 0 0;
  line-height: 1.4;
  color: #c3c9d1;
}

/* ================================
   Skills
================================= */
.skill-group {
  margin-bottom: 1.5rem;
}

.skill-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 0.3rem;
}

.skill-items {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-items li {
  background: #21262d;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  color: #c9d1d9;
  border: 1px solid #30363d;
}


/* ================================
   Certifications
================================= */
.certs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-block {
  background: #161b22;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid #30363d;
  border-radius: 6px;
}

.cert-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #58a6ff;
}

.cert-issuer {
  font-size: 0.75rem;
  color: #8b949e;
  margin-bottom: 0.3rem;
}

.cert-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.cert-skills span {
  font-size: 0.7rem;
  background: #21262d;
  color: #c9d1d9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid #30363d;
}

/* ================================
   Languages
================================= */
.languages {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.lang-row {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  border-bottom: 1px solid #2c313a;
  padding-bottom: 0.2rem;
}

.lang-name {
  color: #c9d1d9;
}

.lang-level {
  color: #8b949e;
  font-style: italic;
}

/* ================================
   Language Switcher
================================= */
.name-with-lang {
  display: flex;
  align-items: center;
  gap: 1rem; /* more spacing from name */
  font-size: 2.2rem;
  font-family: 'JetBrains Mono', monospace;
  color: #58a6ff;
  margin: 0;
}

.language-switch {
  font-size: 0.9rem;
  font-weight: normal;
  margin-top: 0.2rem;
}

.language-switch a {
  color: #8b949e; /* dim color for inactive */
  text-decoration: none;
  transition: color 0.2s ease;
}

.language-switch a:hover {
  color: #58a6ff;
  text-decoration: underline;
}

.language-switch .active {
  color: #58a6ff; /* active color */
  font-weight: 600;
  text-decoration: underline;
}


/* ================================
   @Job Title Links
================================= */

.title span a {
  color: #58a6ff;
  text-decoration: none;
}

.title span a:hover {
  text-decoration: underline;
}


/* ================================
   LIGHT THEME STYLES
================================= */
body.light {
  background: #ffffff;
  color: #1e1e1e;
}

body.light h2,
body.light .block .title {
  color: #1e1e1e;
}

body.light h1 {
  color: #58a6ff;
}

body.light h3 {
  color: #0070f3;
}

body.light .summary {
  color: #444;
}

body.light code {
  background: #f4f4f4;
  color: #1e1e1e;
}

body.light .skills span,
body.light .cert-skills span,
body.light .skill-items li {
  background: #f1f1f1;
  color: #222;
  border: 1px solid #ccc;
}

body.light .job-details {
  background: #f6f6f6;
  color: #333;
  border-color: #ccc;
}

body.light .job-details summary {
  color: #0070f3;
}

body.light .block .desc {
  color: #444; /* Or #333 for darker contrast */
}

body.light .job-details p {
  color: #333;
}

body.light .cert-block {
  background: #f1f1f1;
  border-left: 3px solid #ccc;
}

body.light .cert-title {
  color: #0070f3;
}

body.light .cert-issuer {
  color: #666;
}

body.light a {
  color: #0070f3;
}

body.light .cert-title {
  color: #0070f3;
}

body.light .lang-name {
  color: #222;
}

body.light .lang-level {
  color: #555;
}

body.light .btn {
  background: #f1f3f5;
  color: #0366d6;
  border: 1px solid #d0d7de;
}

body.light .btn:hover {
  background: #e2e6ea;
}

/* Toggle button style */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #58a6ff;
}

body.light .theme-toggle {
  color: #1a1a1a;
}

.theme-toggle {
  transition: transform 0.3s ease;
}
.theme-toggle:active {
  transform: rotate(180deg);
}

/* ================================
   Buttons
================================= */
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #21262d;
  color: #58a6ff;
  border: 1px solid #30363d;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: #30363d;
}

/* ================================
   Responsive / media queries
================================= */
@media (max-width: 768px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 1;
  }
}

@media print {
  body {
    background: white;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-size: 11pt;
    line-height: 1.5;
    padding: 0;
    margin: 0;
  }

  .container {
    max-width: 100%;
    padding: 2rem;
  }

  .grid-layout {
    display: block;
  }

  .main, .sidebar {
    width: 100%;
    display: block;
    margin-bottom: 2rem;
  }

  h1, h2, h3 {
    color: #000;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .summary {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }

  .contact a,
  .btn,
  .language-switch {
    display: none !important;
  }

  .job-details summary {
    font-weight: bold;
  }

  .job-details p {
    margin: 0.5rem 0 0;
  }

  .block,
  .cert-block,
  .skill-group,
  .lang-row {
    page-break-inside: avoid;
  }

  code {
    background: none;
    padding: 0;
    color: inherit;
  }

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