@font-face {
  font-family: "Source Code Pro";
  src: url("../assets/fonts/SourceCodePro-VariableFont_wght.ttf")
    format("truetype-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Code Pro";
  src: url("../assets/fonts/SourceCodePro-Italic-VariableFont_wght.ttf")
    format("truetype-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-main: "Source Code Pro", monospace;

  /* LIGHT MODE */
  --bg-body-light: #ffffff;
  --text-light: #000000;
  --accent-light: #003366;
  --accent-visited-light: #003366;

  /* DARK MODE */
  --bg-body-dark: #121212;
  --bg-body-lighter-dark: #1a1a1a4b;
  --text-dark: #dedede;
  --accent-dark: #8ab4f8;
  --accent-visited-dark: #8ab4f8;

  /* RULES / DIVIDERS */
  --rule-color: #ff3131;

  --max-width: 850px;
}

html {
  background-color: #1a1a1a;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg-body-light);
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  min-height: 100vh;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* RESUME PAGE */
/* height comes from content only — align-items: flex-start above keeps this
   box from stretching to fill the viewport */
.resume {
  width: 100%;
  max-width: var(--max-width);
  background: #ffffff;
  border: 0.5px solid var(--bg-body-lighter-dark);
  padding: 3rem 3.5rem;
  box-sizing: border-box;
}

/* HEADER */

.resume-header {
  text-align: left;
  margin-bottom: 1.75rem;
}

.resume-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.6rem 0;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.6rem;
  row-gap: 0.3rem;
  align-items: center;
  font-size: 0.85rem;
  line-height: 1.4;
}

.contact-line > *:not(:first-child)::before {
  content: "\2022";
  margin-right: 0.6rem;
  opacity: 0.5;
}

/* LINKS */

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

a:visited {
  color: var(--accent-visited-light);
}

a:hover {
  text-decoration: underline;
}

/* SECTIONS */

section {
  margin-bottom: 1.75rem;
}

section:last-of-type {
  margin-bottom: 0;
}

section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--rule-color);
}

/* TEXT */

p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0.4rem 0;
}

/* LISTS */

ul {
  margin: 0.6rem 0 0 0;
  padding-left: 1.25rem;
}

li {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

/* JOB ENTRIES (experience + projects) */

.job {
  margin-bottom: 1.1rem;
}

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

.job-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 0.75rem;
  font-size: 0.92rem;
  margin: 0 0 0.3rem 0;
}

.job-dates {
  font-style: italic;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0.8;
}

.job-divider {
  border: none;
  border-top: 1px solid var(--rule-color);
  opacity: 0.15;
  margin: 0.9rem 0 0 0;
}

/* FOOTER */

footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  text-align: left;
  opacity: 0.75;
}

/* THEME TOGGLE — small, icon-only, docked to the corner and low-contrast
   until hovered/focused so it stays out of the way */

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--accent-light);
  background: transparent;
  color: var(--accent-light);
  cursor: pointer;
  opacity: 0.5;
  transition:
    opacity 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  z-index: 10;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  opacity: 1;
}

.theme-toggle .icon {
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

/* DARK MODE */

body[data-theme="dark"] {
  background: var(--bg-body-dark);
  color: var(--text-dark);
}

body[data-theme="dark"] .theme-toggle {
  color: var(--text-dark);
  border-color: var(--accent-dark);
}

body[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

body[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

body[data-theme="dark"] .resume {
  background: var(--bg-body-lighter-dark);
  border: 0.5px solid var(--accent-visited-light);
}

body[data-theme="dark"] a {
  color: var(--accent-dark);
}

body[data-theme="dark"] a:visited {
  color: var(--accent-visited-dark);
}

body[data-theme="dark"] section h2 {
  border-bottom: 1px solid var(--rule-color);
}

/* RESPONSIVE BREAKPOINTS */

/* Tablet */
@media (max-width: 1024px) {
  .resume {
    padding: 2.25rem 2rem;
  }
}

/* Mobile */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .resume {
    padding: 1.5rem 1.25rem;
  }

  .resume-header h1 {
    font-size: 1.5rem;
  }

  .contact-line {
    font-size: 0.8rem;
  }

  section h2 {
    font-size: 1rem;
  }

  .job-title {
    flex-direction: column;
    align-items: flex-start;
    column-gap: 0;
    row-gap: 0.15rem;
  }

  .theme-toggle {
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
  }
}
