@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --glass: rgba(255, 255, 255, 0.36);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --glass-dark: rgba(35, 52, 80, 0.35);
  --glass-stroke: rgba(255, 255, 255, 0.58);
  --glass-shadow: rgba(15, 22, 40, 0.25);
  --ink: #0c1220;
  --soft-ink: rgba(12, 18, 32, 0.68);
  --accent: #39c0ff;
  --accent-2: #45ffb0;
  --surface: rgba(255, 255, 255, 0.12);
  --mono: "JetBrains Mono", "IBM Plex Sans", monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100vh;
  min-height: 100lvh;
  background-color: #7aa6e0;
  background-image: url("assets/windowsxp.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

body {
  background-color: #7aa6e0;
  background-image: url("assets/windowsxp.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: transparent;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100lvh;
  background-image: url("assets/windowsxp.webp");
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) contrast(1.05);
  z-index: -2;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.05));
  mix-blend-mode: screen;
}

.article-page {
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(200, 214, 255, 0.9) 45%, rgba(170, 188, 240, 0.9) 100%);
}

.article-page .backdrop {
  display: none;
}

.article-page .glass-bar {
  display: none;
}

.privacy-policy-page {
  min-height: 100vh;
  background: #f6f8fc;
  color: #172033;
  overflow: auto;
}

.privacy-policy {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) 0;
}

.privacy-policy article {
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid #dce2ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.08);
}

.privacy-policy-header {
  padding-bottom: 24px;
  margin-bottom: 30px;
  border-bottom: 1px solid #dce2ed;
}

.privacy-policy h1,
.privacy-policy h2 {
  font-family: var(--display);
  line-height: 1.2;
}

.privacy-policy h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.04em;
}

.privacy-policy h2 {
  margin: 32px 0 12px;
  font-size: 1.35rem;
}

.privacy-policy p,
.privacy-policy li {
  color: #364154;
  font-size: 1rem;
  line-height: 1.7;
}

.privacy-policy p + p {
  margin-top: 16px;
}

.privacy-policy ul {
  padding-left: 24px;
  margin: 12px 0;
}

.privacy-policy li + li {
  margin-top: 6px;
}

.privacy-policy-header p {
  margin-top: 12px;
  color: #657086;
}

.privacy-policy code {
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: #f0f3f8;
  color: #1e2a3d;
  font-family: var(--mono);
  font-size: 0.9em;
}

@media (max-width: 480px) {
  .privacy-policy {
    width: min(100% - 20px, 760px);
    padding: 20px 0;
  }

  .privacy-policy article {
    padding: 26px 20px;
    border-radius: 12px;
  }
}

.glass-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
  border-radius: 999px;
  margin: 16px clamp(12px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(120% 140% at 10% 20%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2) 45%, rgba(15, 24, 44, 0.35) 100%);
  box-shadow: 0 28px 60px rgba(8, 14, 28, 0.35);
  backdrop-filter: blur(26px) saturate(1.3);
  overflow: hidden;
  background-clip: padding-box;
}

.glass-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.3));
  opacity: 0.7;
  pointer-events: none;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.brand-title {
  font-size: clamp(1.05rem, 1.9vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-family: var(--display);
  text-transform: lowercase;
  text-shadow: 0 8px 24px rgba(12, 18, 32, 0.25);
}

.bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  margin-left: auto;
}

.glass-button {
  border: 1px solid var(--glass-stroke);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2));
  color: var(--ink);
  text-decoration: none;
  padding: 0 18px;
  height: 44px;
  border-radius: 999px;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(12, 18, 32, 0.15);
  backdrop-filter: blur(16px) saturate(1.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.resume-button {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(210, 230, 255, 0.35));
  box-shadow: 0 12px 24px rgba(12, 18, 32, 0.18);
}

.glass-button:hover,
.glass-button:focus-visible {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 12px 22px rgba(12, 18, 32, 0.22);
}

.menu {
  position: relative;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 220px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--glass-stroke);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55));
  box-shadow: 0 18px 35px rgba(12, 18, 32, 0.25);
  backdrop-filter: blur(20px) saturate(1.4);
  display: grid;
  gap: 12px;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-item {
  border: none;
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(57, 192, 255, 0.25);
  transform: translateX(4px);
}

.menu-section {
  display: grid;
  gap: 8px;
}

.menu-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--soft-ink);
  font-weight: 600;
}

.menu-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-chip {
  border: 1px solid rgba(12, 18, 32, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease, background 0.2s ease;
}

.menu-chip.active {
  background: rgba(69, 255, 176, 0.35);
  border-color: rgba(12, 18, 32, 0.25);
}

.menu-chip:hover,
.menu-chip:focus-visible {
  transform: translateY(-1px);
}

.menu-clear {
  border: none;
  background: rgba(12, 18, 32, 0.08);
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.desktop {
  padding: 32px clamp(18px, 4vw, 48px) 90px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 26px 20px;
}

.icon-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  padding: 10px 6px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.icon-card:hover,
.icon-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 25px rgba(12, 18, 32, 0.18);
  background: rgba(255, 255, 255, 0.35);
}

.icon-card.dragging {
  cursor: grabbing;
  transform: none;
  z-index: 100;
  box-shadow: 0 22px 36px rgba(12, 18, 32, 0.32);
  transition: none;
}

.icon-card.dragging:hover {
  transform: none;
}

.icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: url("assets/docicon.png") center / contain no-repeat;
  border: none;
  display: grid;
  place-items: center;
  box-shadow: none;
  position: relative;
}

.icon::after {
  content: none;
}

.icon-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
  line-height: 1.25;
  min-height: 2.5em;
}

.icon-meta {
  font-size: 0.72rem;
  color: var(--soft-ink);
  text-align: center;
  font-family: var(--mono);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.6);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(100%, 1080px);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 12px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.25));
  box-shadow: 0 30px 80px rgba(8, 14, 28, 0.45);
  backdrop-filter: blur(24px) saturate(1.2);
  z-index: 1;
}

.modal-card.modal-article {
  width: min(1400px, 98vw);
  max-height: 94vh;
  padding: 0;
  border-radius: 34px;
  background: radial-gradient(120% 140% at 8% 12%, rgba(255, 255, 255, 0.95), rgba(235, 244, 255, 0.7) 50%, rgba(210, 226, 255, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 36px 80px rgba(8, 14, 28, 0.35);
  backdrop-filter: blur(28px) saturate(1.25);
}

.modal.modal-poster {
  padding: 0;
  overflow: hidden;
}

.modal.modal-poster .modal-backdrop {
  background: rgba(8, 10, 14, 0.55);
  backdrop-filter: blur(6px);
}

.modal.modal-poster .modal-card.modal-article {
  width: min(1400px, 96vw);
  height: min(96vh, 1100px);
  max-height: 96vh;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: clamp(12px, 2.5vw, 24px);
  box-shadow: 0 36px 80px rgba(8, 14, 28, 0.35);
  background: radial-gradient(120% 140% at 8% 12%, rgba(255, 255, 255, 0.95), rgba(235, 244, 255, 0.7) 50%, rgba(210, 226, 255, 0.55) 100%);
  backdrop-filter: blur(28px) saturate(1.25);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.modal-poster .modal-close {
  top: 16px;
  right: 16px;
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.modal-close {
  justify-self: end;
  border: 1px solid rgba(12, 18, 32, 0.15);
  background: rgba(255, 255, 255, 0.7);
  color: #111827;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  box-shadow: 0 0 0 4px rgba(178, 140, 255, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-header h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-family: var(--display);
  font-weight: 600;
}


.modal-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(12, 18, 32, 0.1);
  background: rgba(255, 255, 255, 0.6);
}

.modal-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 60vh;
  border: none;
}

.article-page .modal {
  display: none;
}

.article-shell {
  min-height: 100vh;
  padding: clamp(16px, 3vw, 32px);
  display: grid;
  place-items: center;
}

.article-card {
  width: 100%;
  max-height: 94vh;
  overflow: auto;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 24px;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.poster-card {
  width: 100%;
  height: 100%;
  display: none;
  background: transparent;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

.poster-card img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.deck-card {
  width: 100%;
  height: 100%;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: clamp(12px, 2.5vw, 24px);
  box-sizing: border-box;
  background: transparent;
}

.deck-card embed {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.article-header {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.article-kicker {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--soft-ink);
}

.article-header h1 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 3.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.article-meta {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--soft-ink);
}

.article-dek {
  font-size: 1.08rem;
  line-height: 1.6;
  color: rgba(12, 18, 32, 0.82);
}

.article-intro {
  font-size: 1.03rem;
  line-height: 1.75;
  color: rgba(12, 18, 32, 0.88);
}

.article-section {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.article-section h2 {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  letter-spacing: -0.01em;
}

.article-section p {
  font-size: 1.02rem;
  line-height: 1.78;
  color: rgba(12, 18, 32, 0.9);
}

.article-section blockquote {
  border-left: 3px solid rgba(57, 192, 255, 0.6);
  font-style: italic;
  color: rgba(12, 18, 32, 0.75);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 18px 20px;
}

.article-figure {
  display: grid;
  gap: 12px;
}

.article-figure img {
  width: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.article-figure figcaption {
  font-size: 0.85rem;
  color: var(--soft-ink);
}

.article-sources ul {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 0;
}

.article-sources li {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(12, 18, 32, 0.08);
  font-size: 0.95rem;
  line-height: 1.55;
}

.article-card::-webkit-scrollbar {
  width: 10px;
}

.article-card::-webkit-scrollbar-track {
  background: transparent;
}

.article-card::-webkit-scrollbar-thumb {
  background: rgba(12, 18, 32, 0.18);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.poster-card::-webkit-scrollbar {
  width: 10px;
}

.poster-card::-webkit-scrollbar-track {
  background: transparent;
}

.poster-card::-webkit-scrollbar-thumb {
  background: rgba(12, 18, 32, 0.18);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

@media (max-width: 720px) {
  .glass-bar {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .bar-actions {
    display: none;
  }

  .brand {
    align-items: center;
    width: 100%;
    text-align: center;
  }

  .brand-title {
    text-align: center;
  }

  .menu-panel {
    right: auto;
    left: 0;
  }

  .modal-card {
    max-height: 92vh;
  }
}

@media (max-width: 600px) {
  .glass-bar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 10px 12px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-title {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bar-actions {
    margin-left: auto;
    gap: 8px;
  }

  .glass-button {
    height: 34px;
    min-width: auto;
    padding: 0 12px;
    font-size: 0.85rem;
  }

  .desktop {
    padding: 18px 14px 60px;
  }

  .icon-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 16px 12px;
  }

  .icon-card {
    padding: 10px 8px 12px;
  }

  .icon-label {
    font-size: 0.74rem;
    line-height: 1.25;
  }

  .icon-meta {
    font-size: 0.7rem;
  }

  .modal {
    padding: 12px;
  }

  .modal-card.modal-article {
    width: 96vw;
    max-height: 88vh;
    border-radius: 26px;
    padding-top: 48px;
  }

  .modal-close {
    width: 34px;
    height: 34px;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
  }

  .article-card {
    max-height: calc(88vh - 48px);
    padding: 18px 16px 26px;
  }

  .poster-card {
    height: 100%;
  }

  .poster-frame {
    padding: 8px;
  }

  .poster-frame img {
    height: 58vh;
  }

  .article-header {
    gap: 10px;
    margin-bottom: 20px;
  }

  .article-header h1 {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
    line-height: 1.18;
  }

  .article-dek {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .article-meta {
    font-size: 0.78rem;
  }

  .article-intro {
    font-size: 0.96rem;
    line-height: 1.65;
  }

  .article-section {
    margin-top: 22px;
    gap: 12px;
  }

  .article-section h2 {
    font-size: clamp(1.1rem, 4.6vw, 1.5rem);
  }

  .article-section p {
    font-size: 0.96rem;
    line-height: 1.7;
  }
}
