html, body, div, span, applet, object, iframe, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

:root {
  --bg: #121212;
  --text: #b0b0b0;
  --heading: #e0e0e0;
  --border: #333;
  --border-hover: #666;
  --hr: #262626;
  --mark-bg: #1e1e1e;
  --mark-text: #b0b0b0;
  --bar-bg: #1a1a1a;
  --btn-bg: #e0e0e0;
  --btn-text: #121212;
  --footer: #666;
  --secondary: #8a8a8a;
  --surface-border: #363839;
  --surface-border-hover: #4a4c4d;
  --client-filter: grayscale(100%) brightness(1.15) contrast(1.05) opacity(0.92);
}

html[data-theme="light"] {
  --bg: #ffffff;
  --text: #555;
  --heading: #000;
  --border: #ebebeb;
  --border-hover: #9b9b9b;
  --hr: #f8f8f8;
  --mark-bg: #f8f8f8;
  --mark-text: #555;
  --bar-bg: #f5f5f5;
  --btn-bg: #000;
  --btn-text: #fff;
  --footer: #9b9b9b;
  --secondary: #6e6e73;
  --surface-border: #d6d6d8;
  --surface-border-hover: #bbbbbe;
  --client-filter: grayscale(100%);
}

body {
  width: 100%;
  margin: 80px 0;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--bg);
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

main p,
main section {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1 {
  width: 600px;
  color: var(--heading);
  font-size: 1.5rem;
  font-weight: 400;
}

h2 {
  font-size: 1.25rem;
  font-weight: 400;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all .2s ease-in-out !important;
}
a:hover {
  border-bottom: 1px solid var(--border-hover);
}

header, main, footer {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 28px);
  box-sizing: border-box;
}

.float {
  position: fixed;
  width: 90px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  text-align: center;
}

img {
  max-width: 100%;
  filter: grayscale(100%);
}

.row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  margin: 60px 0;
}

.column {
  margin-right: 40px;
}
.column:last-of-type {
  margin-right: 0;
}

header .row, .row .clients, .contact-bar {
  align-items: center;
}

.intro {
  align-items: flex-end;
}

.intro {
  height: 300px;
}

hr {
  width: 90px;
  border: 1px solid var(--hr);
  margin: 0 auto 0 0;
}

.contact-bar {
  border-radius: 8px;
  padding: 7px 7px 7px 15px;
  background-color: var(--bar-bg);
  color: var(--heading);
  font-size: 0.875rem;
}

a.email-button, a.email {
  color: var(--btn-text);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: none;
  z-index: 2;
}
a.email-button:hover, a.email:hover {
  opacity: 0.8;
}

a.email-button {
  border-radius: 6px;
  padding: 11px;
  background-color: var(--btn-bg);
  border: 1px solid transparent;
  box-sizing: border-box;
}

a.email-button--icon {
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="dark"] a.email-button--icon {
  background-color: transparent;
  border-color: var(--surface-border);
}

html[data-theme="dark"] a.email-button--icon:hover {
  border-color: var(--surface-border-hover);
  opacity: 1;
}

a.email-button img {
  vertical-align: middle;
  filter: none;
  display: block;
}

a.email {
  border-radius: 4px;
  padding: 11px 13px 12px;
  background-color: var(--btn-bg);
}

.thumbnails a {
  border: none;
  z-index: 2;
}
.thumbnails a:hover {
  opacity: 0.8;
}
.thumbnails a img {
  border-radius: 8px;
  width: 293.33333px;
  height: auto;
}

.thumbnails, .testimonials {
  margin-bottom: 80px;
}

.question {
  color: var(--heading);
  font-weight: 400;
  margin-bottom: 20px;
}

mark {
  border-radius: 4px;
  color: var(--mark-text);
  background: var(--mark-bg);
}

.gulpes-highlight {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  line-height: 1.25;
}

.gulpes-highlight mark {
  display: inline-block;
  padding: 0.12em 1.2em 0.14em 0.28em;
}

.gulpes-external-link {
  position: absolute;
  top: 0.12em;
  right: 0.25em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
  color: var(--secondary);
  line-height: 0;
  text-decoration: none;
  border: none;
  border-bottom: none;
  transition: color 0.2s, background-color 0.2s;
}

.gulpes-external-link:hover {
  color: var(--heading);
  background-color: var(--bg);
  border-bottom: none;
  opacity: 1;
}

.author {
  display: flex;
  align-items: center;
  color: var(--footer);
  margin-top: 20px;
}
.author img {
  margin-right: 10px;
  border-radius: 100%;
}

footer, footer a {
  color: var(--footer);
}

.clients img {
  filter: var(--client-filter);
  transition: filter 0.3s, opacity 0.3s;
}

html[data-theme="dark"] .clients img[data-invert-logo] {
  filter: var(--client-filter) invert(1);
}

html[data-theme="dark"] header .row > img:first-of-type,
html[data-theme="dark"] header .row > .logo-link > img {
  filter: grayscale(100%) brightness(0) invert(1);
  opacity: 0.92;
}

/* Header controls */

.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 10px;
}

.row.link {
  flex-wrap: wrap;
  gap: 14px 22px;
}

.lang-switch {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border: 1px solid var(--surface-border);
  border-radius: 5px;
  transition: color 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  color: var(--heading);
  border-color: var(--surface-border-hover);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 0;
  color: var(--secondary);
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle svg {
  display: block;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--surface-border-hover);
  color: var(--heading);
}

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

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

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

/* Section titles, skills and selected work */

.section-title {
  color: var(--heading);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.career {
  margin: 60px 0;
}

/* Full-bleed so the diagram uses the viewport width; scrolls sideways when narrower than 1100px. */
.career-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-inline: calc(50% - 50vw);
  padding-inline: clamp(16px, 4vw, 28px);
  box-sizing: border-box;
  width: 100vw;
}

.career-path {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  color: var(--heading);
}

.career-path--h {
  max-width: 1400px;
  min-width: 1100px;
}

.career-path--v {
  display: none;
  max-width: 400px;
  margin: 0 auto;
}

.career-hint {
  display: none;
  font-size: 0.8125rem;
  color: var(--secondary);
  margin-top: 8px;
}

.presentation p + p {
  margin-top: 14px;
}

.skills p {
  margin-bottom: 10px;
}

.work {
  margin: 60px 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 18px 20px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.work-card:hover {
  border-color: var(--surface-border-hover);
}

.work-card h3 {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.work-card h3 a {
  color: inherit;
  border-bottom: none;
}

.work-card h3 a:hover {
  border-bottom: 1px solid var(--border-hover);
}

.work-card p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.work-card .tags {
  font-size: 0.8125rem;
  color: var(--secondary);
}

.work-note {
  font-size: 0.9rem;
  color: var(--secondary);
  margin-top: 16px;
}

.work-card .why {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--secondary);
  margin-bottom: 10px;
}

.work-card .more {
  font-size: 0.875rem;
}

.governance p {
  margin-bottom: 10px;
}

/* Architecture pages (work/) */

.logo-link {
  border-bottom: none;
}

.article .back {
  margin-top: 20px;
  font-size: 0.875rem;
}

.page-title {
  width: auto;
  max-width: 720px;
  font-size: 1.75rem;
  line-height: 1.3;
  margin: 24px 0 12px;
}

.lede {
  max-width: 720px;
  color: var(--heading);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.article-section {
  max-width: 720px;
  margin: 36px 0;
}

.article-section p {
  margin-bottom: 10px;
}

.flow {
  list-style: decimal outside;
  padding-left: 1.4em;
}

.flow li {
  margin-bottom: 10px;
  padding-left: 0.3em;
}

.flow li::marker {
  color: var(--secondary);
  font-weight: 500;
}

.article code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  color: var(--heading);
  background: var(--mark-bg);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.article b {
  color: var(--heading);
  font-weight: 500;
}

/* Responsive styling adjustments */

@media screen and (max-width: 850px) {
  .row {
    margin: 20px 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header .row {
    gap: 16px;
  }

  .header-controls {
    justify-content: center;
  }

  .lang-switch {
    padding: 8px 12px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }

  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
  }

  a.email-button--icon {
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
  }

  .row.link {
    justify-content: center;
  }

  .skills {
    margin-top: 20px;
  }

  .career {
    margin: 20px 0;
  }

  .career-scroll {
    overflow-x: visible;
    margin-inline: 0;
    padding-inline: 0;
    width: auto;
  }

  .career-path--h,
  .career-hint {
    display: none;
  }

  .career-path--v {
    display: block;
  }


  .work {
    margin: 20px 0;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.375rem;
  }

  .article-section {
    margin: 24px 0;
  }

  .intro {
    flex-direction: column;
    align-items: center;
    height: auto;
  }

  .intro img {
    width: auto;
    height: 200px;
    margin-bottom: 20px;
  }

  #introText {
    width: 100%;
    max-width: 36rem;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
  }

  body {
    margin: 40px 0;
  }

  h1 {
    font-size: 1.375rem;
    width: 100%;
    max-width: none;
  }

  hr {
    margin-left: auto;
    margin-right: auto;
  }

  .thumbnails a {
    width: 30%;
  }
  .thumbnails a img {
    width: 100%;
  }

  .contact-bar {
    flex-direction: column;
    padding: 24px 20px;
    text-align: center;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
  }
  .contact-bar .message {
    width: 100%;
  }
  .contact-bar a.email-button:not(.email-button--icon) {
    margin-top: 0;
    align-self: center;
  }
}

@media screen and (max-width: 550px) {
  .presentation {
    padding-top: 20px;
  }
}

@media screen and (max-width: 500px) {
  .clients {
    width: 100%;
    max-width: none;
    justify-content: center;
    row-gap: 18px;
    column-gap: 16px;
  }

  .clients img {
    height: auto !important;
    max-height: 40px;
    width: auto;
  }

  .thumbnails a {
    width: 100%;
  }
}

@media screen and (max-width: 375px) {
  .intro img {
    width: auto;
    height: 150px;
  }

  #introText h1 {
    font-size: 1.2rem;
  }

  .intro {
    padding: 12px 0;
  }

  .column {
    margin: 10px 0;
  }

  .clients {
    column-gap: 12px;
    row-gap: 14px;
  }

  .clients img {
    max-height: 34px;
  }

  .gulpes-external-link {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    top: 50%;
    right: 0.1em;
    transform: translateY(-50%);
  }

  .gulpes-highlight mark {
    padding-right: 2.85em;
  }
}
