/* =========================================================
   ČechŠmejd — HYBRID stylesheet

   Original aesthetic for site-wide shell & landing pages.
   Retro Unix terminal theme scoped to .tech-zone.
   ========================================================= */

/* =========================================================
   COLOUR TOKENS — edit these to retheme
   ========================================================= */

:root {

  /* ── Main site palette (landing, info, contact) ── */
  --prpl-dark:      #421e82;
  --prpl-mid:       #8c56c8;
  --blue-dark:      #456aba;
  --blue-mid:       #7ec5e7;
  --cream:          #ede7e7;
  --text-light:     #eae6e7;
  --text-dark:      #312e01;
  --brand:          #60a5fa;

  --surface:        rgba(255, 255, 255, .62);
  --surface-strong: rgba(255, 255, 255, .82);
  --line-soft:      rgba(66, 30, 130, .14);
  --shadow-soft:    0 18px 45px rgba(32, 42, 75, .14);
  --shadow-hover:   0 24px 60px rgba(32, 42, 75, .22);
  --radius-lg:      1.35rem;
  --radius-xl:      1.8rem;

  /* ── Tech-zone palette (retro terminal pages) ──────────
     Change ONLY these to retheme the entire tech section.
     Every tech-zone rule references these vars.            */

--t-accent:       #ffb833;   /* primary — headings, brand, links              */
--t-accent-mid:   #d49520;   /* medium — active nav, pills, kickers           */
--t-accent-dim:   #7a5a18;   /* dim — secondary text, decorations             */
--t-accent-faint: #2e2008;   /* faintest — box-drawing chars, subtle borders  */
--t-text:         #ffe299;   /* body text                                     */
--t-text-muted:   #deba6a;   /* subdued text, descriptions                    */
--t-text-quiet:   #8a7035;   /* meta, dates, nav links                        */
--t-bg:           #020201;   /* page background                               */
--t-bg-raised:    #070604;   /* cards, panels, hero                           */
--t-bg-hover:     #0c0a06;   /* card hover state                              */
--t-border:       #1a1508;   /* primary border                                */
--t-border-dim:   #141005;   /* quieter border                                */
--t-highlight:    #ffd060;   /* hover highlight for links                     */
--t-em:           #54ba54;   /* italic / emphasis accent (green counterpoint) */

  /* ── Shared ── */
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code",
               "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}


/* =========================================================
   RESET
   ========================================================= */

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background:
    radial-gradient(circle at 18% 10%, rgba(140, 86, 200, .20), transparent 28rem),
    radial-gradient(circle at 78% 24%, rgba(126, 197, 231, .45), transparent 32rem),
    linear-gradient(180deg, #f4f0ed 0%, #d6e8ef 42%, #87cbe2 100%);
}

img, svg { max-width: 100%; }

.container {
  width: calc(100% - 2rem);
  max-width: 1200px;
  margin-inline: auto;
}


/* =========================================================
   HEADER — original style
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(69, 106, 186, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
}

.brand {
  color: var(--text-light);
  font-size: 1.5rem;
  font-weight: 550;
  font-variant: small-caps;
  text-decoration: none;
  letter-spacing: .02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav > li > a,
.dropdown-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .42rem .65rem;
  border: 0;
  border-radius: .55rem;
  color: var(--text-light);
  background: transparent;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}

.nav > li > a:hover,
.dropdown-trigger:hover {
  background: rgba(255, 255, 255, .10);
}

.nav a.active,
.nav.segmented a.active,
.nav.segmented .dropdown-trigger.active,
.nav.segmented .dropdown-trigger:focus-within {
  color: var(--text-light);
  background: linear-gradient(180deg, rgba(50, 31, 107, .20), rgba(50, 31, 107, .08));
  box-shadow: inset 0 2px 8px rgba(50, 31, 107, .28),
              inset 0 1px 0 rgba(203, 243, 255, .12);
}

.nav.segmented > li + li > a::before,
.nav.segmented > li + li > .dropdown-trigger::before {
  content: "";
  position: absolute;
  left: -.175rem;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: rgba(255, 255, 255, .12);
}

.dropdown { position: relative; }

.dropdown .chev {
  transition: transform .2s ease;
  transform-origin: 50% 50%;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  min-width: 12rem;
  margin: 0;
  padding: .35rem;
  list-style: none;
  background: var(--prpl-dark);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: .65rem;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .30);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease .18s, transform .15s ease .18s, visibility .10s linear .18s;
}

.dropdown-menu li a {
  display: block;
  padding: .55rem .65rem;
  border-radius: .45rem;
  color: var(--text-light);
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, .10);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.dropdown:hover .chev,
.dropdown:focus-within .chev,
.dropdown.open .chev {
  transform: rotate(180deg);
}


/* =========================================================
   LANDING / DEFAULT — typography & hero
   ========================================================= */

main.container { padding: 2.5rem 0 4rem; }
main.container.page-shell { padding-top: 3.25rem; padding-bottom: 5rem; }

h1, h2, h3 { line-height: 1.12; }

h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.045em;
}

a { color: var(--blue-dark); }

.landing-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .42)),
    linear-gradient(135deg, rgba(126, 197, 231, .22), rgba(140, 86, 200, .12));
  box-shadow: var(--shadow-soft);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -42% 34%;
  height: 240px;
  border-radius: 999px;
  background: rgba(69, 106, 186, .18);
  filter: blur(12px);
  transform: rotate(-8deg);
}

.landing-hero > * { position: relative; z-index: 1; }

.landing-hero__kicker {
  margin: 0 0 .75rem;
  color: var(--blue-dark);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.landing-hero__lead {
  max-width: 660px;
  margin: 1.35rem 0 0;
  color: rgba(49, 46, 1, .82);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}


/* =========================================================
   FOOTER — original style
   ========================================================= */

.site-footer {
  margin-top: auto;
  padding: 1.5rem 0;
  color: var(--text-light);
  background: var(--blue-dark);
  border-top: 1px solid rgba(255, 255, 255, .10);
}

.site-footer p { margin: 0; }


/* =========================================================
   =========================================================
   TECH-ZONE — retro Unix terminal

   All colours use --t-* vars from :root.
   To retheme: change the variables, not the rules.
   =========================================================
   ========================================================= */

@keyframes blink-cursor {
  0%, 54% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

/* ── Page background ── */
body:has(.tech-zone) { background: var(--t-bg); }

/* ── Header overrides ── */
body:has(.tech-zone) .site-header {
  background: var(--t-bg);
  border-bottom: 1px solid var(--t-border);
  box-shadow: none;
  backdrop-filter: none;
}

body:has(.tech-zone) .brand {
  font-family: var(--font-mono);
  font-variant: normal;
  text-transform: none;
  letter-spacing: .06em;
  color: var(--t-accent);
}

body:has(.tech-zone) .brand::before {
  content: "~ ";
  color: var(--t-accent-dim);
}

body:has(.tech-zone) .brand::after {
  content: "▎";
  margin-left: .15em;
  color: var(--t-accent);
  animation: blink-cursor .9s step-end infinite;
}

body:has(.tech-zone) .nav > li > a,
body:has(.tech-zone) .dropdown-trigger {
  border-radius: 0;
  color: var(--t-text-quiet);
  font-family: var(--font-mono);
  font-size: .82rem;
  text-transform: none;
  letter-spacing: .03em;
  border: 1px solid transparent;
  transition: color .1s, border-color .1s;
}

body:has(.tech-zone) .nav > li > a:hover,
body:has(.tech-zone) .dropdown-trigger:hover {
  color: var(--t-accent);
  background: rgba(200, 150, 40, .04);
  border-color: var(--t-border);
}

body:has(.tech-zone) .nav a.active,
body:has(.tech-zone) .nav.segmented a.active,
body:has(.tech-zone) .nav.segmented .dropdown-trigger.active {
  color: var(--t-bg);
  background: var(--t-accent-mid);
  border-color: var(--t-accent-mid);
  box-shadow: none;
  font-weight: 700;
}

body:has(.tech-zone) .nav.segmented > li + li > a::before,
body:has(.tech-zone) .nav.segmented > li + li > .dropdown-trigger::before {
  background: var(--t-border);
}

body:has(.tech-zone) .dropdown-menu {
  background: var(--t-bg);
  border: 1px solid var(--t-border);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

body:has(.tech-zone) .dropdown-menu li a {
  color: var(--t-text-quiet);
  border-radius: 0;
  border-bottom: 1px solid var(--t-border-dim);
  font-family: var(--font-mono);
  font-size: .82rem;
}

body:has(.tech-zone) .dropdown-menu li:last-child a { border-bottom: none; }

body:has(.tech-zone) .dropdown-menu li a:hover {
  color: var(--t-accent);
  background: rgba(200, 150, 40, .05);
}

body:has(.tech-zone) .dropdown-menu li a::before {
  content: "› ";
  color: var(--t-accent-faint);
}

/* ── Footer overrides ── */
body:has(.tech-zone) .site-footer {
  background: var(--t-bg);
  border-top: 1px solid var(--t-border);
  color: var(--t-accent-dim);
  font-family: var(--font-mono);
  font-size: .78rem;
}

/* ── Base zone ── */
.tech-zone {
  position: relative;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  color: var(--t-text);
}

.tech-zone ::selection {
  background: var(--t-accent-mid);
  color: var(--t-bg);
}

.tech-zone a       { color: var(--t-accent); }
.tech-zone a:hover { color: var(--t-highlight); }

/* ── Typography ── */
.tech-zone h1,
.tech-zone h2,
.tech-zone h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--t-accent);
}

.tech-zone h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  letter-spacing: .06em;
}

/* ── Breadcrumb ── */
.tech-zone .breadcrumb {
  max-width: 760px;
  margin: 0 auto 1rem;
  color: var(--t-text-quiet);
  font-size: .82rem;
}

.tech-zone .breadcrumb a       { color: var(--t-accent); text-decoration: none; }
.tech-zone .breadcrumb a:hover { text-decoration: underline; }

/* ── Hero ── */
.tech-zone .tech-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  min-height: 260px;
  margin-bottom: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--t-border);
  border-radius: 0;
  background: var(--t-bg-raised);
}

.tech-zone .tech-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(200, 150, 40, .04) .5px, transparent .5px);
  background-size: 14px 14px;
  pointer-events: none;
  filter: none;
  transform: none;
  height: auto;
}

.tech-zone .tech-hero::after {
  content: "┐";
  position: absolute;
  top: .4rem;
  right: .6rem;
  color: var(--t-accent-faint);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
}

.tech-zone .tech-hero__content { position: relative; z-index: 1; }

.tech-zone .eyebrow,
.tech-zone .blog-entry__kicker,
.tech-zone .post-card__kicker {
  margin: 0 0 .5rem;
  color: var(--t-accent-mid);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.tech-zone .eyebrow::before,
.tech-zone .blog-entry__kicker::before,
.tech-zone .post-card__kicker::before {
  content: "# ";
  color: var(--t-accent-faint);
}

.tech-zone .eyebrow::after,
.tech-zone .blog-entry__kicker::after,
.tech-zone .post-card__kicker::after {
  content: none;
}

.tech-zone .tech-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: .95;
  color: var(--t-accent);
  text-shadow: 0 0 20px rgba(200, 150, 40, .1);
}

.tech-zone .tech-hero__lead {
  max-width: 600px;
  margin: 1rem 0 0;
  color: var(--t-text-muted);
  font-size: clamp(.88rem, 1.4vw, 1rem);
  line-height: 1.8;
}

.tech-zone .tech-hero__mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(5rem, 12vw, 8rem);
  aspect-ratio: 1;
  border: 1px solid var(--t-accent-faint);
  border-radius: 0;
  color: var(--t-accent-mid);
  background: var(--t-bg);
  box-shadow: inset 0 0 30px rgba(200, 150, 40, .03);
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}

/* ── Section headings ── */
.tech-zone .section-heading { margin: 2.5rem 0 .75rem; }

.tech-zone .section-heading h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--t-accent);
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--t-border-dim);
}

.tech-zone .section-heading h2::before {
  content: "├── ";
  color: var(--t-accent-faint);
  font-weight: 400;
}

/* ── Post grid & cards ── */
.tech-zone .post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 0;
}

.tech-zone .post-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 1.35rem;
  border: 1px solid var(--t-border-dim);
  border-radius: 0;
  background: var(--t-bg-raised);
  transition: border-color .1s, background .1s;
}

.tech-zone .post-card::before {
  content: "┌";
  position: absolute;
  top: .25rem;
  left: .4rem;
  color: var(--t-border);
  font-family: var(--font-mono);
  font-size: .7rem;
  pointer-events: none;
}

.tech-zone .post-card::after {
  content: "┘";
  position: absolute;
  right: .4rem;
  bottom: .25rem;
  color: var(--t-border);
  font-family: var(--font-mono);
  font-size: .7rem;
  background: none;
  border: none;
  width: auto;
  height: auto;
  transition: color .1s;
}

.tech-zone .post-card:hover {
  transform: none;
  border-color: var(--t-accent-faint);
  background: var(--t-bg-hover);
}

.tech-zone .post-card:hover::before,
.tech-zone .post-card:hover::after {
  color: var(--t-accent-dim);
}

.tech-zone .post-card__click { position: absolute; inset: 0; z-index: 5; }

.tech-zone .post-card__topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.tech-zone .pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .18rem .45rem;
  border: 1px solid var(--t-border);
  border-radius: 0;
  color: var(--t-accent-mid);
  background: rgba(200, 150, 40, .04);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.tech-zone .post-card__date {
  color: var(--t-text-quiet);
  font-size: .78rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.tech-zone .post-card__date::before { content: "["; color: var(--t-accent-faint); }
.tech-zone .post-card__date::after  { content: "]"; color: var(--t-accent-faint); }

.tech-zone .post-card h2,
.tech-zone .post-card h3 {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0;
  color: var(--t-accent);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: .02em;
}

.tech-zone .post-card h2 a,
.tech-zone .post-card h3 a { color: inherit; text-decoration: none; }

.tech-zone .post-card p {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: .75rem 0 1rem;
  color: var(--t-text-muted);
  font-size: .88rem;
  line-height: 1.75;
}

.tech-zone .post-card__link,
.tech-zone .post-card__cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--t-accent);
  font-weight: 600;
  font-size: .82rem;
  text-decoration: none;
  letter-spacing: .03em;
}

.tech-zone .post-card__link::before,
.tech-zone .post-card__cta::before {
  content: "→ ";
  color: var(--t-accent-dim);
}

.tech-zone .post-card__link:hover,
.tech-zone .post-card__cta:hover {
  color: var(--t-highlight);
  text-decoration: underline;
}

/* ── Blog article ── */
.tech-zone .blog-entry {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--t-border-dim);
  border-radius: 0;
  background: var(--t-bg-raised);
}

.tech-zone .blog-entry__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--t-border-dim);
}

.tech-zone .blog-entry__header::before { content: none; }

.tech-zone .blog-entry__meta {
  margin: -.25rem 0 1rem;
  color: var(--t-text-quiet);
  font-size: .82rem;
}

.tech-zone .blog-entry__lead {
  color: var(--t-text);
  font-size: 1rem;
  line-height: 1.8;
}

.tech-zone .blog-entry p {
  margin: 1.05rem 0;
  color: var(--t-text-muted);
}

.tech-zone .blog-entry em {
  font-style: italic;
  color: var(--t-em);
}

.tech-zone .blog-entry strong {
  font-weight: 700;
  color: var(--t-accent);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav { flex-wrap: wrap; }

  main.container,
  main.container.page-shell { padding-top: 1.5rem; }

  .tech-hero,
  .tech-zone .tech-hero {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .tech-hero__mark,
  .tech-zone .tech-hero__mark { display: none; }

  .blog-entry,
  .landing-hero { border-radius: 1rem; }

  .tech-zone .blog-entry,
  .tech-zone .tech-hero,
  .tech-zone .post-card { border-radius: 0; }
}
