/* ============================================
    CSS VARIABLES & THEME
   ============================================ */
:root {
  --bg: #dddddd;
  --fg: #0b1220;
  --muted: color-mix(var(--fg) 80%, transparent);
  --highlight: #0ea5a4;
  --card: #b8babc;
  --accent: #882200;
  --themeIcon: "🌑";
}

[data-theme="dark"] {
  --bg: #0b1220;
  --fg: #e6eef6;
  --highlight: #38bdf8;
  --card: #0b1938;
  --accent: #ffaa00;
  --themeIcon: "☀️";
}

/* ============================================
    UNIVERSAL & RESET STYLES
   ============================================ */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    "Helvetica Neue",
    Arial;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

/* ============================================
    TYPOGRAPHY & LINKS
   ============================================ */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--highlight);
  text-decoration: underline;
}

h2 {
  padding: 4px;
  align-content: center;
  text-align: center;
  font-size: 3em;
  font-weight: bold;
  border-bottom: 3px double var(--accent);
  border-top: 1px solid var(--accent);
}

.muted {
  color: var(--muted);
}

q {
  font-size: large;
  font-style: italic;
  font-weight: bold;
  padding: 10px;
}

p.author {
  text-align: right;
}

/* ============================================
    GENERAL LAYOUT
   ============================================ */
.container {
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* ============================================
    HEADER
   ============================================ */
.site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background-image: linear-gradient(
    15deg,
    color-mix(var(--card) 90%, var(--bg)),
    var(--card) 30%,
    var(--card) 70%,
    color-mix(var(--card) 90%, var(--fg))
  );
  position: fixed;
  top: 0;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  margin: 0;
  font-size: 2rem;
}

#themeToggle {
  background: transparent;
  border: 0;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  font-size: large;
}

#themeToggle::after {
  content: var(--themeIcon);
}

/* ============================================
    HERO SECTION
   ============================================ */
.hero {
  padding: 50px 0 0 0;
  align-content: center;
  justify-content: center;
  text-align: center;
  color: white;
  max-width: 100%;
}

.hero .intro {
  margin: 0 0 8px 0;
  font-weight: bold;
  font-size: xx-large;
}

.tagline {
  margin-top: 6px;
}

/* ============================================
    ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

.about-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ============================================
    SKILLS SECTION
   ============================================ */
.skills-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  word-spacing: 100vw;
  align-items: center;
  text-align: center;
}

.skills-list li {
  background: transparent;
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: bold;
  font-size: medium;
}

/* Meter styling for skill bars */
meter,
meter::-webkit-meter-bar {
  background: none;
  width: 200px;
  height: 16px;
  border-radius: 6px;
  overflow: hidden;
  background-color: color-mix(var(--fg) 50%, transparent);
  box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.3) inset;
}

meter::-webkit-meter-optimum-value {
  background: none;
  background-image:
    linear-gradient(
      60deg,
      var(--accent),
      var(--accent) 80%,
      color-mix(var(--accent) 70%, transparent) 95%
    ),
    linear-gradient(181deg, transparent, 80%, #000000aa 90%),
    linear-gradient(181deg, #ffffffaa, 80%, transparent 90%);
}

:-moz-meter-optimum::-moz-meter-bar {
  background: none;
  background-image:
    linear-gradient(
      60deg,
      var(--accent),
      var(--accent) 80%,
      color-mix(var(--accent) 70%, transparent) 95%
    ),
    linear-gradient(181deg, transparent, 80%, #000000aa 90%),
    linear-gradient(181deg, #ffffffaa, 80%, transparent 90%);
}

/* ============================================
    RESUME/ROLES SECTION
   ============================================ */
.role {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  row-gap: 6px;
  margin-bottom: 14px;
}

.jobcompany {
  padding: 5px 0;
  font-weight: bolder;
  font-size: large;
  align-content: center;
  text-align: center;
  border-top: 1px solid;
  border-bottom: 1px solid;
  border-left: 1px solid;
  border-color: var(--accent);
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.jobtitle {
  padding: 5px 0;
  grid-column: span 4 / span 4;
  border-top: 1px solid;
  border-bottom: 1px solid;
  border-right: 1px solid;
  border-color: var(--accent);
  align-content: center;
  text-align: center;
  font-weight: bold;
  font-size: large;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.jobdates {
  grid-row-start: 2;
  align-content: center;
  text-align: center;
  word-spacing: 100vw;
  font-variant: small-caps;
  padding: 5px;
}

.jobdescription {
  padding: 5px;

  grid-column: span 4 / span 4;
  grid-row: span 2 / span 2;
  grid-column-start: 2;
  grid-row-start: 2;
}

/* ============================================
    CONTACT SECTION
   ============================================ */
address {
  font-style: normal;
}

.contactInfo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  align-content: center;
  text-align: center;
}

/* ============================================
    FOOTER
   ============================================ */
.site-footer {
  margin: 48px 0 18px 0;
  color: var(--muted);
  font-size: 0.95rem;
  align-content: center;
  text-align: center;
}

/* ============================================
    MEDIA QUERIES
   ============================================ */
@media (min-width: 800px) {
  .container {
    display: grid;
    grid-area: span;
    align-items: center;
  }

  .hero {
    background-image: url("../img/intro-bg.jpg");
    background-size: cover;
    width: 100%;
    height: 899px;
  }

  br.mobileOnly {
    display: none;
  }

  .contactSocial {
    grid-column:  span 2 / span 2;
  }

  address,
  section {
    margin-top: 28px;
    max-width: 800px;
    min-width: 800px;
    padding: 24px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 799px) {
  .hero {
    color: var(--fg);
  }

  .jobdates {
    font-size-adjust: 0.5 ch-width;
  }

  address,
  section {
    margin-top: 28px;
    padding: 10px;
  }
}

@media (max-width: 600px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .contactInfo {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-photo {
    width: 100%;
    height: auto;
  }
}
