/* 
- Font sizes (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

- Spacing system (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128

- Font weights:
Default: 400
Semi-bold: 600
Bold: 700

- Colors:
Primary: #0e3c67
Tints:
#4683bc
#e8f0f7
Shades:
Greys: #444

*/

:root {
  /* Brand navy family: the sidebar/photo/toggle "island" colors.
     These stay constant across themes by design. */
  --color-brand-navy: #0e3c67;
  --color-brand-navy-tint: #4683bc;
  --color-brand-navy-text: #e8f0f7;

  /* Page-level colors: these flip between light and dark. */
  --color-bg: #fff;
  --color-surface: #fff;
  --color-text: #444;
  --color-text-muted: #777;
  --color-toc-link: #666;
  --color-toc-sublink: #999;
  --color-toc-year: #aaa;
  --color-accent: #0e3c67;
  --color-accent-hover: #4683bc;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #090c10;
    --color-surface: #1e2733;
    --color-text: #d6dbe2;
    --color-text-muted: #9aa4b0;
    --color-toc-link: #aab3bf;
    --color-toc-sublink: #7d8794;
    --color-toc-year: #5c6470;
    --color-accent: #7fb0e0;
    --color-accent-hover: #a9d2f2;
  }
}

:root[data-theme="dark"] {
  --color-bg: #090c10;
  --color-surface: #1e2733;
  --color-text: #d6dbe2;
  --color-text-muted: #9aa4b0;
  --color-toc-link: #aab3bf;
  --color-toc-sublink: #7d8794;
  --color-toc-year: #5c6470;
  --color-accent: #7fb0e0;
  --color-accent-hover: #a9d2f2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.3s, color 0.3s;
}

main {
  max-width: 130rem;
  margin: 0 auto;
  background-color: var(--color-surface);
  box-shadow: 0 2.4rem 2.4rem rgba(0, 0, 0, 0.06);
  transition: background-color 0.3s;

  display: grid;
  grid-template-columns: 1fr 3fr;
}

ul {
  list-style-type: none;
}

section {
  margin-bottom: 4.8rem;
}

.heading-primary,
.heading-secondary,
.heading-tertiary {
  font-weight: 700;
}

.heading-primary {
  font-size: 5.2rem;
  margin-bottom: 2.4rem;
  color: var(--color-accent);
  letter-spacing: -0.5px;
}

.heading-secondary {
  font-size: 3rem;
  text-transform: uppercase;
}

.heading-tertiary {
  font-size: 2.4rem;
  text-transform: uppercase;
  margin-bottom: 2.4rem;
}

#section-experience .heading-tertiary,
#section-education .heading-tertiary {
  margin-bottom: 3.2rem;
}

.column-right .heading-tertiary {
  color: var(--color-accent);
}

.hidden {
  display: none;
}

.mobile-nav-bar,
.mobile-menu-toggle,
.mobile-menu-close {
  display: none;
}

*:focus {
  outline: none;
  box-shadow: 0 0 0 0.4rem rgba(70, 131, 188, 0.5);
}

/*******************/
/* PHOTO CONTAINER */
/*******************/
.header-left {
  background-color: var(--color-brand-navy);
  padding: 3.4rem;
  box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, 0.1);
  display: grid;
  align-items: center;
  justify-items: center;
}

.photo-img-box {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-img-box img {
  border: 3px solid #fff;
  box-shadow: 0 0 0 0.5rem var(--color-brand-navy);
}

.photo {
  width: 25rem;
  height: 25rem;
  border-radius: 50%;
}

/**********************/
/* HEADER RIGHT PANEL */
/**********************/
.header-right {
  padding: 0 3.4rem;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
}

.header-text {
  text-align: center;
  margin-top: 3.2rem;
}

.header-right .description {
  align-self: stretch;
  text-align: left;
}

/*****************/
/* CONTROL PANEL */
/*****************/
.control-panel {
  position: absolute;
  top: 7%;
  right: 2%;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.download-button {
  cursor: pointer;
  color: var(--color-brand-navy-text);
  border: 2.5px solid var(--color-brand-navy);
  border-radius: 2rem;
  padding: 0.6rem 1.2rem 0.5rem 1.2rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  position: relative;
}

.download-button:link,
.download-button:visited {
  text-decoration: none;
  background: var(--color-brand-navy);
  transition: all 0.3s;
  box-shadow: 0 0.8rem 1.2rem rgba(0, 0, 0, 0.1);
}

.download-button:hover,
.download-button:active {
  color: var(--color-brand-navy-text);
  background-color: var(--color-brand-navy-tint);
  border-color: var(--color-brand-navy-tint);
}

.download-button:focus {
  outline: none;
  box-shadow: 0 0 0 0.4rem rgba(70, 131, 188, 0.5);
}

.download-button .download-button-tooltip {
  visibility: hidden;
  width: max-content;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: 1.2rem;
  text-align: center;
  padding: 5px;
  border-radius: 6px;
  border: 1px solid var(--color-brand-navy);

  position: absolute;
  z-index: 999;
  bottom: calc(-100% - 5px);
  left: 50%;
  transform: translate(-50%);
}

.download-button:hover .download-button-tooltip {
  visibility: visible;
}

.download-button .icon {
  font-size: 1.6rem;
  --ionicon-stroke-width: 56px;
  transform: scale(1.15);
}

/*******************/
/* LANGUAGE SWITCH */
/*******************/
/* Hide default checkbox */
.toggle-checkbox {
  display: none;
}

/* Toggle container */
.toggle-container {
  position: relative;
  width: fit-content;
  border: 2.5px solid var(--color-brand-navy);
  border-radius: 2rem;
  background: var(--color-brand-navy);
  font-weight: 700;
  color: var(--color-brand-navy-text);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0.8rem 1.2rem rgba(0, 0, 0, 0.1);

  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* Add focus functionality to the toggle label */
.toggle-container:focus {
  outline: none;
  box-shadow: 0 0 0 0.4rem rgba(70, 131, 188, 0.5);
}

/* Toggle container hover */
.toggle-container:hover,
.toggle-container:active {
  background-color: var(--color-brand-navy-tint);
  border: 2.5px solid var(--color-brand-navy-tint);
  transition: all 0.3s;
}
.toggle-checkbox + .toggle-container:hover span:first-child,
.toggle-checkbox + .toggle-container:active span:first-child {
  color: var(--color-brand-navy-tint);
}
.toggle-checkbox:checked + .toggle-container:hover span:last-child,
.toggle-checkbox:checked + .toggle-container:active span:last-child {
  color: var(--color-brand-navy-tint);
}

/* Toggle */
.toggle-container::before {
  content: "";
  position: absolute;
  width: 50%;
  height: 100%;
  left: 0%;
  border-radius: 2rem;
  background: #fff;
  transition: all 0.3s;
}

/* Format text containers */
.toggle-container span {
  font-size: 1.6rem;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem 0.5rem 1.2rem;
  text-align: center;
  z-index: 1;
}

/* Button move */
.toggle-checkbox:checked + .toggle-container::before {
  left: 50%;
}

/* Icon-based toggle (theme switch) */
.theme-toggle .toggle-container span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle .toggle-container ion-icon {
  font-size: 1.6rem;
  --ionicon-stroke-width: 64px;
}

/* Text color change */
.toggle-checkbox:checked + .toggle-container span:first-child {
  color: var(--color-brand-navy-text);
  transition: color 0.3s;
}
.toggle-checkbox:checked + .toggle-container span:last-child {
  color: var(--color-brand-navy);
  transition: color 0.3s;
}
.toggle-checkbox + .toggle-container span:first-child {
  color: var(--color-brand-navy);
  transition: color 0.3s;
}
.toggle-checkbox + .toggle-container span:last-child {
  color: var(--color-brand-navy-text);
  transition: color 0.3s;
}

/***************/
/* LEFT COLUMN */
/***************/
.column-left {
  background-color: var(--color-brand-navy);
  color: var(--color-brand-navy-text);
  font-size: 1.6rem;
  padding: 0 3.4rem;
  line-height: 1.2;

  box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, 0.1);
}

.icon {
  font-size: 2rem;
}

address {
  font-style: normal;

  display: grid;
  grid-template-columns: 1fr;
}

.address-text {
  padding-bottom: 1.6rem;

  display: flex;
  align-items: start;
  gap: 1.6rem;
}

.address-link:link,
.address-link:visited {
  text-decoration: none;
  font-size: 1.6rem;
  color: var(--color-brand-navy-text);
  transition: all 0.3s;
}

.address-link:hover,
.address-link:active {
  color: #fff;
}

.contact-links {
  display: none;
}

.list {
  display: grid;
  grid-template-columns: 1fr;
}

.list-item {
  padding-bottom: 1.2rem;

  display: grid;
  align-items: start;
  grid-template-columns: 1.6rem 1fr;
  gap: 1.6rem;
  min-width: 0;
}

.list-item span {
  overflow-wrap: break-word;
  min-width: 0;
}

.skill-group {
  font-size: 1.8rem;
  margin-bottom: 1.6rem;
}

.skill-group:not(:first-of-type) {
  margin-top: 1.8rem;
}

/****************/
/* RIGHT COLUMN */
/****************/
.column-right {
  font-size: 1.6rem;
  padding: 0 4.8rem;
  line-height: 1.2;
}

.exp-item {
  margin-bottom: 4.4rem;
}

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

.company-place-period {
  margin-bottom: 0.8rem;

  display: flex;
  align-items: start;
  justify-content: space-between;
}

.company-name {
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1.2rem;

  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.company-name .icon {
  color: var(--color-accent);
  font-size: 2rem;
}

.company-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.company-info .company-name {
  margin-bottom: 0;
}

.company-annotation {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0 0 0 3.2rem;
  line-height: 1.2;
}

.period-place {
  margin-bottom: 1.2rem;

  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.period {
  font-size: 1.4rem;
  color: var(--color-text-muted);

  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.period icon {
  font-size: 1.4rem;
}

.place {
  font-size: 1.4rem;
  color: var(--color-text-muted);

  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.period icon,
.place icon {
  font-size: 1.8rem;
}

.position {
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

.description {
  font-size: 1.6rem;
  line-height: 1.4;
}

.duty {
  padding-bottom: 1.4rem;
  line-height: 1.4;

  display: grid;
  align-items: start;
  grid-template-columns: 2.4rem 1fr;
  gap: 1.6rem;
}

.duty .icon {
  color: var(--color-accent);
  padding-top: 0.4rem;
}

/***********************/
/* EXPERIENCE TOC NAV  */
/***********************/
.toc {
  display: none;
  position: fixed;
  left: calc(50vw + 65rem + 2rem);
  top: 4rem;
  font-size: 1.8rem;
  width: 24rem;
  line-height: 1.4;
}

.toc-name:link,
.toc-name:visited {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  margin-bottom: 1.6rem;
  transition: color 0.2s;
}

.toc-name:hover,
.toc-name:active {
  color: var(--color-accent-hover);
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-item {
  padding-bottom: 0.6rem;
}

.toc-item:last-child {
  padding-bottom: 0;
}

.toc-link:link,
.toc-link:visited {
  text-decoration: none;
  color: var(--color-toc-link);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.2rem;
  transition: color 0.2s;
}

.toc-link:hover,
.toc-link:active {
  color: var(--color-accent);
}

.toc-year {
  font-size: 1.4rem;
  color: var(--color-toc-year);
  flex-shrink: 0;
}

.toc-sublist {
  list-style: none;
  padding-left: 1.2rem;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

.toc-subitem {
  padding-bottom: 0.4rem;
}

.toc-subitem:last-child {
  padding-bottom: 0;
}

.toc-sublink:link,
.toc-sublink:visited {
  text-decoration: none;
  color: var(--color-toc-sublink);
  font-size: 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  transition: color 0.2s;
}

.toc-sublink:hover,
.toc-sublink:active {
  color: var(--color-accent);
}
