/* Shared site foundation: theme variables, reset, dock navigation, scrollbar.
   Writing-specific layout and components live in /article.css. */

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-text-tertiary: #888888;
  --color-border: #d4d4d4;
  --color-border-light: #e5e5e5;
  --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --color-bg: #1c1c1e;
  --color-surface: #2c2c2e;
  --color-text: #e5e5e5;
  --color-text-secondary: #a3a3a3;
  --color-text-tertiary: #737373;
  --color-border: #333333;
  --color-border-light: #262626;
}

* { box-sizing: border-box; }

/* Dock navigation */
:root {
  --dock-bg: var(--color-bg);
  --dock-bg-hover: var(--color-surface);
  --dock-text: var(--color-text);
  --dock-muted: var(--color-text-secondary);
  --dock-border: var(--color-border-light);
  --dock-width: 190px;
  --dock-button: 35px;
  --dock-gap: 8px;
  --dock-row: 24px;
  --dock-open-height: 150px;
  --dock-radius: calc(var(--dock-button) / 2);
  --dock-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  --dock-focus: rgba(26, 26, 26, .32);
  --dock-ease: cubic-bezier(.16, 1, .3, 1);
  --nav-bg: #FCFCFD;
  --nav-border: #E6E7EB;
  --nav-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --dock-shadow: 0 10px 34px rgba(0, 0, 0, .32);
  --dock-focus: rgba(229, 229, 229, .36);
  --nav-bg: #1F2023;
  --nav-border: #303238;
  --nav-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 2px 10px rgba(0, 0, 0, 0.18);
}

/* Sizing/surface overrides live on .dock so other --dock-* consumers
   (e.g. the CV download button) are unaffected. */
.dock {
  --dock-width: 213.75px;
  --dock-button: 39.375px;
  --dock-gap: 9px;
  --dock-row: 27px;
  --dock-open-height: 168.75px;
  --dock-bg: var(--nav-bg);
  --dock-border: var(--nav-border);
  --dock-shadow: var(--nav-shadow);
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 60;
  inline-size: min(
    var(--dock-width),
    calc(100vw - (var(--dock-button) * 2) - (var(--dock-gap) * 2) - 22.5px)
  );
  transform: translateX(-50%);
}

/* Shopify Spring 2026 reference scaled 1.125x: constant 213.75px width, 39.375px collapsed height, 27px rows. */
.dock__panel {
  position: relative;
  inline-size: 100%;
  block-size: var(--dock-button);
  overflow: hidden;
  border: 1px solid var(--dock-border);
  border-radius: var(--dock-radius);
  background: var(--dock-bg);
  box-shadow: var(--dock-shadow);
  contain: layout paint;
  transform: translateZ(0);
  transition:
    block-size .42s var(--dock-ease),
    border-color .2s ease,
    background-color .2s ease,
    box-shadow .24s ease;
  will-change: block-size;
}

.dock__panel.is-open {
  block-size: var(--dock-open-height);
}

.dock__trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  inline-size: 100%;
  block-size: var(--dock-button);
  padding: 0 12.375px 0 13.5px;
  border: 0;
  background: transparent;
  color: var(--dock-text);
  font: inherit;
  font-size: 15.75px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    opacity .18s ease,
    transform .26s var(--dock-ease);
  -webkit-tap-highlight-color: transparent;
}

.dock__panel.is-open .dock__trigger {
  opacity: 0;
  pointer-events: none;
  transform: translateY(4.5px);
}

.dock__hamburger {
  position: relative;
  display: block;
  inline-size: 15.75px;
  block-size: 11.25px;
  flex: 0 0 auto;
}

.dock__hamburger::before,
.dock__hamburger::after,
.dock__hamburger span {
  content: "";
  position: absolute;
  left: 0;
  inline-size: 100%;
  block-size: 1.6875px;
  border-radius: 999px;
  background: currentColor;
}

.dock__hamburger::before {
  top: 0;
}

.dock__hamburger span {
  top: 4.78125px;
}

.dock__hamburger::after {
  bottom: 0;
}

.dock__menu {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 6.75px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4.5px);
  transition:
    opacity .2s ease,
    transform .28s var(--dock-ease);
}

.dock__panel.is-open .dock__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: .08s;
}

.dock__top {
  position: relative;
  block-size: 31.5px;
  margin: 0 6.75px;
}

.dock__theme-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  inline-size: 100%;
  block-size: 31.5px;
  padding: 2.25px;
  border: 0;
  border-radius: 999px;
  background: var(--dock-bg-hover);
  color: var(--dock-muted);
  font: inherit;
  font-size: 13.5px;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  outline: none;
  transition:
    color .16s ease,
    background-color .16s ease,
    opacity .18s ease,
    transform .24s var(--dock-ease);
  -webkit-tap-highlight-color: transparent;
}

.dock__theme-toggle::before {
  content: "";
  position: absolute;
  inset-block: 2.25px;
  left: 2.25px;
  inline-size: calc(50% - 2.25px);
  border: 1px solid var(--dock-border);
  border-radius: 999px;
  background: var(--dock-bg);
  box-shadow: 0 1.125px 4.5px rgba(0, 0, 0, .08);
  transition: transform .24s var(--dock-ease);
}

[data-theme="dark"] .dock__theme-toggle::before {
  transform: translateX(100%);
}

.dock__theme-option {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--dock-muted);
  transition: color .16s ease;
}

[data-theme="light"] .dock__theme-option--light,
[data-theme="dark"] .dock__theme-option--dark {
  color: var(--dock-text);
}

.dock__theme-icon,
.dock__social-back-icon {
  inline-size: 16.875px;
  block-size: 16.875px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock__social-back {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 5.625px;
  inline-size: auto;
  block-size: 31.5px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dock-text);
  font: inherit;
  font-size: 14.625px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4.5px);
  transition:
    color .16s ease,
    background-color .16s ease,
    opacity .18s ease,
    transform .24s var(--dock-ease);
  -webkit-tap-highlight-color: transparent;
}

.dock[data-dock-view="social"] .dock__theme-toggle {
  opacity: 0;
  pointer-events: none;
  transform: translateY(2.25px);
}

.dock[data-dock-view="social"] .dock__social-back {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.dock__divider {
  display: block;
  block-size: 1.125px;
  flex: 0 0 1.125px;
  margin: 6.75px 13.5px;
  background: var(--dock-border);
  opacity: 1;
}

.dock__nav-list {
  display: grid;
  grid-auto-rows: var(--dock-row);
}

.dock__link {
  display: flex;
  align-items: center;
  gap: 9px;
  inline-size: 100%;
  min-inline-size: 0;
  padding: 0 13.5px;
  border-radius: 4.5px;
  color: var(--dock-muted);
  font-size: 15.75px;
  font-weight: 400;
  line-height: 20.475px;
  letter-spacing: 0;
  text-decoration: none;
  outline: none;
  transition:
    color .16s ease,
    background-color .16s ease;
}

.dock__link--button {
  border: 0;
  background: transparent;
  /* font-family only: the `font` shorthand would reset font-size to the
     inherited 16px and make this button render larger than the links. */
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.dock__link-icon {
  inline-size: 16.875px;
  block-size: 16.875px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock__link-chevron {
  margin-left: auto;
  inline-size: 16.875px;
  block-size: 16.875px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock__link[aria-current="page"] {
  color: var(--dock-text);
}

.dock__panel.is-open .dock__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1.125px;
  text-underline-offset: .16em;
}

@media (hover: hover) and (pointer: fine) and (min-width: 641px) {
  /* Hover hints with an underline only. The bright text color is reserved
     for the current page (aria-current) so hover never impersonates it. */
  .dock__link:hover {
    text-decoration: underline;
    text-decoration-thickness: 1.125px;
    text-underline-offset: .16em;
  }
}

.dock__link:focus-visible,
.dock__trigger:focus-visible,
.dock__theme-toggle:focus-visible,
.dock__social-back:focus-visible,
.dock__social-icon:focus-visible,
.dock__island:focus-visible {
  outline: 2.25px solid var(--dock-focus);
  outline-offset: 3.375px;
}

.dock__socials {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  min-block-size: 42.75px;
  padding: 4.5px 9px 9px;
}

.dock__social-icon {
  display: grid;
  place-items: center;
  inline-size: 27px;
  block-size: 27px;
  border-radius: 999px;
  color: var(--dock-muted);
  text-decoration: none;
  outline: none;
  transition:
    color .16s ease,
    background-color .16s ease,
    opacity .16s ease;
}

.dock__brand-icon {
  inline-size: 16.875px;
  block-size: 16.875px;
  fill: currentColor;
}

.dock__island {
  position: absolute;
  bottom: 0;
  display: grid;
  place-items: center;
  inline-size: var(--dock-button);
  block-size: var(--dock-button);
  padding: 0;
  border: 1px solid var(--dock-border);
  border-radius: 999px;
  color: var(--dock-text);
  background: var(--dock-bg);
  box-shadow: var(--dock-shadow);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transform: translateZ(0);
  transition:
    color .16s ease,
    background-color .16s ease,
    transform .22s var(--dock-ease),
    box-shadow .24s ease;
  -webkit-tap-highlight-color: transparent;
}

.dock__back {
  right: calc(100% + var(--dock-gap));
}

.dock__island[hidden] {
  display: none !important;
}

@media (hover: hover) and (pointer: fine) and (min-width: 641px) {
  .dock__social-back:hover,
  .dock__island:hover,
  .dock__social-icon:hover {
    background: var(--dock-bg-hover);
  }

  .dock__social-icon:hover {
    color: var(--dock-text);
  }
}

.dock[data-dock-view="main"] .dock__socials,
.dock[data-dock-view="social"] .dock__nav-list {
  display: none;
}

.dock__island:active {
  transform: translateY(0) scale(.98);
}

.dock__icon {
  position: absolute;
  inline-size: 16.875px;
  block-size: 16.875px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .dock {
    bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
