:root {
  --bg-color: #0a0a0a;
  --text-primary: #ededed;
  --text-secondary: #8a8a8a;
  --accent-color: #ffffff;
  --border-color: #222222;
  --logo-color: #c8c8c8;

  /* Palette */
  --palette-bg: #111111;
  --palette-border: #2a2a2a;
  --palette-separator: #1e1e1e;
  --palette-item-hover: #1a1a1a;
  --palette-muted: #444444;
  --palette-kbd-bg: #1e1e1e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html {
  zoom: 1.1;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 85px 24px;
}

h1,
h2,
h3 {
  font-weight: 500;
  color: var(--text-primary);
}

header {
  margin-bottom: 68px;
}

h1 {
  font-family: "Syne", sans-serif;
  font-size: 1.3rem;
  font-style: normal;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 a {
  color: var(--logo-color);
  text-decoration: none;
}

.name-expand {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  vertical-align: bottom;
  transition:
    max-width 0.4s ease,
    opacity 0.3s ease;
}

.nav-brand:hover .name-expand,
.nav-brand.tap-expand .name-expand {
  max-width: 80px;
  opacity: 1;
}

@media (hover: none) {
  /* Prevent sticky hover on mobile */
  .nav-brand:hover .name-expand {
    max-width: 0;
    opacity: 0;
  }
  .nav-brand.tap-expand .name-expand {
    max-width: 80px;
    opacity: 1;
  }
}
h1 a::after {
  display: none; /* Prevents global link hover from applying if we ever add it globally */
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.header-divider {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: 12px 0 24px 0;
  width: 100%;
}

.bio {
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

section {
  margin-bottom: 60px;
}

h2 {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 3rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 24px;
}

ul {
  list-style: none;
}

/* Projects */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  position: relative;
}

.project-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  bottom: -26px;
  right: 15px;
  width: 4px;
  background-image: radial-gradient(
    circle,
    var(--text-secondary) 35%,
    transparent 35%
  );
  background-size: 100% 12px;
  opacity: 0.15;
}

.project-info h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.project-info h3::after {
  content: "∨";
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  opacity: 0.8;
  flex-shrink: 0;
  margin-left: 12px;
}

.project-item.expanded .project-info h3::after {
  content: "∧";
  opacity: 0.8;
}

.project-subtitle {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.project-tech {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.project-desc p {
  line-height: 1.6;
}

.project-info {
  cursor: pointer;
  flex: 1;
}

.project-collapse {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.4s ease,
    opacity 0.35s ease;
}

.project-item.expanded .project-collapse {
  max-height: 300px;
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.project-links a {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

.project-year {
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  margin-left: 24px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .project-list li {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 4px;
  }

  .project-list li:not(:last-child)::after {
    display: none;
  }

  .project-year {
    margin-left: 0;
    margin-bottom: 4px;
  }
}

/* Links */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.link-list a {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brand-win95 {
  display: none;
}

.taskbar-windows {
  display: none;
}

.win-clock {
  display: none;
}

/* Interactions */
a {
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  outline: none;
}

a:focus-visible {
  box-shadow: 0 0 0 2px var(--text-secondary);
  border-radius: 2px;
}

a.hover-line::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

a.hover-line:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.mobile-bio {
  display: none;
}

/* Page Transitions */
.page-section {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Hero text fade-in */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 16px;
  animation: fadeUp 0.6s ease forwards;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  animation: fadeUp 0.6s ease 0.15s both;
}

/* Hide Scrollbar (WebKit) */
::-webkit-scrollbar {
  display: none;
}

/* Palette trigger button in navbar */
.palette-trigger {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.palette-trigger:hover {
  color: var(--text-primary);
  border-color: #444;
}

/* Show search on desktop, menu on mobile */
.icon-menu {
  display: none;
}
.icon-search {
  display: block;
}

/* Palette overlay */
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.palette-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Palette modal */
.palette-modal {
  background: var(--palette-bg);
  border: 1px solid var(--palette-border);
  border-radius: 10px;
  width: 100%;
  max-width: 560px;
  margin: 0 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.2s ease;
}

.palette-handle {
  display: none; /* only shown on mobile */
}

.palette-overlay.open .palette-modal {
  transform: scale(1) translateY(0);
}

/* Input area */
.palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--palette-separator);
}

.palette-slash {
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  color: var(--palette-muted);
  flex-shrink: 0;
}

#palette-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.95rem;
  width: 100%;
  caret-color: var(--text-primary);
}

#palette-input::placeholder {
  color: var(--palette-muted);
}

/* Results */
.palette-results {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px 0;
}

.palette-results::-webkit-scrollbar {
  display: none;
}

.palette-category {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--palette-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 18px 4px;
}

.palette-item {
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background 0.1s ease,
    color 0.1s ease;
}

.palette-item:hover,
.palette-item.active {
  background: var(--palette-item-hover);
  color: var(--text-primary);
}

.palette-empty {
  padding: 24px 18px;
  font-size: 0.9rem;
  color: var(--palette-muted);
  font-family: "JetBrains Mono", monospace;
}

/* Footer */
.palette-footer {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--palette-separator);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--palette-muted);
}

.palette-footer kbd {
  display: inline-block;
  background: var(--palette-kbd-bg);
  border: 1px solid var(--palette-border);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-right: 3px;
}

/* ── Light Mode ─────────────────────────────────────────────── */
html.light {
  --bg-color: #f5f5f0;
  --text-primary: #111111;
  --text-secondary: #666666;
  --accent-color: #111111;
  --border-color: #e0e0e0;
  --logo-color: #555555;

  /* Palette */
  --palette-bg: #ffffff;
  --palette-border: #e0e0e0;
  --palette-separator: #f0f0f0;
  --palette-item-hover: #f5f5f5;
  --palette-muted: #aaaaaa;
  --palette-kbd-bg: #f0f0f0;
}

html.light .palette-overlay {
  background: rgba(245, 245, 240, 0.7);
}

html.light .palette-modal {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
}

/* ── Windows 95 Theme ───────────────────────────────────── */
html.win95 {
  --bg-color: #008080;
  --text-primary: #000000;
  --text-secondary: #000000;
  --accent-color: #0000ee;
  --border-color: #000000;
  --logo-color: #000000;

  /* Palette */
  --palette-bg: #c0c0c0;
  --palette-border: #000000;
  --palette-separator: #808080;
  --palette-item-hover: #000080;
  --palette-muted: #808080;
  --palette-kbd-bg: #ffffff;
}

html.win95 body {
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: none;
}

html.win95 h1,
html.win95 h2,
html.win95 h3,
html.win95 .blog-item-title,
html.win95 .post-title,
html.win95 .post-body h2 {
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
  font-style: normal;
  font-weight: bold;
}

html.win95 a.hover-line,
html.win95 .post-body a {
  color: #0000ee;
  text-decoration: underline;
}
html.win95 a.hover-line::after {
  display: none;
}
html.win95 a.hover-line:hover,
html.win95 .post-body a:hover {
  color: #ff0000;
}

@font-face {
  font-family: "Pixelated MS Sans Serif";
  src:
    url("https://unpkg.com/98.css/dist/ms_sans_serif.woff2") format("woff2"),
    url("https://unpkg.com/98.css/dist/ms_sans_serif.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Pixelated MS Sans Serif";
  src:
    url("https://unpkg.com/98.css/dist/ms_sans_serif_bold.woff2")
      format("woff2"),
    url("https://unpkg.com/98.css/dist/ms_sans_serif_bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

html.win95 *:not(pre):not(code) {
  font-family:
    "Pixelated MS Sans Serif", "MS Sans Serif", Tahoma, sans-serif !important;
}

html.win95,
html.win95 a,
html.win95 button,
html.win95 .hover-line,
html.win95 .win-icon {
  cursor: default !important;
}
html.win95 input,
html.win95 textarea {
  cursor: text !important;
}
html.win95 ::selection {
  background: #000080;
  color: #ffffff;
}

html.win95 .palette-item.active,
html.win95 .palette-item:hover {
  background: #000080;
  color: #ffffff;
}

html.win95 .palette-item.active .palette-slash,
html.win95 .palette-item:hover .palette-slash,
html.win95 .palette-item.active .palette-item-category,
html.win95 .palette-item:hover .palette-item-category {
  color: #ffffff;
}

html.win95 .palette-overlay {
  background: transparent;
  align-items: flex-end;
  justify-content: flex-start;
  backdrop-filter: none;
}

html.win95 .palette-modal {
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #808080;
  border-right-color: #808080;
  box-shadow: 1px 1px 0 1px #000000;
  border-radius: 0;
  margin-bottom: 40px; /* Offset by taskbar height */
  margin-left: 0;
  width: 250px;
  background: #c0c0c0;
  transform: none !important;
  padding-left: 32px;
  position: relative;
}

html.win95 .palette-modal::before {
  content: "noble alex";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 28px;
  background: #808080;
  color: #ffffff;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Visual bottom because of rotate */
  padding-top: 8px; /* Offset from visual bottom */
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  font-family: Arial, sans-serif !important;
}

html.win95 .palette-footer {
  display: none;
}

html.win95 .palette-input-wrap {
  background: #000080;
  color: #ffffff;
  border: none;
}

html.win95 .palette-slash {
  color: #ffffff;
}

html.win95 #palette-input {
  color: #ffffff;
}
html.win95 #palette-input::placeholder {
  color: #c0c0c0;
}

html.win95 .palette-item.active {
  background: #000080;
  color: #ffffff;
}

html.win95 .project-item {
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #808080;
  border-right-color: #808080;
  background: #c0c0c0;
  padding: 16px;
  margin-bottom: 16px;
}
html.win95 .project-item:hover {
  opacity: 1;
}

html.win95 .blog-item {
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  background: #c0c0c0;
  padding: 16px;
  margin-bottom: 16px;
}
html.win95 .blog-item + .blog-item {
  border-top: 2px solid #ffffff;
}

/* Win95 Desktop Layout */
html.win95,
html.win95 body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

html.win95 .container {
  max-width: none;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

html.win95 .header-divider {
  display: none;
}

html.win95 header {
  order: 2; /* Move taskbar to bottom */
  margin: 0;
  padding: 4px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  box-shadow: inset 0 1px 0 #dfdfdf;
  display: flex;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

html.win95 .navbar {
  flex: 1;
  display: flex;
  align-items: center;
  margin: 0;
}

#site-title {
  margin: 0 4px;
}

html.win95 .nav-brand {
  display: inline-block;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #000000;
  border-right-color: #000000;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: bold;
  color: #000;
  text-decoration: none;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080;
}
html.win95 .nav-brand.active-start,
html.win95 .nav-brand:active {
  border-top-color: #000000;
  border-left-color: #000000;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
  box-shadow: inset 1px 1px 0 #808080;
}
html.win95 .brand-normal {
  display: none;
}
html.win95 .brand-win95 {
  display: inline-flex;
  align-items: center;
}

html.win95 .nav-links {
  display: none !important;
}

html.win95 .taskbar-windows {
  display: flex;
  flex: 1;
  gap: 4px;
  padding: 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

html.win95 .taskbar-btn {
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #000000;
  border-right-color: #000000;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: default;
  color: #000;
}

html.win95 .taskbar-btn.active-window {
  border-top-color: #000000;
  border-left-color: #000000;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
  background: #dfdfdf;
  box-shadow: inset 1px 1px 0 #808080;
  background-image:
    repeating-linear-gradient(
      45deg,
      #c0c0c0 25%,
      transparent 25%,
      transparent 75%,
      #c0c0c0 75%,
      #c0c0c0
    ),
    repeating-linear-gradient(
      45deg,
      #c0c0c0 25%,
      transparent 25%,
      transparent 75%,
      #c0c0c0 75%,
      #c0c0c0
    );
  background-position:
    0 0,
    1px 1px;
  background-size: 2px 2px;
}
html.win95 .nav-links li {
  margin: 0;
}
html.win95 .nav-links a {
  display: inline-block;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #000000;
  border-right-color: #000000;
  padding: 4px 12px;
  font-size: 12px;
  color: #000;
  text-decoration: none;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080;
}
html.win95 .nav-links a.active {
  border-top-color: #000000;
  border-left-color: #000000;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
  background: #dfdfdf;
  box-shadow: inset 1px 1px 0 #808080;
}

html.win95 .palette-trigger {
  display: none;
}

html.win95 .win-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
  box-shadow: inset 1px 1px 0 #000000;
  background: #c0c0c0;
  padding: 0 12px;
  height: 24px;
  font-size: 11px;
  color: #000;
  margin-left: auto;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
}

/* Desktop Icons */
.desktop-icons {
  display: none;
}
html.win95 .desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}
html.win95 .win-icon {
  background: transparent;
  border: 1px dotted transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  cursor: pointer;
  color: #ffffff;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  font-size: 11px;
}
html.win95 .win-icon:focus,
html.win95 .win-icon:active {
  outline: none;
}
html.win95 .win-icon:focus span {
  background: #000080;
  border: 1px dotted #ffff00;
}

/* Page sections as Windows */
html.win95 .content-wrapper {
  flex: 1;
  position: relative;
  padding: 0;
  margin-bottom: 40px; /* Space for taskbar */
}
html.win95 .page-section.active {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 600px;
  max-width: 95vw;
  max-height: 85vh;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #000000;
  border-right-color: #000000;
  box-shadow: 1px 1px 0 1px #000000;
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}
html.win95 .page-section {
  opacity: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s ease; /* disable jumpy transform animation */
}

/* Disable modern animations/transitions in Win95 */
html.win95,
html.win95 * {
  animation: none !important;
  transition: none !important;
}

.win-title-bar {
  display: none;
}
html.win95 .win-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000080;
  color: #ffffff;
  padding: 4px 6px;
  font-weight: bold;
  font-size: 13px;
  flex-shrink: 0;
  margin: 2px;
}
html.win95 .win-title-text {
  display: flex;
  align-items: center;
  gap: 6px;
}
.win-title-icon {
  display: none;
}
html.win95 .win-title-icon {
  display: block;
}
html.win95 .win-controls {
  display: flex;
  gap: 2px;
}

html.win95 .win-min,
html.win95 .win-close {
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #000000;
  border-right-color: #000000;
  font-size: 12px;
  font-weight: bold;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: #000;
  padding: 0;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080;
}

html.win95 .win-min {
  align-items: flex-end;
  padding-bottom: 2px;
}

html.win95 .win-min:active,
html.win95 .win-close:active {
  border-top-color: #000000;
  border-left-color: #000000;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
  box-shadow: inset 1px 1px 0 #808080;
}

html.win95 .win-content {
  background: #ffffff;
  color: #000000;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
  box-shadow: inset 1px 1px 0 #000000;
  margin: 2px 4px 4px 4px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Ensure text in win-content is readable */
html.win95 .win-content p,
html.win95 .win-content h1,
html.win95 .win-content h2,
html.win95 .win-content h3 {
  color: #000000;
}

html.win95 .project-item,
html.win95 .blog-item {
  background: #ffffff;
  border: 1px dotted #808080;
  box-shadow: none;
  color: #000000;
}
html.win95 .blog-item + .blog-item {
  border-top: 1px dotted #808080;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .container {
    padding: 34px 20px;
  }

  .nav-links li:not(:last-child) {
    display: none;
  }

  .mobile-quick-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 120px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.95rem;
    animation: fadeUp 0.6s ease 0.3s both;
  }

  .mobile-quick-links a {
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    width: fit-content;
  }

  .project-list li {
    flex-direction: column;
    gap: 8px;
  }

  .project-year {
    margin-left: 0;
  }

  /* Mobile Palette — bottom sheet */
  .palette-overlay {
    align-items: flex-end;
    padding-top: 0;
    background: rgba(0, 0, 0, 0.5);
  }

  .palette-modal {
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 62vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .palette-overlay.open .palette-modal {
    transform: translateY(0);
  }

  .palette-handle {
    width: 36px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 12px auto 4px;
    flex-shrink: 0;
  }

  .palette-results {
    max-height: unset;
    flex: 1;
    overflow-y: auto;
  }

  .palette-footer {
    display: none;
  }

  .palette-trigger {
    padding: 6px;
    border-radius: 6px;
  }

  .palette-trigger svg {
    width: 14px;
    height: 14px;
  }

  .icon-search {
    display: none;
  }
  .icon-menu {
    display: block;
  }

  .palette-trigger span {
    display: none;
  }

  /* Mobile Bio toggle */
  .desktop-bio {
    display: none;
  }

  .mobile-bio {
    display: block;
  }
}

/* Connect meta */
.connect-meta {
  margin-top: 40px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

html.light .connect-meta {
  color: #999999;
}

.connect-meta-dot {
  opacity: 0.3;
}

.connect-meta-open {
  color: inherit;
}

/* Blog */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-loading {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blog-error {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blog-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.blog-item + .blog-item {
  border-top: 1px solid var(--border-color);
}

.blog-item:hover {
  opacity: 0.7;
}

.blog-item::after {
  display: none; /* override global hover-line pseudo-element */
}

.blog-item-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.blog-item-title {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  word-break: break-word;
}

.blog-item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.blog-item-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .blog-item {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .blog-item-title {
    font-size: 1.15rem;
  }

  .blog-item-desc {
    -webkit-line-clamp: 3;
  }

  .blog-item-date {
    font-size: 0.75rem;
  }
}

/* Win95 Scrollbars */
html.win95 ::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
html.win95 ::-webkit-scrollbar-track {
  background: #dfdfdf;
  box-shadow: inset 1px 1px 0 0 #a0a0a0;
}
html.win95 ::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-bottom-color: #000000;
  border-right-color: #000000;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080;
}

/* Win95 Resets for minimal theme bleeding */
html.win95 h2 {
  font-size: 22px;
  margin-bottom: 16px;
}
html.win95 .project-list li::after {
  display: none;
}
html.win95 .hero-text {
  font-size: 18px;
  margin-top: 16px;
}
html.win95 .project-info h3 {
  font-size: 18px;
}
html.win95 .project-desc,
html.win95 .project-tech,
html.win95 .project-year,
html.win95 .hero-sub {
  font-size: 16px;
}
html.win95 .blog-item-title {
  font-size: 20px;
  margin-bottom: 8px;
}
html.win95 .blog-item-desc {
  font-size: 16px;
}
html.win95 .blog-item-date {
  font-size: 14px;
}

/* Theme Transition Overlay */
.theme-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  background: rgba(128, 128, 128, 0);
  pointer-events: none;
  transition:
    backdrop-filter 0.8s ease,
    -webkit-backdrop-filter 0.8s ease,
    background 0.8s ease !important;
}

.theme-transition-overlay.active {
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  background: rgba(128, 128, 128, 0.2);
}

@media (max-width: 600px) {
  .palette-input-wrap,
  .palette-footer {
    display: none !important;
  }
  .palette-modal {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

