﻿:root {
  color-scheme: light;
  --site-bg: #f1ece0;
  --site-surface: #f7f3e8;
  --site-surface-elevated: #f7f3e8;
  --site-sidebar: #e6e0ca;
  --site-field: #f7f3e8;
  --site-ink: #24303b;
  --site-muted: #55666e;
  --site-line: #c9c2a8;
  --site-soft: #e9e3cf;
  --site-accent: #2f5066;
  --site-accent-dark: #1f3a4d;
  --site-accent-deep: #14232e;
  --site-accent-ledge: #14232e;
  --site-accent-tint: rgba(47, 80, 102, 0.08);
  --site-accent-tint-strong: rgba(47, 80, 102, 0.18);
  --site-on-accent: #f6f2e3;
  --site-on-accent-dark: #f6f2e3;
  --site-on-accent-deep: #f6f2e3;
  --site-notice-bg: #e2e6d8;
  --site-notice-line: #a9c2b9;
  --site-ledge: #bdb599;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --site-bg: #1b252f;
  --site-surface: #233039;
  --site-surface-elevated: #2b3946;
  --site-sidebar: #17202a;
  --site-field: #26333f;
  --site-ink: #e6e1cb;
  --site-muted: #a9b4ae;
  --site-line: #3c4d5a;
  --site-soft: #26333f;
  --site-accent: #ddbd8e;
  --site-accent-dark: #eacfa6;
  --site-accent-deep: #b39468;
  --site-accent-ledge: #806e52;
  --site-accent-tint: rgba(221, 189, 142, 0.1);
  --site-accent-tint-strong: rgba(221, 189, 142, 0.2);
  --site-on-accent: #1b252f;
  --site-on-accent-dark: #1b252f;
  --site-on-accent-deep: #1b252f;
  --site-notice-bg: rgba(134, 179, 172, 0.12);
  --site-notice-line: rgba(134, 179, 172, 0.36);
  --site-ledge: #0d141a;
}

html,
body,
#wrapper,
#main,
#sidebar,
#sidebar > .inner,
.metric-card,
.filter-panel,
.writeup-card,
.timeline article,
.toc-box,
.site-header-controls,
.search-panel,
input,
textarea,
select {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

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

body {
  background: var(--site-bg);
  color: var(--site-ink);
}

img {
  height: auto;
}

.skip-link {
  background: var(--site-accent-dark);
  border: 0;
  border-radius: 0 0 6px 6px;
  color: var(--site-on-accent-dark) !important;
  font-weight: 700;
  left: 1rem;
  padding: 0.65rem 0.9rem;
  position: fixed;
  top: 0;
  transform: translateY(-120%);
  transition: transform 160ms ease;
  z-index: 10001;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
#sidebar .toggle:focus-visible {
  outline: 3px solid var(--site-accent);
  outline-offset: 3px;
}

#menu a[aria-current="page"] {
  color: var(--site-accent-dark);
  font-weight: 700;
}

#main {
  background: var(--site-bg);
}

html[data-theme="dark"] #wrapper,
html[data-theme="dark"] #main,
html[data-theme="dark"] body {
  background: var(--site-bg);
}

html[data-theme="light"] #wrapper,
html[data-theme="light"] #main,
html[data-theme="light"] body {
  background: var(--site-bg);
}

html[data-theme="dark"] #sidebar,
html[data-theme="dark"] #sidebar > .inner {
  background-color: var(--site-sidebar);
}

html[data-theme="dark"] #sidebar > .inner > #search.alt,
body[data-theme="dark"] #sidebar > .inner > #search.alt {
  background-color: var(--site-sidebar);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] strong,
html[data-theme="dark"] b,
html[data-theme="dark"] label,
html[data-theme="dark"] dt,
html[data-theme="dark"] #header .logo,
html[data-theme="dark"] #menu ul a,
html[data-theme="dark"] #menu ul span {
  color: var(--site-ink);
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] dd,
html[data-theme="dark"] table,
html[data-theme="dark"] blockquote {
  color: var(--site-muted);
}

a {
  color: var(--site-accent-dark);
}

a:hover {
  border-bottom-color: var(--site-accent);
  color: var(--site-accent) !important;
}

header.major > :last-child,
#header {
  border-bottom-color: var(--site-accent);
}

#sidebar .toggle:before,
#menu ul a:hover,
#menu ul span:hover,
#menu ul a.opener:hover:before,
#menu ul span.opener:hover:before,
.features article .icon:before,
ul.contact li:before {
  color: var(--site-accent);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus,
input[type="checkbox"]:focus + label:before,
input[type="radio"]:focus + label:before {
  border-color: var(--site-accent);
  box-shadow: 0 0 0 1px var(--site-accent);
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: var(--site-field);
  border-color: var(--site-line);
  color: var(--site-ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--site-muted) !important;
  opacity: 1;
}

input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
  box-shadow: inset 0 0 0 2px var(--site-accent);
  color: var(--site-accent-dark) !important;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
  background-color: var(--site-accent-tint);
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
  background-color: var(--site-accent-tint-strong);
}

input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary,
.button.primary,
ul.pagination li > .page.active {
  background-color: var(--site-accent);
  color: var(--site-on-accent) !important;
}

input[type="submit"].primary:hover,
input[type="reset"].primary:hover,
input[type="button"].primary:hover,
button.primary:hover,
.button.primary:hover,
ul.pagination li > .page.active:hover {
  background-color: var(--site-accent-dark);
  color: var(--site-on-accent-dark) !important;
}

input[type="submit"].primary:active,
input[type="reset"].primary:active,
input[type="button"].primary:active,
button.primary:active,
.button.primary:active,
ul.pagination li > .page.active:active {
  background-color: var(--site-accent-deep);
  color: var(--site-on-accent-deep) !important;
}

#header .logo,
h1,
h2,
h3 {
  letter-spacing: 0;
}

#header {
  align-items: center;
  gap: 1rem;
}

#header .logo {
  min-width: 0;
}

.site-header-controls {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  margin-left: auto;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.language-control {
  margin: 0;
}

.language-select {
  background-color: var(--site-surface);
  border-color: var(--site-line);
  color: var(--site-ink);
  font-size: 0.82rem;
  height: 2.45rem;
  margin: 0;
  padding: 0 2rem 0 0.75rem;
  width: auto;
}

.eyebrow {
  color: var(--site-accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.home-hero {
  align-items: center;
  gap: 2.5rem;
}

.home-hero .content {
  max-width: 44rem;
}

.home-hero header > p {
  color: var(--site-ink);
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
}

.home-hero h1 {
  font-size: 3.4rem;
  margin: 0 0 1rem;
}

.home-hero h1 span {
  color: var(--site-accent-dark);
}

.profile-photo {
  aspect-ratio: 1 / 1;
  display: flex;
  flex: 0 0 17rem;
  height: 17rem;
  justify-content: center;
  margin: 0;
  max-height: 17rem;
  min-height: 0;
  overflow: hidden;
  width: 17rem;
}

.profile-photo img {
  aspect-ratio: 1;
  border-radius: 50%;
  display: block;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

#banner.home-hero .profile-photo {
  flex-basis: 17rem;
  height: 17rem;
  margin: 0;
  max-height: 17rem;
  min-height: 0;
  width: 17rem;
}

#banner.home-hero .profile-photo img {
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.page-heading {
  padding: 3rem 0 2rem;
}

#main > .inner > section.page-heading {
  border-top: 0;
  padding: 3rem 0 1.5rem;
}

.metric-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.filter-panel,
.writeup-card,
.skill-columns article,
.resume-timeline article,
.notice,
.toc-box {
  border: 1px solid var(--site-line);
  border-radius: 8px;
}

.metric-card {
  background: var(--site-soft);
  padding: 1rem;
}

.metric-card strong {
  color: var(--site-accent-dark);
  display: block;
  font-size: 1.55rem;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.metric-card span {
  color: var(--site-muted);
  display: block;
  font-size: 0.93rem;
}

.section-grid article {
  align-items: flex-start;
}

.post-grid article .image,
.writeup-card .image {
  background: var(--site-soft);
}

.post-grid article .image img,
.writeup-card .image img,
.timeline img {
  object-fit: cover;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline article {
  align-items: center;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: 12rem 1fr;
  padding: 1rem;
}

.timeline img {
  aspect-ratio: 4 / 3;
  background: var(--site-soft);
  border-radius: 6px;
  height: auto;
  object-position: center center;
  width: 100%;
}

.timeline img.timeline-img-contain {
  object-fit: contain;
}

.timeline img.timeline-img-top {
  object-position: center top;
}

#main > .inner > section.filter-panel,
.filter-panel {
  background: var(--site-soft);
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
}

#main > .inner > section.filter-panel {
  border: 1px solid var(--site-line);
  border-radius: 8px;
  margin-top: 0;
}

.filter-row {
  align-items: center;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 7rem minmax(0, 1fr);
  margin: 0;
}

.filter-row label,
.filter-row .filter-label {
  color: var(--site-ink);
  font-weight: 700;
  margin: 0;
}

.filter-row input[type="search"],
.filter-row input[type="text"] {
  margin: 0;
  min-width: 0;
  width: 100%;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-button {
  box-shadow: inset 0 0 0 1px var(--site-line);
  flex: 0 0 auto;
  height: auto;
  line-height: 1;
  margin: 0;
  min-width: 0;
  padding: 0.72rem 0.85rem;
  white-space: nowrap;
}

.filter-button.active {
  background: var(--site-accent);
  box-shadow: none;
  color: var(--site-on-accent) !important;
}

.writeup-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.writeup-card {
  overflow: hidden;
}

.writeup-card[hidden] {
  display: none;
}

.writeup-card .image {
  border-radius: 0;
  display: block;
  margin: 0;
}

.writeup-card .image img {
  aspect-ratio: 16 / 8;
  display: block;
  width: 100%;
}

.writeup-card .writeup-card-placeholder,
.posts .writeup-card-placeholder {
  align-items: center;
  aspect-ratio: 16 / 8;
  background: #121a22;
  color: var(--site-accent) !important;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: center;
}

.writeup-collection + .writeup-collection {
  margin-top: 2rem;
}

.writeup-collection[hidden] {
  display: none;
}

.writeup-card-placeholder .icon {
  font-size: 2rem;
}

.writeup-card-placeholder span:last-child {
  color: #e6e1cb;
  font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-body {
  padding: 1.1rem;
}

.card-body h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.metadata {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 0;
}

.metadata-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metadata div {
  border-left: 3px solid var(--site-line);
  padding-left: 0.65rem;
}

.metadata dt {
  color: var(--site-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metadata dd {
  margin: 0.15rem 0 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.tag-list li {
  background: var(--site-surface);
  border: 1px solid var(--site-line);
  border-radius: 999px;
  color: var(--site-muted);
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.42rem 0.58rem;
}

.empty-state {
  border: 1px dashed var(--site-line);
  border-radius: 8px;
  color: var(--site-muted);
  padding: 1.5rem;
  text-align: center;
}

.writeup-article {
  max-width: 58rem;
}

.article-header {
  padding: 3rem 0 1rem;
}

.notice {
  background: var(--site-notice-bg);
  border-color: var(--site-notice-line);
  padding: 1rem 1.2rem;
}

.toc-box {
  background: var(--site-soft);
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
}

.toc-box ol {
  margin-bottom: 0;
}

.command-card {
  background: #121a22;
  border-radius: 8px;
  border: 1px solid #26333f;
  box-shadow: 0 14px 36px rgba(13, 20, 26, 0.22);
  color: #e6e1cb;
  font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
  margin: 1rem 0;
  overflow: hidden;
}

.terminal-header {
  align-items: center;
  background: #1b252f;
  border-bottom: 1px solid #2c3a47;
  color: #a9b4ae;
  display: flex;
  font-size: 0.78rem;
  justify-content: space-between;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.75rem;
  text-transform: uppercase;
}

.terminal-header:before {
  background: #a3bf92;
  border-radius: 50%;
  box-shadow: 1rem 0 #86b3ac, 2rem 0 #667a85;
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 0.55rem;
  width: 0.55rem;
}

.terminal-header > span {
  margin-left: 0.8rem;
}

.copy-command {
  background: transparent;
  border: 1px solid #3c4d5a;
  border-radius: 6px;
  box-shadow: none;
  color: #d0ccb6 !important;
  font-size: 0.72rem;
  height: auto;
  line-height: 1;
  margin: 0;
  padding: 0.42rem 0.55rem;
}

.copy-command:hover {
  border-color: #a3bf92;
  color: #a3bf92 !important;
}

.terminal-body {
  padding: 0.95rem 1rem 1.05rem;
}

.terminal-command {
  display: grid;
  gap: 0.1rem;
  margin-bottom: 0.8rem;
}

.terminal-command:last-child {
  margin-bottom: 0;
}

.terminal-prompt {
  color: #a3bf92;
  font-weight: 700;
  white-space: pre-wrap;
}

.terminal-line {
  align-items: baseline;
  display: flex;
  gap: 0.45rem;
}

.terminal-command code {
  color: #f4f0df;
  font-family: inherit;
  font-weight: 600;
}

.terminal-output {
  border-top: 1px solid #2c3a47;
  color: #a9b4ae;
  margin: 0.7rem 0 0;
  padding: 0.85rem 0 0;
  white-space: pre-wrap;
}

.terminal-output code {
  color: #a9b4ae;
  font-family: inherit;
}

.terminal-block {
  background: #121a22;
  border: 1px solid #2c3a47;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  color: #f4f0df;
  font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
  margin: 1rem 0;
  overflow: hidden;
}

.terminal-titlebar {
  align-items: center;
  background: #1b252f;
  border-bottom: 1px solid #2c3a47;
  display: flex;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.65rem 0.45rem 0.9rem;
}

.terminal-window-controls {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.42rem;
}

.terminal-window-dot {
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
  display: block;
  height: 0.7rem;
  width: 0.7rem;
}

.terminal-window-dot-red {
  background: #e0857b;
}

.terminal-window-dot-yellow {
  background: #ddbd8e;
}

.terminal-window-dot-green {
  background: #a3bf92;
}

.terminal-context-label {
  color: #8a9a9f;
  font-size: 0.7rem;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-collapse-control {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  color: #a9b4ae !important;
  display: inline-flex;
  flex: 0 0 2rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0;
  width: 2rem;
}

.terminal-collapse-control:hover {
  background: #2c3a47;
  color: #f4f0df !important;
}

.terminal-collapse-control .icon {
  font-size: 0.72rem;
}

.terminal-content[hidden] {
  display: none;
}

.terminal-screen {
  background: #10171e;
  padding: 0.9rem 1rem 1rem;
}

.terminal-command-line {
  background: transparent;
  border-radius: 4px;
  color: #f4f0df !important;
  cursor: text;
  display: block;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
  margin: 0;
  padding: 0.12rem 4.75rem 0.42rem 0;
  position: relative;
  width: 100%;
}

.terminal-command-line + .terminal-command-line {
  margin-top: 0.12rem;
}

.terminal-command-line:hover {
  background: rgba(255, 255, 255, 0.025);
}

.terminal-copy-badge:focus-visible {
  outline: 1px solid #86b3ac;
  outline-offset: 2px;
}

.terminal-prompt-top {
  color: #86b3ac;
  display: block;
  white-space: nowrap;
}

.terminal-prompt-user,
.terminal-dollar,
.terminal-token-variable {
  color: #82abcb;
}

.terminal-prompt-path {
  color: #f4f0df;
}

.terminal-input-row {
  align-items: flex-start;
  display: flex;
  min-width: 0;
}

.terminal-prompt-symbol {
  color: #86b3ac;
  flex: 0 0 auto;
  white-space: nowrap;
}

.terminal-command-text {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #f4f0df;
  font-family: inherit;
  font-weight: 400;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0;
  white-space: pre-wrap;
}

.terminal-token-option {
  color: #ddbd8e;
}

.terminal-token-string {
  color: #9cbfdb;
}

.terminal-copy-badge {
  align-items: center;
  appearance: none;
  background: rgba(38, 51, 63, 0.94);
  border: 1px solid #3c4d5a;
  border-radius: 4px;
  box-shadow: none;
  color: #a9b4ae;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.62rem;
  gap: 0.3rem;
  line-height: 1;
  opacity: 0;
  padding: 0.3rem 0.4rem;
  pointer-events: none;
  position: absolute;
  right: 0.15rem;
  top: 0.15rem;
  transition: opacity 140ms ease, color 140ms ease;
}

.terminal-copy-badge .icon {
  font-size: 0.65rem;
}

.terminal-command-line:hover .terminal-copy-badge,
.terminal-copy-badge:focus-visible {
  color: #d0ccb6;
  opacity: 1;
  pointer-events: auto;
}

.terminal-output-label,
.terminal-output-label strong {
  color: #a9b4ae !important;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0.45rem 0 0.25rem;
  text-transform: uppercase;
}

.terminal-block pre.terminal-screen-output {
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #a9b4ae;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0.35rem 0 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 0;
  white-space: pre;
}

.terminal-explanation {
  background: #0f161d;
  border-top: 1px solid #2c3a47;
  color: #a9b4ae;
}

.terminal-explanation summary {
  color: #a9b4ae;
  cursor: pointer;
  font-size: 0.72rem;
  list-style: none;
  padding: 0.7rem 1rem;
  user-select: none;
}

.terminal-explanation summary::-webkit-details-marker {
  display: none;
}

.terminal-explanation summary:before {
  color: #8a9a9f;
  content: "\203A";
  display: inline-block;
  margin-right: 0.55rem;
  transition: transform 140ms ease;
}

.terminal-explanation[open] summary {
  border-bottom: 1px solid #2c3a47;
}

.terminal-explanation[open] summary:before {
  transform: rotate(90deg);
}

.terminal-explanation-content {
  background: #0f161d;
  border: 0;
  color: #a9b4ae;
  font-size: 0.75rem;
  line-height: 1.65;
  margin: 0;
  padding: 0.8rem 1rem 0.9rem;
}

.terminal-explanation-content strong {
  color: #9cbfdb !important;
}

@media (hover: none) {
  .terminal-copy-badge {
    opacity: 0.8;
    pointer-events: auto;
  }
}

@media screen and (max-width: 736px) {
  .terminal-titlebar {
    padding-left: 0.75rem;
  }

  .terminal-context-label {
    max-width: 8rem;
  }

  .terminal-screen {
    padding: 0.8rem;
  }

  .terminal-command-line {
    font-size: 0.76rem;
    padding-right: 2.35rem;
  }

  .terminal-copy-label {
    display: none;
  }

  .terminal-block pre.terminal-screen-output {
    font-size: 0.74rem;
  }
}

.profile-grid {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) 14rem;
  padding: 4rem 0 2rem;
}

.profile-grid img {
  aspect-ratio: 1;
  border-radius: 50%;
  height: auto;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.about-role {
  color: var(--site-ink);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
  max-width: 46rem;
}

.about-study {
  max-width: 46rem;
}

.about-current {
  border-top: 3px solid var(--site-accent) !important;
}

.about-period {
  color: var(--site-accent-dark);
  font-weight: 700;
  margin-bottom: 0;
}

.about-subtitle {
  font-size: 1rem;
  margin: 1.5rem 0 0.75rem;
}

.about-profile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.about-profile-grid > a {
  min-width: 0;
}

.about-profile-grid img {
  height: 1.35rem;
  object-fit: contain;
  width: 1.35rem;
}

html[data-theme="dark"] .about-profile-icon-contrast {
  filter: brightness(0) invert(1);
}

.skill-columns,
.resume-timeline {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-columns article,
.resume-timeline article {
  padding: 1rem;
}

.badge-strip,
.tool-strip {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-strip {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.badge-strip img,
.tool-strip img {
  aspect-ratio: 4 / 3;
  background: var(--site-soft);
  border: 1px solid var(--site-line);
  border-radius: 8px;
  object-fit: contain;
  padding: 0.45rem;
  width: 100%;
}

.profile-link-grid {
  display: grid;
  gap: 0.55rem;
}

.theme-toggle {
  align-items: center;
  background: var(--site-surface);
  border: 1px solid var(--site-line);
  border-radius: 8px;
  box-shadow: none;
  color: var(--site-ink) !important;
  display: flex;
  font-size: 0.85rem;
  gap: 0.65rem;
  height: auto;
  justify-content: flex-start;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
  padding: 0.65rem;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  width: auto;
}

.theme-toggle:hover,
.theme-toggle:focus {
  background: var(--site-soft);
  color: var(--site-accent-dark) !important;
}

.theme-toggle-icon {
  background: var(--site-accent);
  border-radius: 999px;
  box-shadow: inset -0.3rem -0.18rem 0 rgba(255, 255, 255, 0.35);
  flex: 0 0 auto;
  height: 1.05rem;
  width: 1.05rem;
}

html[data-theme="dark"] .theme-toggle-icon {
  box-shadow: inset -0.35rem -0.12rem 0 var(--site-surface);
}

.profile-link-grid > a,
.contact-link-grid > .contact-info-row {
  align-items: center;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  color: var(--site-ink);
  display: flex;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  text-decoration: none;
}

.profile-link-grid img {
  height: 1.05rem;
  width: 1.05rem;
}

.contact-link-grid .icon {
  color: var(--site-accent-dark);
  flex: 0 0 1.05rem;
  text-align: center;
}

.contact-link-grid span:last-child {
  overflow-wrap: anywhere;
}

.anchor-placeholder {
  height: 1px;
}

html[data-theme="dark"] #header,
html[data-theme="dark"] header.major > :last-child,
html[data-theme="dark"] #menu > ul > li,
html[data-theme="dark"] #sidebar > .inner > section {
  border-color: var(--site-line);
}

html[data-theme="dark"] .metric-card,
html[data-theme="dark"] #main > .inner > section.filter-panel,
html[data-theme="dark"] .filter-panel,
html[data-theme="dark"] .writeup-card,
html[data-theme="dark"] .timeline article,
html[data-theme="dark"] .skill-columns article,
html[data-theme="dark"] .resume-timeline article,
html[data-theme="dark"] .toc-box,
html[data-theme="dark"] .detail-grid article,
html[data-theme="dark"] #main > .inner > section.search-panel,
html[data-theme="dark"] .search-result-card,
html[data-theme="dark"] .profile-link-grid > a,
html[data-theme="dark"] .contact-link-grid > .contact-info-row,
html[data-theme="dark"] .tag-list li,
html[data-theme="dark"] .empty-state {
  background: var(--site-surface);
  border-color: var(--site-line);
}

html[data-theme="light"] .writeup-card,
html[data-theme="light"] .timeline article,
html[data-theme="light"] .skill-columns article,
html[data-theme="light"] .resume-timeline article,
html[data-theme="light"] .toc-box,
html[data-theme="light"] .detail-grid article,
html[data-theme="light"] #main > .inner > section.search-panel,
html[data-theme="light"] .search-result-card,
html[data-theme="light"] .profile-link-grid > a,
html[data-theme="light"] .contact-link-grid > .contact-info-row,
html[data-theme="light"] .tag-list li,
html[data-theme="light"] .empty-state {
  background: var(--site-surface);
  border-color: var(--site-line);
}

html[data-theme="light"] .metric-card,
html[data-theme="light"] #main > .inner > section.filter-panel,
html[data-theme="light"] .filter-panel {
  background: var(--site-soft);
  border-color: var(--site-line);
}

body[data-theme="dark"],
body[data-theme="dark"] #wrapper,
body[data-theme="dark"] #main {
  background: var(--site-bg) !important;
}

body[data-theme="light"],
body[data-theme="light"] #wrapper,
body[data-theme="light"] #main {
  background: var(--site-bg);
}

body[data-theme="dark"] .writeup-card,
body[data-theme="dark"] .timeline article,
body[data-theme="dark"] .skill-columns article,
body[data-theme="dark"] .resume-timeline article,
body[data-theme="dark"] .toc-box,
body[data-theme="dark"] .detail-grid article,
body[data-theme="dark"] #main > .inner > section.search-panel,
body[data-theme="dark"] .search-result-card,
body[data-theme="dark"] .profile-link-grid > a,
body[data-theme="dark"] .contact-link-grid > .contact-info-row,
body[data-theme="dark"] .tag-list li,
body[data-theme="dark"] .empty-state {
  background: var(--site-surface) !important;
  border-color: var(--site-line);
}

body[data-theme="dark"] .metric-card,
body[data-theme="dark"] #main > .inner > section.filter-panel,
body[data-theme="dark"] .filter-panel {
  background: var(--site-soft) !important;
  border-color: var(--site-line);
}

body[data-theme="light"] .writeup-card,
body[data-theme="light"] .timeline article,
body[data-theme="light"] .skill-columns article,
body[data-theme="light"] .resume-timeline article,
body[data-theme="light"] .toc-box,
body[data-theme="light"] .detail-grid article,
body[data-theme="light"] #main > .inner > section.search-panel,
body[data-theme="light"] .search-result-card,
body[data-theme="light"] .profile-link-grid > a,
body[data-theme="light"] .contact-link-grid > .contact-info-row,
body[data-theme="light"] .tag-list li,
body[data-theme="light"] .empty-state {
  background: var(--site-surface);
  border-color: var(--site-line);
}

body[data-theme="light"] .metric-card,
body[data-theme="light"] #main > .inner > section.filter-panel,
body[data-theme="light"] .filter-panel {
  background: var(--site-soft);
  border-color: var(--site-line);
}

html[data-theme="dark"] .post-grid article .image,
html[data-theme="dark"] .writeup-card .image,
html[data-theme="dark"] .timeline img,
html[data-theme="dark"] .badge-strip img,
html[data-theme="dark"] .tool-strip img,
html[data-theme="dark"] .legacy-article .article-banner,
html[data-theme="dark"] .legacy-article .detail-preview img {
  background: var(--site-surface-elevated);
  border-color: var(--site-line);
}

html[data-theme="dark"] .notice {
  background: var(--site-notice-bg);
  border-color: var(--site-notice-line);
}

html[data-theme="dark"] .legacy-article {
  --color-accent: var(--site-accent-dark);
  --color-border: var(--site-line);
  --color-bg-secondary: var(--site-soft);
  --color-bg-tertiary: var(--site-soft);
  --color-surface-elevated: var(--site-surface-elevated);
  --color-text-primary: var(--site-ink);
  --color-text-secondary: var(--site-muted);
}

html[data-theme="dark"] .legacy-article .article-content p,
html[data-theme="dark"] .legacy-article .article-content li,
html[data-theme="dark"] .legacy-article .blog-meta,
html[data-theme="dark"] .legacy-article .timeline-item span {
  color: var(--site-muted);
}

html[data-theme="dark"] .legacy-article .timeline-item-title,
html[data-theme="dark"] .legacy-article .service-item-title,
html[data-theme="dark"] .legacy-article .detail-description .h3,
html[data-theme="dark"] .legacy-article .project-more-info .h4,
html[data-theme="dark"] .legacy-article .section-title {
  color: var(--site-ink);
}

html[data-theme="dark"] .legacy-article .disclaimer,
html[data-theme="dark"] .legacy-article .info-box,
html[data-theme="dark"] .legacy-article .warning-box,
html[data-theme="dark"] .legacy-article .success-box,
html[data-theme="dark"] .legacy-article .sources,
html[data-theme="dark"] .legacy-article .command-explain,
html[data-theme="dark"] .legacy-article .lab-item,
html[data-theme="dark"] .legacy-article .timeline-item,
html[data-theme="dark"] .legacy-article .service-item,
html[data-theme="dark"] .legacy-article .skills-item,
html[data-theme="dark"] .legacy-article .clients-item {
  background: var(--site-surface);
  border-color: var(--site-line);
}

html[data-theme="dark"] .legacy-article p code,
html[data-theme="dark"] .legacy-article li code {
  background: var(--site-surface-elevated);
}

html[data-theme="dark"] .legacy-article .skill-progress-bg {
  background: var(--site-line);
}

.scroll-controls {
  bottom: 1.25rem;
  display: grid;
  gap: 0.45rem;
  position: fixed;
  right: 1.25rem;
  z-index: 10000;
}

.scroll-button {
  align-items: center;
  background: var(--site-accent);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(13, 20, 26, 0.16);
  cursor: pointer;
  display: flex;
  height: 2.3rem;
  justify-content: center;
  margin: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  transform: translateY(0.35rem);
  transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
  width: 2.3rem;
}

.scroll-button.is-visible {
  opacity: 0.92;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-button:hover,
.scroll-button:focus {
  background: var(--site-accent-dark);
  opacity: 1;
}

.scroll-button:hover:before,
.scroll-button:focus:before {
  border-color: var(--site-on-accent-dark);
}

.scroll-button:before {
  border-left: 2px solid var(--site-on-accent);
  border-top: 2px solid var(--site-on-accent);
  content: "";
  display: block;
  height: 0.55rem;
  width: 0.55rem;
}

.scroll-button-up:before {
  transform: translateY(0.15rem) rotate(45deg);
}

.scroll-button-down:before {
  transform: translateY(-0.15rem) rotate(225deg);
}

@media screen and (max-width: 980px) {
  .metric-grid,
  .writeup-grid,
  .skill-columns,
  .resume-timeline,
  .badge-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metadata,
  .metadata-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .profile-grid img {
    max-width: 14rem;
  }

  .about-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 640px) {
  .home-hero {
    gap: 1rem;
  }

  .home-hero h1 {
    font-size: 2.4rem;
  }

  .profile-photo {
    flex-basis: 12rem;
    height: 12rem;
    max-height: 12rem;
    width: 12rem;
  }

  .profile-photo img {
    height: 100%;
    max-height: none;
    width: 100%;
  }

  #banner.home-hero .profile-photo {
    flex-basis: 12rem;
    height: 12rem;
    margin: 0 auto 1.25rem;
    max-height: 12rem;
    min-height: 0;
    width: 12rem;
  }

  .metric-grid,
  .writeup-grid,
  .skill-columns,
  .resume-timeline,
  .badge-strip,
  .tool-strip,
  .metadata,
  .metadata-wide,
  .timeline article {
    grid-template-columns: 1fr;
  }

  .timeline img {
    max-height: 13rem;
  }

  .about-profile-grid {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .filter-button {
    flex: 1 1 auto;
    white-space: normal;
  }

  .site-header-controls {
    gap: 0.4rem;
  }

  .theme-toggle-label {
    display: none;
  }

  .scroll-controls {
    bottom: 1rem;
    right: 1rem;
  }

  .scroll-button {
    height: 2.75rem;
    width: 2.75rem;
  }
}

/* Lawliet : rebord 3D sous les cartes et les boutons pleins */
.metric-card,
.writeup-card,
.timeline article,
.skill-columns article,
.resume-timeline article,
.detail-grid article,
.search-result-card,
.profile-link-grid > a,
.contact-link-grid > .contact-info-row,
#main > .inner > section.filter-panel,
.filter-panel {
  box-shadow: 0 3px 0 var(--site-ledge);
}

input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary,
.button.primary {
  box-shadow: 0 3px 0 var(--site-accent-ledge);
}

input[type="submit"].primary:active,
input[type="reset"].primary:active,
input[type="button"].primary:active,
button.primary:active,
.button.primary:active {
  box-shadow: 0 1px 0 var(--site-accent-ledge);
  transform: translateY(2px);
}

/* Mode clair : la sidebar, les champs et les filets du template passent en crème */
html[data-theme="light"] #sidebar,
html[data-theme="light"] #sidebar > .inner,
html[data-theme="light"] #sidebar > .inner > #search.alt {
  background-color: var(--site-sidebar);
}

html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="url"],
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: var(--site-field);
  border-color: var(--site-line);
  color: var(--site-ink);
}

html[data-theme="light"] hr,
html[data-theme="light"] #menu > ul > li,
html[data-theme="light"] #main > .inner > section,
html[data-theme="light"] #sidebar > .inner > * {
  border-color: var(--site-line);
}

#sidebar .toggle:after {
  background: var(--site-soft);
  box-shadow: 0 2px 0 var(--site-ledge);
}

::selection {
  background: var(--site-accent);
  color: var(--site-on-accent);
}

/* Phase 4 final content */
.article-section { margin: 2rem 0; }
.article-with-side-toc { align-items: start; display: grid; gap: 2rem; grid-template-columns: minmax(0, 58rem) minmax(12rem, 16rem); }
.article-with-side-toc > .writeup-article { max-width: none; min-width: 0; width: 100%; }
.article-side-toc { align-self: start; border-left: 1px solid var(--site-line); max-height: calc(100vh - 2.5rem); overflow: auto; padding: 0.35rem 0 0.35rem 1rem; position: sticky; top: 1.25rem; }
.article-side-toc-title { color: var(--site-ink); font-weight: 700; margin: 0 0 0.75rem; }
.article-side-toc ol { list-style: none; margin: 0; padding: 0; }
.article-side-toc li { margin: 0; }
.article-side-toc a { border-left: 2px solid transparent; color: var(--site-muted); display: block; font-size: 0.92rem; line-height: 1.35; padding: 0.36rem 0 0.36rem 0.75rem; text-decoration: none; }
.article-side-toc a:hover,
.article-side-toc a:focus,
.article-side-toc a.is-active { border-left-color: var(--site-accent); color: var(--site-accent); }
.article-side-toc a:focus { outline: 2px solid transparent; }
.post-grid article a[href^="note-cheatsheet-"].image img { background: #121a22; object-fit: contain; }
.post-grid article a[href="note-proxmox-apt-horloge.html"].image img,
.writeup-grid article a[href="note-proxmox-apt-horloge.html"].image img,
.post-grid article a[href="note-vpn-iut-harica.html"].image img,
.writeup-grid article a[href="note-vpn-iut-harica.html"].image img { background: #fff; object-fit: contain; }
.cheatsheet-content { margin-top: 2rem; }
.cheatsheet-content h2 { color: var(--site-accent-dark); margin-top: 2.2rem; }
.cheatsheet-content h3 { color: var(--site-ink); font-size: 1.05em; margin-top: 1.45rem; }
.cheatsheet-note { background: var(--site-soft); border: 1px solid var(--site-line); border-left: 4px solid var(--site-accent); border-radius: 8px; margin: 1rem 0; padding: 0.85rem 1rem; }
.cheatsheet-content blockquote { background: var(--site-soft); border-left: 4px solid var(--site-accent); border-radius: 8px; margin: 1.1rem 0; padding: 0.85rem 1rem; }
.cheatsheet-content blockquote p { margin: 0; }
.cheatsheet-content a { word-break: break-word; }
#cheatsheet-ldapsearch .image img,
#cheatsheet-bloodyad .image img,
#cheatsheet-powerview .image img { background: #121a22; object-fit: cover; }
.writeup-article p code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: break-word;
  vertical-align: baseline;
  white-space: normal;
  word-break: normal;
}
.article-figure { margin: 1.5rem 0; }
.article-figure .article-image,
.article-figure .step-image { margin: 0; }
.article-image,
.step-image { border: 1px solid var(--site-line); border-radius: 8px; display: block; margin: 1rem 0; max-width: 100%; }
.article-image { max-height: 28rem; object-fit: contain; width: 100%; }
.step-image { object-fit: contain; width: 100%; }
.article-image.source-code-image { margin-left: auto; margin-right: auto; max-height: none; width: auto; }
.image-pair { align-items: start; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.image-pair .article-figure { margin: 0; }
.detail-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-grid article { border: 1px solid var(--site-line); border-radius: 8px; padding: 1rem; }
#main > .inner > section.search-panel {
  background: var(--site-soft);
  border: 1px solid var(--site-line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 1rem;
}
.search-panel label { color: var(--site-ink); font-weight: 700; margin: 0; }
.search-panel input[type="search"] { margin: 0; width: 100%; }
.search-count { color: var(--site-muted); margin: 0; }
.search-results { display: grid; gap: 1rem; }
.search-result-card { background: var(--site-surface); }
.search-result-card .card-body { padding: 1rem; }
.search-result-card h2 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.legacy-article .back-link { align-items: center; color: var(--site-accent-dark); display: inline-flex; gap: 0.6rem; margin-bottom: 1.25rem; }
.legacy-article { --color-accent: var(--site-accent-dark); --color-border: var(--site-line); --color-bg-secondary: var(--site-soft); --color-bg-tertiary: var(--site-soft); --color-surface-elevated: var(--site-soft); --color-text-primary: #24303b; --color-text-secondary: #55666e; }
.legacy-article .article-title { margin-bottom: 0.75rem; }
.legacy-article h1.article-title { font-size: 1.75em; line-height: 1.5; }
.legacy-article .blog-meta { align-items: center; color: var(--site-muted); display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 0 0 1.5rem; }
.legacy-article .blog-category,
.legacy-article time { margin: 0; }
.legacy-article .blog-category { color: var(--site-accent-dark); font-weight: 700; text-transform: uppercase; }
.legacy-article .dot { background: var(--site-line); border-radius: 50%; display: inline-block; height: 0.35rem; width: 0.35rem; }
.legacy-article .article-banner { background: var(--site-soft); border: 1px solid var(--site-line); border-radius: 8px; display: block; max-height: 28rem; object-fit: contain; width: 100%; }
.legacy-article .article-content { margin-top: 2rem; }
.legacy-article .article-content h2.h3 { color: var(--site-accent-dark); font-size: 1.25em; margin: 2.2rem 0 0.9rem; }
.legacy-article .article-content h3.h4 { font-size: 1.1em; margin: 1.6rem 0 0.7rem; }
.legacy-article .article-content p,
.legacy-article .article-content li { color: #55666e; line-height: 1.75; }
.legacy-article .article-content ul,
.legacy-article .article-content ol { margin: 1rem 0; padding-left: 1.5rem; }
.legacy-article .article-content li { margin-bottom: 0.45rem; }
.legacy-article .step-image { max-height: 34rem; object-fit: contain; }
.legacy-article .disclaimer,
.legacy-article .info-box,
.legacy-article .warning-box,
.legacy-article .success-box,
.legacy-article .sources,
.legacy-article .command-explain { background: var(--site-soft); border: 1px solid var(--site-line); border-left: 4px solid var(--site-accent); border-radius: 8px; margin: 1.2rem 0; padding: 1rem 1.1rem; }
.legacy-article .warning-box { border-left-color: #9e711a; }
.legacy-article .success-box { border-left-color: #55742f; }
.legacy-article .disclaimer h4,
.legacy-article .info-box h4,
.legacy-article .disclaimer h2.h4,
.legacy-article .info-box h3.h4,
.legacy-article .command-explain strong { color: var(--site-accent-dark); }
.legacy-article .warning-box h4,
.legacy-article .warning-box h3.h4 { color: #8c6212; }
.legacy-article .success-box h4,
.legacy-article .success-box h3.h4 { color: #4a6629; }
.legacy-article .lab-setup { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.2rem 0; }
.legacy-article .lab-item { border: 1px solid var(--site-line); border-radius: 8px; padding: 1rem; text-align: center; }
.legacy-article .lab-item .emoji { font-size: 2rem; margin-bottom: 0.45rem; }
.legacy-article .lab-item h5,
.legacy-article .lab-item h3.h5 { color: var(--site-accent-dark); font-size: 0.9em; margin: 0 0 0.35rem; }
.legacy-article .step-number { align-items: center; background: var(--site-accent); border-radius: 50%; color: var(--site-on-accent); display: inline-flex; font-weight: 700; height: 1.9rem; justify-content: center; margin-right: 0.55rem; width: 1.9rem; }
.legacy-article .comparison-table { border-collapse: collapse; display: block; margin: 1.25rem 0; overflow-x: auto; width: 100%; }
.legacy-article .comparison-table th,
.legacy-article .comparison-table td { border: 1px solid var(--site-line); padding: 0.8rem; text-align: left; vertical-align: top; }
.legacy-article .comparison-table th { background: var(--site-accent-dark); color: var(--site-on-accent-dark); }
.legacy-article .command-line,
.legacy-article .output-example { background: #121a22; border: 1px solid #26333f; border-radius: 8px; box-shadow: 0 14px 36px rgba(13, 20, 26, 0.18); color: #a9b4ae; font-family: "Cascadia Mono", "Consolas", "Courier New", monospace; margin: 1rem 0; overflow-x: auto; padding: 1rem; white-space: pre-wrap; }
.legacy-article .command-line:before { border-bottom: 1px solid #2c3a47; color: #a3bf92; content: "root@kali:~$"; display: block; font-weight: 700; margin: -0.15rem 0 0.75rem; padding-bottom: 0.65rem; }
.legacy-article .command-line code { color: #f4f0df; font-family: inherit; font-weight: 600; white-space: pre-wrap; }
.legacy-article .sources a { word-break: break-word; }
.legacy-article .detail-wrapper { align-items: start; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr); margin-top: 1.25rem; }
.legacy-article .detail-preview img { background: var(--site-soft); border: 1px solid var(--site-line); border-radius: 8px; display: block; width: 100%; }
.legacy-detail h1.h3 { font-size: 1.25em; line-height: 1.5; }
.legacy-detail h2.h4 { font-size: 1.1em; line-height: 1.5; }
.legacy-root h4.h5 { font-size: 0.9em; line-height: 1.5; }
.timeline .timeline-title { font-size: 1.25em; line-height: 1.5; }
.legacy-article .detail-description .h3,
.legacy-article .project-more-info .h4,
.legacy-article .section-title { color: var(--site-accent-dark); margin-bottom: 0.75rem; }
.legacy-article .project-more-info { margin-top: 2rem; }
.legacy-article .project-more-info ul { padding-left: 1.25rem; }
.legacy-article .form-btn { align-items: center; background: var(--site-accent); border-radius: 6px; color: var(--site-on-accent) !important; display: inline-flex; gap: 0.55rem; margin-top: 1rem; padding: 0.75rem 1rem; }
.legacy-article .form-btn:hover { background: var(--site-accent-dark); color: var(--site-on-accent-dark) !important; }
.legacy-article .title-wrapper { align-items: center; display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.legacy-article .icon-box { align-items: center; background: var(--site-soft); border: 1px solid var(--site-line); border-radius: 8px; color: var(--site-accent-dark); display: inline-flex; flex: 0 0 auto; height: 2.3rem; justify-content: center; width: 2.3rem; }
.legacy-article .timeline,
.legacy-article .service,
.legacy-article .clients,
.legacy-article .skill { margin-top: 2.5rem; }
.legacy-article .timeline-list,
.legacy-article .service-list,
.legacy-article .skills-list,
.legacy-article .clients-list { list-style: none; margin: 0; padding: 0; }
.legacy-article .timeline-item,
.legacy-article .service-item,
.legacy-article .skills-item { border: 1px solid var(--site-line); border-radius: 8px; margin-bottom: 0.9rem; padding: 1rem; }
.legacy-article .timeline-item-title,
.legacy-article .service-item-title { color: #24303b; margin: 0 0 0.35rem; }
.legacy-article .timeline-item span { color: var(--site-accent-dark); display: block; font-weight: 700; margin-bottom: 0.45rem; }
.legacy-article .service-list { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.legacy-article .service-item { display: grid; gap: 0.8rem; grid-template-columns: 3rem minmax(0, 1fr); margin: 0; }
.legacy-article .service-icon-box img { max-width: 2.5rem; }
.legacy-article .clients-list { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr)); }
.legacy-article .clients-item { align-items: center; border: 1px solid var(--site-line); border-radius: 8px; display: flex; justify-content: center; padding: 0.75rem; }
.legacy-article .clients-item img { max-height: 3.4rem; max-width: 100%; object-fit: contain; }
.legacy-article .skills-item .title-wrapper { justify-content: space-between; margin-bottom: 0.55rem; }
.legacy-article .skill-progress-bg { background: #e3ddc5; border-radius: 999px; height: 0.55rem; overflow: hidden; }
.legacy-article .skill-progress-fill { background: var(--site-accent); border-radius: inherit; height: 100%; }
.legacy-article pre:not(.command-line):not(.terminal-screen-output) { background: #121a22; border: 1px solid #26333f; border-radius: 8px; color: #e6e1cb; font-family: "Cascadia Mono", "Consolas", "Courier New", monospace; overflow-x: auto; padding: 1rem; white-space: pre-wrap; }
.legacy-article p code,
.legacy-article li code { background: var(--site-soft); border-radius: 4px; color: var(--site-accent-dark); padding: 0.12rem 0.35rem; }
html[data-theme="dark"] .legacy-article .warning-box h4,
html[data-theme="dark"] .legacy-article .warning-box h3.h4 { color: #eacfa6; }
html[data-theme="dark"] .legacy-article .success-box h4,
html[data-theme="dark"] .legacy-article .success-box h3.h4 { color: #b7d0a7; }
@media screen and (min-width: 1181px) {
  .article-with-side-toc .toc-box { display: none; }
}
@media screen and (max-width: 1180px) {
  .article-with-side-toc { display: block; }
  .article-with-side-toc > .writeup-article { max-width: 58rem; }
  .article-side-toc { display: none; }
}
@media screen and (max-width: 736px) {
  .legacy-article h1.article-title { font-size: 1.5em; }
  .image-pair,
  .detail-grid,
  .legacy-article .lab-setup,
  .legacy-article .detail-wrapper,
  .legacy-article .service-list { grid-template-columns: 1fr; }
  .legacy-article .service-item { grid-template-columns: 1fr; }
  .toc-box { padding: 0.85rem; }
  .toc-box ol { padding-left: 1.1rem; }
}
