@font-face {
  font-family: "JetBrainsMono Nerd Font";
  src:
    local("JetBrainsMono Nerd Font"),
    local("JetBrainsMono Nerd Font Regular"),
    url("https://cdn.jsdelivr.net/gh/ryanoasis/nerd-fonts@v3.4.0/patched-fonts/JetBrainsMono/NoLigatures/Regular/JetBrainsMonoNLNerdFont-Regular.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrainsMono Nerd Font";
  src:
    local("JetBrainsMono Nerd Font Bold"),
    url("https://cdn.jsdelivr.net/gh/ryanoasis/nerd-fonts@v3.4.0/patched-fonts/JetBrainsMono/NoLigatures/Bold/JetBrainsMonoNLNerdFont-Bold.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root,
html[data-theme="gruvbox"] {
  color-scheme: light;
  --background: #f2e5bc;
  --surface: #fbf1c7;
  --surface-alt: #ebdbb2;
  --surface-deep: #d5c4a1;
  --surface-hover: #d5c4a1;
  --foreground: #3c3836;
  --foreground-muted: #665c54;
  --foreground-faint: #7c6f64;
  --border: #a89984;
  --green: #79740e;
  --yellow: #b57614;
  --blue: #076678;
  --purple: #8f3f71;
  --aqua: #427b58;
  --orange: #af3a03;
  --red: #9d0006;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="everforest"] {
  --background: #f3ead3;
  --surface: #fdf6e3;
  --surface-alt: #efebd4;
  --surface-deep: #e6e2cc;
  --surface-hover: #e6e2cc;
  --foreground: #5c6a72;
  --foreground-muted: #708089;
  --foreground-faint: #829181;
  --border: #a6b0a0;
  --green: #8da101;
  --yellow: #dfa000;
  --blue: #3a94c5;
  --purple: #df69ba;
  --aqua: #35a77c;
  --orange: #f57d26;
  --red: #f85552;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="catppuccin"] {
  --background: #eff1f5;
  --surface: #ffffff;
  --surface-alt: #e6e9ef;
  --surface-deep: #dce0e8;
  --surface-hover: #dce0e8;
  --foreground: #4c4f69;
  --foreground-muted: #6c6f85;
  --foreground-faint: #8c8fa1;
  --border: #acb0be;
  --green: #40a02b;
  --yellow: #df8e1d;
  --blue: #1e66f5;
  --purple: #8839ef;
  --aqua: #179299;
  --orange: #fe640b;
  --red: #d20f39;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="tokyo-night"] {
  --background: #d5d6db;
  --surface: #e9e9ec;
  --surface-alt: #c8c9cf;
  --surface-deep: #bfc1c8;
  --surface-hover: #bfc1c8;
  --foreground: #343b58;
  --foreground-muted: #4c5375;
  --foreground-faint: #6172a0;
  --border: #9699a3;
  --green: #485e30;
  --yellow: #8f5e15;
  --blue: #34548a;
  --purple: #5a4a78;
  --aqua: #0f4b6e;
  --orange: #965027;
  --red: #8c4351;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="materia"] {
  --background: #fafafa;
  --surface: #ffffff;
  --surface-alt: #eeeeee;
  --surface-deep: #e0e0e0;
  --surface-hover: #e0e0e0;
  --foreground: #263238;
  --foreground-muted: #546e7a;
  --foreground-faint: #78909c;
  --border: #b0bec5;
  --green: #43a047;
  --yellow: #f9a825;
  --blue: #1e88e5;
  --purple: #8e24aa;
  --aqua: #00897b;
  --orange: #fb8c00;
  --red: #e53935;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="solarized"] {
  --background: #fdf6e3;
  --surface: #fffaf0;
  --surface-alt: #eee8d5;
  --surface-deep: #e3dcc8;
  --surface-hover: #e3dcc8;
  --foreground: #586e75;
  --foreground-muted: #657b83;
  --foreground-faint: #839496;
  --border: #93a1a1;
  --green: #859900;
  --yellow: #b58900;
  --blue: #268bd2;
  --purple: #6c71c4;
  --aqua: #2aa198;
  --orange: #cb4b16;
  --red: #dc322f;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="rose-pine"] {
  --background: #faf4ed;
  --surface: #fffaf3;
  --surface-alt: #f2e9e1;
  --surface-deep: #dfdad9;
  --surface-hover: #e4dcd4;
  --foreground: #575279;
  --foreground-muted: #6e6a86;
  --foreground-faint: #9893a5;
  --border: #cecacd;
  --green: #56949f;
  --yellow: #ea9d34;
  --blue: #286983;
  --purple: #907aa9;
  --aqua: #56949f;
  --orange: #d7827e;
  --red: #b4637a;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="kanagawa"] {
  --background: #f2ecbc;
  --surface: #f9f1d5;
  --surface-alt: #e7dba0;
  --surface-deep: #d5cea3;
  --surface-hover: #ded7b4;
  --foreground: #545464;
  --foreground-muted: #716e61;
  --foreground-faint: #8a8980;
  --border: #b7b39a;
  --green: #6f894e;
  --yellow: #de9800;
  --blue: #4d699b;
  --purple: #624c83;
  --aqua: #597b75;
  --orange: #cc6d00;
  --red: #c84053;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="github"] {
  --background: #f6f8fa;
  --surface: #ffffff;
  --surface-alt: #f0f3f6;
  --surface-deep: #d8dee4;
  --surface-hover: #eaeef2;
  --foreground: #1f2328;
  --foreground-muted: #59636e;
  --foreground-faint: #818b98;
  --border: #d0d7de;
  --green: #1a7f37;
  --yellow: #9a6700;
  --blue: #0969da;
  --purple: #8250df;
  --aqua: #0a7c86;
  --orange: #bc4c00;
  --red: #cf222e;
  --link: var(--blue);
  --focus: var(--blue);
  --selected-bg: #24292f;
  --selected-fg: #ffffff;
}

html[data-theme="one-light"] {
  --background: #f4f4f4;
  --surface: #fafafa;
  --surface-alt: #eaeaeb;
  --surface-deep: #d7d7d8;
  --surface-hover: #e1e1e2;
  --foreground: #383a42;
  --foreground-muted: #5c6370;
  --foreground-faint: #8b8d91;
  --border: #c8c8c8;
  --green: #50a14f;
  --yellow: #c18401;
  --blue: #4078f2;
  --purple: #a626a4;
  --aqua: #0184bc;
  --orange: #d75f00;
  --red: #e45649;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: var(--surface);
}

html[data-theme="ayu"] {
  --background: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f0eee4;
  --surface-deep: #e1dfd5;
  --surface-hover: #ebe8de;
  --foreground: #5c6166;
  --foreground-muted: #6c7680;
  --foreground-faint: #8a9199;
  --border: #d9d8d2;
  --green: #86b300;
  --yellow: #f2ae49;
  --blue: #399ee6;
  --purple: #a37acc;
  --aqua: #4cbf99;
  --orange: #fa8d3e;
  --red: #f07171;
  --link: var(--blue);
  --focus: var(--orange);
  --selected-bg: var(--foreground);
  --selected-fg: #ffffff;
}

html[data-theme="papercolor"] {
  --background: #eeeeee;
  --surface: #ffffff;
  --surface-alt: #e4e4e4;
  --surface-deep: #d0d0d0;
  --surface-hover: #dadada;
  --foreground: #444444;
  --foreground-muted: #5f5f5f;
  --foreground-faint: #878787;
  --border: #bcbcbc;
  --green: #008700;
  --yellow: #af8700;
  --blue: #005faf;
  --purple: #8700af;
  --aqua: #008787;
  --orange: #d75f00;
  --red: #af0000;
  --link: var(--blue);
  --focus: var(--yellow);
  --selected-bg: var(--foreground);
  --selected-fg: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  min-width: 320px;
  scroll-behavior: auto;
  scroll-padding-top: 4rem;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      color-mix(in srgb, var(--foreground) 2%, transparent) 4px
    ),
    var(--background);
  color: var(--foreground);
  font-family:
    "JetBrainsMono Nerd Font",
    "JetBrains Mono",
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  font-size: 15px;
  line-height: 1.6;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

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

a:hover {
  color: var(--aqua);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p,
li,
a,
dd {
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--focus);
  background: var(--surface);
  color: var(--foreground);
  transform: translateY(-150%);
}

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

.nerd-icon {
  display: inline-block;
  width: 1.3em;
  flex: 0 0 1.3em;
  color: var(--aqua);
  font-family: "JetBrainsMono Nerd Font", monospace;
  text-align: center;
}

.terminal {
  position: relative;
  width: calc(100% - 2rem);
  max-width: 1800px;
  min-height: calc(100vh - 2rem);
  margin: 1rem auto;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0.8rem 0.8rem 0 var(--surface-deep);
}

.terminal::after {
  position: fixed;
  z-index: 200;
  inset: 0;
  background:
    linear-gradient(
      transparent 50%,
      color-mix(in srgb, var(--foreground) 2%, transparent) 50%
    );
  background-size: 100% 4px;
  content: "";
  pointer-events: none;
}

.terminal-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: var(--foreground);
  color: var(--selected-fg);
  font-size: 0.76rem;
}

.terminal-controls {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.terminal-control {
  width: 0.65rem;
  height: 0.65rem;
  border: 1px solid currentColor;
}

.terminal-control-close {
  background: var(--red);
}

.terminal-control-minimise {
  background: var(--yellow);
}

.terminal-control-expand {
  background: var(--green);
}

.terminal-title {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-state {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  white-space: nowrap;
}

.status-indicator {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid currentColor;
  background: var(--green);
}

.command-bar {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.command-bar a {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.8rem;
  border-right: 1px solid var(--border);
  color: var(--foreground-muted);
  font-size: 0.76rem;
  text-decoration: none;
}

.command-bar a:hover,
.command-bar a.is-active {
  background: var(--selected-bg);
  color: var(--selected-fg);
}

.command-key {
  color: var(--purple);
  font-weight: 700;
}

.command-bar a:hover .command-key,
.command-bar a.is-active .command-key {
  color: inherit;
}

.terminal-content {
  padding: 1rem;
}

.shell-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  margin: 0 0 0.8rem;
  color: var(--foreground-muted);
  font-size: 0.78rem;
}

.section-command {
  margin-top: 1rem;
}

.shell-user {
  color: var(--green);
  font-weight: 700;
}

.shell-path {
  color: var(--blue);
  font-weight: 700;
}

.shell-prompt {
  color: var(--orange);
  font-weight: 700;
}

.shell-command {
  color: var(--foreground);
}

.terminal-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--foreground);
}

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.panel + .panel {
  margin-top: 1rem;
}

.panel-title {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--foreground);
  font-size: 0.82rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel-title::before {
  color: var(--green);
  content: "┌─";
}

.panel-title::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}

.panel-index {
  color: var(--purple);
}

.panel-body {
  padding: clamp(1rem, 2.5vw, 2rem);
}

.identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.65fr);
  gap: 1rem;
}

.identity-block {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  border-left: 3px solid var(--green);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--green) 7%, transparent),
      transparent 40%
    ),
    var(--surface);
}

.identity-command {
  margin: 0 0 0.6rem;
  color: var(--green);
  font-size: 0.8rem;
}

.identity-command::before {
  color: var(--orange);
  content: "$ ";
}

h1 {
  margin: 0;
  color: var(--foreground);
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.role {
  margin: 1rem 0 0;
  color: var(--aqua);
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.5;
}

.contact-pane {
  display: grid;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.contact-pane-title {
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid var(--border);
  color: var(--yellow);
  font-size: 0.76rem;
}

.contact-pane-title::before {
  color: var(--green);
  content: "[open] ";
}

.contact-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  min-width: 0;
  border-bottom: 1px dotted var(--border);
}

.contact-list a,
.contact-item {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  min-width: 0;
  padding: 0.55rem 0.65rem;
}

.contact-list a {
  color: var(--foreground-muted);
  text-decoration: none;
}

.contact-list a:hover {
  background: var(--selected-bg);
  color: var(--selected-fg);
}

.contact-list a:hover .nerd-icon {
  color: inherit;
}

.action-list {
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem;
}

.action {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.action::before {
  color: var(--green);
  content: ">";
  font-weight: 700;
}

.action:hover {
  border-color: var(--foreground);
  background: var(--selected-bg);
  color: var(--selected-fg);
}

.action:hover .nerd-icon {
  color: inherit;
}

.summary-text {
  max-width: 110rem;
  margin: 0;
  color: var(--foreground-muted);
  font-size: 0.88rem;
  line-height: 1.8;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(23rem, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.workspace-column {
  min-width: 0;
}

.company + .company {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.company-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.company-header h3 {
  margin: 0;
  color: var(--aqua);
  font-size: 1.2rem;
}

.company-header h3::before {
  color: var(--orange);
  content: ":: ";
}

.company-subtitle {
  color: var(--foreground-muted);
  font-size: 0.78rem;
}

.company-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1rem;
}

.company-links a {
  font-size: 0.75rem;
}

.position {
  position: relative;
  margin-left: 0.5rem;
  padding: 0 0 2rem 1.5rem;
  border-left: 1px solid var(--border);
}

.position:last-child {
  padding-bottom: 0;
}

.position::before {
  position: absolute;
  top: 0.3rem;
  left: -0.36rem;
  width: 0.68rem;
  height: 0.68rem;
  border: 2px solid var(--surface);
  background: var(--orange);
  content: "";
}

.position-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  align-items: baseline;
}

.position-title {
  margin: 0;
  color: var(--foreground);
  font-size: 0.95rem;
}

.position-date {
  margin: 0;
  color: var(--blue);
  font-size: 0.75rem;
  white-space: nowrap;
}

.position-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin: 0.3rem 0 0;
  color: var(--purple);
  font-size: 0.74rem;
}

.repository {
  margin: 0.45rem 0 0;
  color: var(--foreground-muted);
  font-size: 0.73rem;
}

.position ul {
  margin: 0.85rem 0 0;
  padding: 0;
  color: var(--foreground-muted);
  list-style: none;
}

.position li {
  position: relative;
  padding-left: 1.4rem;
}

.position li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "├─";
}

.position li:last-child::before {
  content: "└─";
}

.position li + li {
  margin-top: 0.4rem;
}

.skills-grid {
  display: grid;
  gap: 0.75rem;
}

.skill-group {
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.skill-group h3 {
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--purple);
  font-size: 0.78rem;
  line-height: 1.45;
}

.skill-group h3::before {
  color: var(--green);
  content: "[+] ";
}

.skill-content {
  padding: 0.65rem;
}

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

.tag {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--foreground-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.tag::before {
  color: var(--green);
  content: "#";
}

.tag:hover {
  border-color: var(--aqua);
  background: var(--selected-bg);
  color: var(--selected-fg);
}

.tag:hover::before {
  color: inherit;
}

.skill-description {
  margin: 0.65rem 0 0;
  color: var(--foreground-muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.concept-list {
  display: grid;
  gap: 0;
  margin: 0.75rem 0 0;
}

.concept-list div {
  padding: 0.65rem 0;
  border-top: 1px dashed var(--border);
}

.concept-list dt {
  margin: 0;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 700;
}

.concept-list dt::before {
  color: var(--orange);
  content: "=> ";
}

.concept-list dd {
  margin: 0.25rem 0 0;
  color: var(--foreground-muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.education-list {
  display: grid;
}

.education-item {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
}

.education-item:last-child {
  border-bottom: 0;
}

.education-item h3 {
  margin: 0;
  color: var(--foreground);
  font-size: 0.8rem;
}

.education-item h3::before {
  color: var(--green);
  content: "├─ ";
}

.education-item:last-child h3::before {
  content: "└─ ";
}

.education-item p {
  margin: 0.2rem 0 0 1.6rem;
  color: var(--foreground-muted);
  font-size: 0.73rem;
}

.additional-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  color: var(--foreground-muted);
  font-size: 0.76rem;
  list-style: none;
}

.additional-list li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.cover-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 0.45fr) minmax(0, 1.55fr);
  gap: 1rem;
  align-items: start;
}

.cover-meta {
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.cover-meta dl {
  margin: 0;
}

.cover-meta div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  border-bottom: 1px dotted var(--border);
}

.cover-meta div:last-child {
  border-bottom: 0;
}

.cover-meta dt,
.cover-meta dd {
  margin: 0;
  padding: 0.5rem;
  font-size: 0.72rem;
}

.cover-meta dt {
  border-right: 1px dotted var(--border);
  color: var(--purple);
  font-weight: 700;
  text-transform: uppercase;
}

.cover-meta dd {
  color: var(--foreground-muted);
}

.letter-buffer {
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.buffer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.buffer-tab {
  padding: 0.35rem 0.65rem;
  border-right: 1px solid var(--border);
  background: var(--selected-bg);
  color: var(--selected-fg);
  font-size: 0.7rem;
}

.buffer-modified {
  color: var(--yellow);
}

.cover-letter-content {
  padding: clamp(1rem, 3vw, 2.5rem);
  color: var(--foreground-muted);
  font-size: 0.84rem;
  line-height: 1.8;
}

.cover-letter-content p {
  margin: 0;
}

.cover-letter-content p + p {
  margin-top: 1rem;
}

.cover-letter-content strong {
  color: var(--foreground);
}

.buffer-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0.65rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--foreground-faint);
  font-size: 0.68rem;
}

.theme-shell {
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.theme-output-line {
  margin: 0 0 0.75rem;
  color: var(--foreground-muted);
  font-size: 0.72rem;
}

.output-prefix {
  margin-right: 0.5rem;
  padding: 0.08rem 0.3rem;
  background: var(--blue);
  color: var(--surface);
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, 13rem), 1fr)
  );
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.theme-option {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground-muted);
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
}

.theme-option:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.theme-option[aria-checked="true"] {
  background: var(--selected-bg);
  color: var(--selected-fg);
}

.theme-key {
  color: var(--purple);
  font-weight: 700;
}

.theme-option[aria-checked="true"] .theme-key,
.theme-option[aria-checked="true"] .theme-check {
  color: inherit;
}

.theme-check {
  width: 1.1em;
  margin-left: auto;
  color: var(--green);
}

.theme-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  margin: 0.75rem 0 0;
  color: var(--foreground-faint);
  font-size: 0.7rem;
}

.theme-status output {
  color: var(--aqua);
  font-weight: 700;
}

.footer-help {
  margin: 0.35rem 0 0;
  color: var(--foreground-faint);
  font-size: 0.68rem;
}

.terminal-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.4rem 0.65rem;
  border-top: 1px solid var(--border);
  background: var(--foreground);
  color: var(--selected-fg);
  font-size: 0.68rem;
}

.mode-indicator {
  padding: 0.05rem 0.3rem;
  background: var(--green);
  color: var(--surface);
  font-weight: 700;
}

.download-notice {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  max-width: min(25rem, calc(100% - 2rem));
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--green);
  background: var(--foreground);
  color: var(--selected-fg);
  font-size: 0.72rem;
}

@media (min-width: 1500px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .distributed-skill {
    grid-column: 1 / -1;
  }

  .distributed-skill .concept-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
  }
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: minmax(0, 1.4fr) minmax(20rem, 1fr);
  }

  .identity-grid {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.6fr);
  }
}

@media (max-width: 820px) {
  .terminal {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .terminal-bar {
    position: static;
  }

  .identity-grid,
  .workspace,
  .cover-layout {
    grid-template-columns: 1fr;
  }

  .company-links {
    width: 100%;
    justify-content: flex-start;
  }

  .cover-meta div {
    grid-template-columns: 8rem minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .terminal::after {
    display: none;
  }

  .terminal-content {
    padding: 0.5rem;
  }

  .terminal-title {
    text-align: left;
  }

  .terminal-state {
    display: none;
  }

  .terminal-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .command-bar a {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--border);
  }

  .identity-block,
  .panel-body,
  .cover-letter-content {
    padding: 0.85rem;
  }

  h1 {
    font-size: clamp(2.3rem, 15vw, 3.8rem);
  }

  .position {
    margin-left: 0.25rem;
    padding-left: 1.15rem;
  }

  .position-header {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .position-date {
    white-space: normal;
  }

  .company-links a {
    width: 100%;
  }

  .cover-meta div {
    grid-template-columns: 1fr;
  }

  .cover-meta dt {
    padding-bottom: 0.15rem;
    border-right: 0;
  }

  .cover-meta dd {
    padding-top: 0.15rem;
  }

  .theme-options {
    grid-template-columns: 1fr;
  }

  .terminal-footer {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  :root,
  html[data-theme] {
    --background: #ffffff;
    --surface: #ffffff;
    --surface-alt: #f5f5f5;
    --surface-deep: #ffffff;
    --foreground: #222222;
    --foreground-muted: #333333;
    --foreground-faint: #555555;
    --border: #999999;
    --green: #3f5f00;
    --yellow: #765000;
    --blue: #004f70;
    --purple: #633060;
    --aqua: #185f50;
    --orange: #7d3900;
    --red: #800000;
    --link: #004f70;
  }

  body {
    background: #ffffff;
    font-size: 8pt;
    line-height: 1.4;
  }

  .terminal {
    width: 100%;
    min-height: auto;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .terminal::after,
  .terminal-bar,
  .command-bar,
  .shell-line,
  .action-list,
  .theme-panel,
  .terminal-footer,
  .skip-link,
  .download-notice {
    display: none;
  }

  .terminal-content {
    padding: 0;
  }

  .panel {
    border: 0;
  }

  .panel + .panel {
    margin-top: 5mm;
  }

  .panel-title {
    padding: 0 0 2mm;
    border-bottom: 1px solid #999999;
    background: #ffffff;
  }

  .panel-body {
    padding: 3mm 0;
  }

  .identity-grid {
    grid-template-columns: 65% 35%;
  }

  .identity-block {
    padding: 0;
    background: #ffffff;
  }

  .contact-pane {
    border: 0;
    background: #ffffff;
  }

  h1 {
    font-size: 27pt;
  }

  .workspace {
    grid-template-columns: 64% 36%;
    gap: 5mm;
  }

  .skill-content {
    padding: 2mm;
  }

  #cover-letter {
    break-before: page;
  }

  .cover-layout {
    grid-template-columns: 28% 72%;
    gap: 5mm;
  }

  .cover-letter-content {
    padding: 4mm;
    font-size: 9pt;
  }

  .position,
  .company,
  .skill-group,
  .education-item,
  .concept-list div,
  .cover-meta,
  .letter-buffer {
    break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
