:root {
  /* Solarized-inspired palette adjusted for WCAG 2.2 AAA contrast */
  --base03: #002b36;
  --base02: #073642;
  --base01: #acc2c9;
  --base00: #acc2ca;
  --base0: #b1c2c4;
  --base1: #b3c1c1;
  --yellow: #e5b930;
  --orange: #ffab76;
  --red: #ffa7a4;
  --magenta: #ff9eea;
  --violet: #b4b9ff;
  --blue: #64c9ff;
  --cyan: #5ad1c8;
  --green: #b5c930;
}

/* Optional high contrast preference: push ratios well beyond AAA */
@media (prefers-contrast: more) {
  :root {
    --base01: #d4e4e8; /* ≈12.6:1 */
    --base00: #d6e6ea;
    --base0: #e0eff1; /* ≈15.1:1 */
    --base1: #f1fdfe; /* ≈18.7:1 */
    --yellow: #ffd75a; /* ≈12.5:1 */
    --orange: #ffc89b; /* ≈11.9:1 */
    --red: #ffbebc; /* ≈11.3:1 */
    --magenta: #ffb5f0; /* ≈12.1:1 */
    --violet: #d4d7ff; /* ≈12.9:1 */
    --blue: #9ed9ff; /* ≈12.3:1 */
    --cyan: #9ff0e7; /* ≈15.8:1 */
    --green: #d4e86b; /* ≈12.8:1 */
  }
}

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

/* Skip to content link - accessibility for keyboard navigation */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--cyan);
  color: var(--base03);
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 4px 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.skip-to-content:hover,
.skip-to-content:focus {
  top: 0;
  color: var(--base03);
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus {
  color: var(--cyan);
}

/* Enhanced focus states for keyboard navigation - WCAG compliant */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

/* High contrast mode - even more visible focus */
@media (prefers-contrast: more) {
  a:focus,
  button:focus,
  input:focus,
  textarea:focus,
  select:focus {
    outline: 4px solid var(--cyan);
    outline-offset: 3px;
  }
}

body {
  font-family: "Lato", sans-serif;
  background-color: var(--base03);
  color: var(--base0);
  line-height: 1.6;
  font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Fira Mono", monospace;
  color: var(--base1);
  font-weight: 500;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}

header {
  padding: 40px 0 24px;
  border-bottom: 2px solid var(--base02);
  margin-bottom: 40px;
}

header h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  color: var(--cyan);
  margin-bottom: 10px;
  font-weight: 700;
}

header .tagline {
  font-size: 1.1em;
  color: var(--base01);
  font-weight: 300;
}

section {
  margin-bottom: 40px;
  padding: 20px;
  background-color: var(--base02);
  border-left: 4px solid var(--blue);
  border-radius: 4px;
}

section h2 {
  font-size: 1.7em;
  margin-bottom: 20px;
  color: var(--yellow);
}

section h3 {
  font-size: 1.2em;
  margin: 20px 0 12px;
  color: var(--green);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.tech-item {
  background-color: var(--base03);
  padding: 10px 16px;
  border-radius: 4px;
  border: 1px solid var(--base01);
  font-family: "Fira Mono", monospace;
  font-size: 0.85em;
  color: var(--cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.tech-item.primary {
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 500;
}

.speaking-event {
  margin: 15px 0;
  padding: 15px;
  background-color: var(--base03);
  border-left: 3px solid var(--violet);
  border-radius: 3px;
}

.speaking-event h4 {
  color: var(--violet);
  font-size: 1em;
  margin-bottom: 5px;
}

.speaking-event .event-type {
  color: var(--base01);
  font-size: 0.85em;
}

ul {
  list-style: none;
  padding-left: 0;
}

ul li {
  padding: 6px 0;
  padding-left: 26px;
  position: relative;
}

ul li:before {
  content: "▸";
  position: absolute;
  left: 8px;
  color: var(--green);
}

.highlight {
  color: var(--cyan);
  font-weight: 400;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 15px 20px;
  background-color: var(--base03);
  border-radius: 4px;
  border-left: 3px solid var(--cyan);
  box-shadow: 0 0 0 1px rgba(90, 209, 200, 0.28);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--base1);
  cursor: pointer;
  min-height: 72px;
}

.contact-item:hover,
.contact-item:focus {
  border-left-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(100, 201, 255, 0.38);
}

.contact-item:hover .contact-text,
.contact-item:focus .contact-text {
  color: var(--blue);
}

.contact-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Fira Mono", monospace;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-item .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  color: var(--cyan);
  min-width: 28px;
}

.contact-item .icon .bi {
  line-height: 1;
  color: inherit;
  display: inline-block;
}

.contact-item .label {
  color: var(--base01);
  font-size: 0.85em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-item .contact-text {
  display: block;
  width: 100%;
  color: var(--base1);
  font-size: 1em;
  transition: color 0.3s ease;
  padding-left: calc(28px + 8px);
  line-height: 1.5;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

footer {
  text-align: center;
  padding: 32px 0;
  color: var(--base01);
  border-top: 2px solid var(--base02);
  margin-top: 40px;
}

footer .domain {
  font-family: "Fira Mono", monospace;
  color: var(--cyan);
  font-size: 1.1em;
}

body.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
}

body.error-page .error-container {
  text-align: center;
  max-width: 480px;
}

body.error-page .error-code {
  font-family: "Fira Mono", monospace;
  font-size: clamp(3.5rem, 15vw, 5rem);
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 20px;
}

body.error-page h1 {
  color: var(--yellow);
  font-size: 1.6em;
  margin-bottom: 20px;
}

body.error-page p {
  font-size: 1.05em;
  color: var(--base1);
  margin-bottom: 30px;
}

body.error-page a {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--base02);
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  border-radius: 4px;
  border: 2px solid var(--cyan);
  font-family: "Fira Mono", monospace;
  transition: all 0.3s ease;
}

body.error-page a:hover {
  background-color: var(--cyan);
  color: var(--base03);
}

@media (min-width: 600px) {
  body {
    font-size: 17px;
  }

  .container {
    padding: 28px 24px;
  }

  section {
    padding: 24px;
  }

  .tech-stack {
    gap: 14px;
  }

  body.error-page .error-container {
    max-width: 560px;
  }

  body.error-page h1 {
    font-size: 1.7em;
  }
}

@media (min-width: 768px) {
  body {
    font-size: 18px;
  }

  .container {
    max-width: 1000px;
    padding: 40px 32px;
  }

  header {
    padding: 60px 0 40px;
    margin-bottom: 60px;
  }

  header h1 {
    font-size: 3em;
  }

  header .tagline {
    font-size: 1.3em;
  }

  section {
    margin-bottom: 60px;
    padding: 30px;
  }

  section h2 {
    font-size: 2em;
  }

  section h3 {
    font-size: 1.4em;
    margin: 25px 0 15px;
  }

  .contact-item {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .contact-heading {
    width: auto;
    max-width: none;
  }

  .contact-item .contact-text {
    padding-left: 0;
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .tech-stack {
    gap: 16px;
  }

  .tech-item {
    font-size: 0.9em;
  }

  footer {
    margin-top: 60px;
    padding: 40px 0;
  }

  body.error-page .error-code {
    font-size: clamp(4.5rem, 10vw, 7.5rem);
  }

  body.error-page h1 {
    font-size: 2em;
  }

  body.error-page p {
    font-size: 1.2em;
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 19px;
  }

  .container {
    padding: 48px 32px;
  }

  header h1 {
    font-size: 3.2em;
  }

  section {
    padding: 32px;
  }

  .tech-stack {
    gap: 18px;
  }
}
