@font-face{
  font-family: "Intro Rust";
  src: url("/assets/fonts/IntroRust.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Display Light";
  src:  url("/assets/fonts/RationalDisplay-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Display Book";
  src: url("/assets/fonts/rationaldisplaybook.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Display Bold";
  src: url("/assets/fonts/RationalDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*{
  font:inherit;
}
html, body{
  font-family: "Display Light", "Display Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  -webkit-text-rendering: optimizeLegibility;
  text-rendering: optimizeLegibility;
}
h1, h2, h3{
  font-family:"Display Light", "Display Book", "Intro Rust", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-text-rendering: optimizeLegibility;
  text-rendering: optimizeLegibility;
}
strong{font-family: "Display bold";}
h1{
  font-size: 80px;
}
html, body { width:100%; }

header, .navbar, .topbar, .site-header { width:100%; }
.site-header.nav-locked{
  opacity: 0;
  pointer-events: none;
  transform: translateY(-120%);
  transition: transform .24s ease, opacity .2s ease;
}
img, iframe, video { max-width:100%; height:auto;}
*, *::before, *::after { box-sizing: border-box; }
:root {
  --color-primary:#bd4102;
  --color-primary-strong: color-mix(in srgb, var(--color-primary) 75%, var(--color-accent-strong));

  --color-secondary:#f3f3f3;
  --color-btn-hover:color-mix(in srgb, var(--color-primary) 75%, var(--color-accent-strong));
  --color-text:#263B46;
  --color-tertiary:#f3f3f3;
  --color-card-bg:#f3f3f3;
  --color-border: #858585;
  --color-border-soft:#d9d9d9;

  --color-accent:         #A3232B;
  --color-accent-strong:  #7D1A22;
  --color-btn:#DF5427;
  --border-radius-lg: 1.25rem;
  --border-radius-md: 0.75rem;
  --radius-interactive: 999px;

  --shadow-sm: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);

  --transition-base: all 0.3s ease;

  --font-tag: "Display Book", "Display Light","Intro Rust", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  --tag-accent:  var(--color-accent);
  --tag-warm:    var(--color-tertiary);
  --tag-primary: var(--color-primary);
  --header-offset: 0px;
}

html, body{
  background: var(--color-secondary);
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

body{
  padding-top: var(--header-offset, 0px);
}

a{ color: var(--color-btn); text-decoration: none; }
a:hover{ color: var(--color-border-soft); text-decoration:none; }


.btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0.5rem;
  padding:12px 16px;
  border-radius: var(--radius-interactive);
  border:1px solid transparent;
  background: transparent;
  font: inherit;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition:background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active{ transform: translateY(0); }
.btn[disabled],
.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}
.btn--small{ padding:10px 12px; font-size:.95rem; }
.btn--block{ width:100%; }
.btn--primary {
  background: var(--color-btn);
  color: var(--color-secondary);
  border:none;
  font-family: "Display Bold";
}
.btn--primary:hover{
  background: color-mix(in srgb, var(--color-btn) 75%, var(--color-accent-strong));
}
.btn--secondary {
  background: var(--color-border-soft);
  color: var(--color-btn);
  border: none;
}
.btn--secondary:hover{
  background: #cfcfcf;
  color:var(--color-btn)
}
.btn--alert {
  background: var(--color-accent);
  color: var(--color-secondary);
}
.btn--alert:hover{
  background: var(--color-accent-strong);
}
.btn .spinner{
  width:16px;
  height:16px;
  border-radius:50%;
  border:2px solid color-mix(in srgb, var(--color-text) 45%, transparent);
  border-top-color: var(--color-text);
  display:none;
  animation: btn-spin .9s linear infinite;
}
.btn.loading .spinner{ display:inline-block; }
.btn.loading .btn__label{ opacity:.7; }
@keyframes btn-spin{ to{ transform: rotate(360deg); } }

.rank-icon{
  width: 50px;
  height: 50px;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}
.rank-icon[hidden]{
  display: none;
}
.rank-icon.lg{ width: 40px; height: 40px; }
.rank-icon.sm{ width: 36px; height: 36px; }
.rank-icon--signature.sm{ width: 40px; height: 40px; }

.card{ background: transparent; border: 0; border-radius: var(--border-radius-md); }
.u-panel{ background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--border-radius-md); box-shadow: var(--shadow-sm); }


input::placeholder,
textarea::placeholder{
  font-family: "Display Light", "Display Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  font-weight: 300;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder{
  font-family: "Display Light", "Display Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  font-weight: 300;
}
input::-moz-placeholder,
textarea::-moz-placeholder{
  font-family: "Display Light", "Display Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  font-weight: 300;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder{
  font-family: "Display Light", "Display Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  font-weight: 300;
}
input::-ms-input-placeholder,
textarea::-ms-input-placeholder{
  font-family: "Display Light", "Display Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  font-weight: 300;
}

.tags{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }

.tags .tag,
.tag,
.tag-pill,
.masonry .tile .overlay .tag {
  --tag-color: #6c7a89; 
  --tag-text:  #fff; 

  font-family: var(--font-tag);
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.2;
  
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;

  color: var(--tag-text);

  background: linear-gradient(
    135deg, 
    color-mix(in srgb, var(--tag-color), rgba(255,255,255,0.55) 35%), 
    color-mix(in srgb, var(--tag-color), rgba(255,255,255,0.1) 85%)
  );

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);

  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none;
}

.masonry .tile .overlay{
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(
    135deg, 
    color-mix(in srgb, var(--tag-color), rgba(255,255,255,0.8) 30%), 
    color-mix(in srgb, var(--tag-color), rgba(255,255,255,0.2) 80%)
  );
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.12), 
    inset 0 4px 12px rgba(255, 255, 255, 0.5),
    inset 0 -3px 6px rgba(0, 0, 0, 0.1);
  border-color: rgba(255,255,255, 0.9);
  filter: brightness(1.05);
}

.tag--accent, .tag--warm, .tag--primary { --tag-color: #6c7a89; }

.tags .tag,
.tag, .tag-pill,
.masonry .tile .overlay .tag{
  font-size: clamp(12px, 1.05vw, 15px);
}

@media (max-width: 640px){
  .tags .tag,
  .tag, .tag-pill,
  .masonry .tile .overlay .tag{
    font-size: 11px;
    padding: 6px 12px;
  }
}

.post-grid .overlay .tags,
.post-grid .meta2 .tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  white-space: normal;
  max-height: 72px;
  overflow: hidden;
  margin-top: 6px;
}

.post-grid .overlay .tag,
.post-grid .meta2 .tag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-tag, inherit);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  --tag-color: #6c7a89;
  color: #fff;

  background: linear-gradient(
    135deg, 
    color-mix(in srgb, var(--tag-color), rgba(255,255,255,0.6) 30%), 
    color-mix(in srgb, var(--tag-color), rgba(255,255,255,0.1) 85%)
  );
  
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.75);
  
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 3px 5px rgba(255, 255, 255, 0.3);
  
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform .2s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow .2s ease, filter .2s ease;
}

.post-grid .overlay .tag:nth-child(n),
.post-grid .meta2 .tag:nth-child(n){ --tag-color: #6c7a89; }


.post-grid .overlay,
.post-grid .overlay,
.post-grid .meta2,
.post-grid .meta2 {
  box-shadow: 0 8px 16px rgba(252, 252, 252, 0.15), inset 0 3px 6px rgba(255,255,255,0.5);
  filter: brightness(1.1);
  border-color: #fff;
}

.snippet-title{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.snippet-type-icon{
  width:18px;
  height:18px;
  flex-shrink:0;
  object-fit:contain;
  vertical-align:middle;
}
