/* ===== CSS Variables ===== */
:root {
  --accent: #26494a;
  --paper: #ffffff;
  --background: #dedede;
  --text: #111111;
  --muted: rgba(0, 0, 0, 0.7);
  --shadow: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #ffffff;
    --background: #3d3a34;
    --text: #181716;
    --muted: rgba(233, 238, 242, 0.75);
    --shadow: rgba(17, 17, 17, 0.35);
  }

  .page {
    filter: sepia(0.12);
  }
}

/* ===== Base Styles ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 10.2pt;
  line-height: 1.45;
  color: var(--text);
  background: var(--background);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Page Layout ===== */
.page {
  width: 21cm;
  min-height: 29.7cm;
  max-height: none;
  margin: 1cm auto;
  padding: 0;
  background: var(--paper);
  box-shadow: 0 0 5px var(--shadow);
  overflow: hidden;
  position: relative;
}

#hole1,
#hole2 {
  display: none;
}

/* ===== Sidebar / Contact Info ===== */
#contact-info {
  position: relative;
  z-index: 99;
  min-height: 297mm;
  height: 100%;
  background: var(--accent);
  color: white;
}

.profile-info {
  padding: 1em 2em 2em 2.2em;
}

.profile-info .material-icons {
  width: 1em;
  height: 1em;
  font-size: 1em;
  vertical-align: middle;
}

.profile-info h2 {
  font-size: 1.125rem;
  font-weight: bold;
  letter-spacing: 0.05rem;
}

.profile-info .description {
  margin: 0 0 1em 0;
  font-size: 1em;
}

/* Header Name Section */
#name {
  padding: 5.7em 2em 1em 2em;
  text-align: center;
}

#name h1,
#name .subtitle {
  margin-block-end: 0;
}

#name h1 {
  font-size: 1.125rem;
  font-weight: bold;
  line-height: 1.35;
  letter-spacing: 0.05rem;
}

#name .subtitle {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.05rem;
}

/* Profile Image */
#profile-image {
  margin: 0 0 2.5em 0;
  width: 100%;
  max-height: 5cm;
  background: #333;
  text-align: right;
}

#profile-image img {
  display: block;
  width: auto;
  height: 5cm;
  margin-left: auto;
  transition: filter 0.35s ease;
}

#profile-image img:hover {
  filter: grayscale(100%);
}

/* Contact Information */
.contact-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  white-space: normal;
}

.contact-info + .contact-info {
  margin-top: 0.55em;
}

.contact-info a {
  color: white;
}

address {
  font-size: 1em;
  line-height: 1.35;
  font-style: normal;
}

address a {
  text-decoration: none;
}

/* ===== Typography ===== */
h2 {
  font-size: 1.125rem;
  font-weight: bold;
  letter-spacing: 0.05rem;
}

h3 {
  font-size: 1.5rem;
  /* font-weight: bold; */
  letter-spacing: 0.05rem;
}

h4 {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.05rem;
}

.item h1,
.item h2,
.item h3,
.item h4,
.item h5,
.item h6 {
  margin-block-end: 0;
}

/* ===== Main Content ===== */
.main-content {
  padding: 1.85cm 1.25cm 1cm;
}

.main-content section {
  margin-bottom: 0.95cm;
}

/* .main-content h2 {
  margin: 2em 0;
  text-decoration: underline 0.125em solid var(--accent);
} */

.item {
  position: relative;
  margin-bottom: 0.75em;
}

/* Experience Section */
.experience {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin-bottom: 0.75em;
}

.experience .title {
  margin: 0;
  grid-column: 1 / 5;
  grid-row: 1;
}

.experience .employer {
  font-size: 0.95em;
  grid-column: 1 / 5;
  grid-row: 2;
}

.experience .location {
  font-size: 0.95em;
  justify-self: end;
  grid-column: 5 / 7;
  grid-row: 2;
}

.experience .employment-timespan {
  font-size: 0.95em;
  justify-self: end;
  grid-column: 5 / 7;
  grid-row: 1;
}

.experience .description {
  display: none;
  grid-column: 1 / 7;
  grid-row: 4;
}

.description {
  margin: 0.75em 0;
  font-size: 0.85em;
}

/* ===== Footer ===== */
footer {
  position: absolute;
  bottom: 0;
  z-index: 10;
  width: 100%;
  margin-bottom: 1.3em;
  border-top: 0.25em solid var(--accent);
  text-align: center;
}

footer nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
}

footer nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

footer nav a:hover {
  opacity: 0.7;
}

/* ===== Skills List ===== */
.skills-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.skills-list li {
  margin: 0;
  display: inline;
  word-wrap: break-word;
  white-space: break-spaces;
}

.skills-list li:not(:last-of-type)::after {
  content: "|";
  margin: 0 0.25em;
}

/* ===== Utility Classes ===== */
.mb1 {
  margin-bottom: 1em;
}

.interHeading {
  display: flex;
  align-items: center;
  margin: 1em 0;
  text-transform: uppercase;
}

.interHeading::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 1rem;
  background-color: currentColor;
  opacity: 0.6;
}

/* ===== Material Icons ===== */
.material-icons {
  display: inline-block;
  font-family: "Material Icons";
  font-size: 24px;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== Print Styles ===== */
@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 100%;
    height: 100%;
    background: white;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .container {
    margin: 0;
    padding: 0;
  }

  .page {
    margin: 0;
    padding: 0;
    max-height: 29.7cm;
    box-shadow: none;
  }

  #hole1,
  #hole2 {
    display: block;
    position: absolute;
    left: 0.5cm;
    z-index: 999;
    width: 0.7cm;
    height: 0.7cm;
    border: 2px dotted var(--shadow);
    border-radius: 50%;
  }

  #hole1 {
    top: 10.85cm;
  }

  #hole2 {
    top: 18.85cm;
  }

  a[href]:not([href^="mailto:"])::after {
    content: " (" attr(href) ")";
    font-size: x-small;
  }
}

/* ===== Accessibility ===== */
@media (forced-colors: active) {
  #contact-info {
    border-right: 2px solid white;
  }
}
