/* Lazy Tech Geek — site styles. Light/dark via [data-theme] on <html>. */

:root {
  --bg: #ffffff;
  --bg-alt: #dcdcdc;
  --surface: #ffffff;
  --text: #111111;
  --muted: #5c5c5c;
  --border: #1c1c1c;
  --line: #e2e2e2;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .06);
  --accent: #e3191b;      /* the TECH red */
  --green: #1fa31f;       /* the tagline green */
  --btn-bg: #000000;
  --btn-text: #ffffff;
  --chip-bg: #f1f1f1;
  --chip-text: #222;
  --link: #111111;
  --focus: #3b81f6;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --bg-alt: #1e1e1e;
    --surface: #1b1b1b;
    --text: #ececec;
    --muted: #a3a3a3;
    --border: #d0d0d0;
    --line: #2c2c2c;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .35);
    --btn-bg: #f2f2f2;
    --btn-text: #111111;
    --chip-bg: #262626;
    --chip-text: #e6e6e6;
    --link: #f0f0f0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212;
  --bg-alt: #1e1e1e;
  --surface: #1b1b1b;
  --text: #ececec;
  --muted: #a3a3a3;
  --border: #d0d0d0;
  --line: #2c2c2c;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .35);
  --btn-bg: #f2f2f2;
  --btn-text: #111111;
  --chip-bg: #262626;
  --chip-text: #e6e6e6;
  --link: #f0f0f0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Bitter", Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* ---------- Header (the banner) ---------- */
.site-header { background: #000; color: #fff; overflow-x: clip; }
.banner {
  display: block;
  text-decoration: none;
  color: #fff;
  text-align: center;
  padding: 14px 16px 10px;
}
.banner-title {
  display: block;
  font-family: "Ultra", "Rockwell Extra Bold", "Rockwell", serif;
  font-weight: 400;
  line-height: .95;
  letter-spacing: .01em;
  /* Sized from the screen width so the whole title always fits on one line */
  font-size: clamp(22px, calc((100vw - 32px) / 11), 124px);
  white-space: nowrap;
}
.banner-title .tech { color: var(--accent); font-size: 1.12em; }
.banner-tag {
  display: block;
  margin-top: .35em;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--green);
  letter-spacing: .32em;
  font-size: clamp(10px, min(2.9vw, calc((100vw - 32px) / 25.5)), 36px);
  white-space: nowrap;
}
.nav-bar { border-top: 1px solid #222; }
.nav-inner { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; position: relative; }
.nav-inner a {
  color: #fff; text-decoration: none; font-size: 17px; padding: 8px 14px; border-radius: 999px;
}
.nav-inner a:hover { background: #1f1f1f; }
.nav-inner a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.theme-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid #333;
  background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center;
}
.theme-toggle:hover { background: #1f1f1f; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

main { padding: 36px 0 60px; }

/* ---------- Headings ---------- */
.display {
  font-family: "Shrikhand", "Bitter", serif;
  font-weight: 400;
  font-style: italic;
  line-height: 1.15;
  margin: 0 0 .5em;
  font-size: clamp(32px, 5vw, 53px);
}
h2 { font-family: "Shrikhand", "Bitter", serif; font-weight: 400; font-style: italic; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--btn-bg); color: var(--btn-text); border: 0; border-radius: 999px;
  padding: 14px 34px; font: inherit; font-size: 18px; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.15); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-sub { background: #44536a; color: #fff; padding: 9px 22px; font-family: "Century Gothic", "Questrial", sans-serif; font-size: 15px; border-radius: 6px; }
.btn-sub svg { width: 18px; height: 18px; }

.field { display: block; margin: 0 0 22px; }
.field-label { display: block; font-size: 22px; margin-bottom: 8px; }
.field-label small { color: var(--muted); font-size: 18px; margin-left: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-row .field-label { font-size: 18px; }
.input, .textarea {
  width: 100%; font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--border); border-radius: 999px; padding: 16px 22px;
}
.textarea { border-radius: 30px; min-height: 170px; resize: vertical; }

/* ---------- Channel header + video catalogue ---------- */
.channel { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; font-family: "Century Gothic", "Questrial", sans-serif; }
.channel img { width: 76px; height: 76px; border-radius: 50%; }
.channel-name { font-size: 22px; font-weight: 700; margin: 0; }
.channel-stats { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.channel-stats b { color: var(--text); }
.channel .btn-sub { margin-left: auto; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 18px; }
.search {
  flex: 0 1 300px; display: flex; align-items: center; gap: 8px; border: 2px solid var(--line);
  border-radius: 8px; padding: 0 12px; background: var(--surface);
}
.search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; color: var(--text); font: 15px "Century Gothic", "Questrial", sans-serif; padding: 10px 0; width: 100%; }
.sort { display: inline-flex; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.sort button { border: 0; background: transparent; color: var(--muted); font: 600 14px "Century Gothic", "Questrial", sans-serif; padding: 9px 14px; cursor: pointer; }
.sort button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 14px; scrollbar-width: thin; }
.chip {
  flex: none; border: 0; border-radius: 999px; padding: 8px 15px; background: var(--chip-bg); color: var(--chip-text);
  font: 600 14px "Century Gothic", "Questrial", sans-serif; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; overflow: hidden;
  box-shadow: var(--card-shadow); text-decoration: none; color: var(--text); cursor: pointer; border: 0; padding: 0; text-align: left; font: inherit;
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .78); color: #fff; font: 600 12px "Century Gothic", "Questrial", sans-serif; padding: 2px 6px; border-radius: 4px; }
.play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.card:hover .play { opacity: 1; }
.play span { width: 64px; height: 44px; background: rgba(220, 0, 0, .9); border-radius: 12px; display: grid; place-items: center; }
.play svg { width: 22px; height: 22px; color: #fff; }
.card-body { padding: 14px 16px 16px; }
.card-title { font: 700 16.5px/1.45 "Century Gothic", "Questrial", sans-serif; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font: 13px "Century Gothic", "Questrial", sans-serif; margin-top: 6px; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }
.more { display: flex; justify-content: center; margin-top: 28px; }

/* Video player pop-up */
.player { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .85); display: none; align-items: center; justify-content: center; padding: 20px; }
.player.open { display: flex; }
.player-box { width: min(1000px, 100%); }
.player-frame { aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #fff; margin-top: 10px; font-family: "Century Gothic", "Questrial", sans-serif; }
.player-bar a { color: #fff; }
.player-close { background: #fff; color: #000; border: 0; border-radius: 999px; padding: 8px 16px; font: 600 14px "Century Gothic", "Questrial", sans-serif; cursor: pointer; }

/* ---------- Articles ---------- */
.article-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px 26px; }
.article-card { text-decoration: none; color: var(--text); display: block; }
.article-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; background: var(--bg-alt); }
.article-date { color: var(--muted); font-size: 14px; margin: 12px 0 4px; }
.article-card h2 { font-size: 22px; margin: 0 0 10px; }
.read-more { text-decoration: underline; text-underline-offset: 4px; }

.post-date { color: var(--muted); font-size: 15px; }
.post-body { font-size: 19px; }
.post-body h2 { margin: 1.4em 0 .5em; }
.post-body p { margin: 0 0 1em; }
.post-body li p { margin: 0 0 .4em; }
.post-body figure { margin: 1.5em 0; }
.post-body img { border-radius: 8px; }
.post-body a { overflow-wrap: anywhere; }
.post-video { aspect-ratio: 16 / 9; margin: 0 0 28px; border-radius: 10px; overflow: hidden; background: #000; }
.post-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.back { display: inline-block; margin-top: 30px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; align-items: start; }
.about-photo { width: min(320px, 100%); aspect-ratio: 1; border-radius: 50%; object-fit: cover; justify-self: center; }
.about p { font-size: 22px; line-height: 1.6; }
.contact { background: var(--bg-alt); padding: 60px 0; margin-top: 50px; }
.contact-intro { font-size: 21px; }
.form-note { margin-top: 14px; font-size: 17px; }
.form-note.ok { color: var(--green); }
.form-note.err { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { padding: 60px 0 70px; text-align: center; }
.footer-nav { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; font-size: clamp(22px, 3.2vw, 34px); }
.footer-nav a { color: var(--text); text-underline-offset: 6px; }
.socials { display: flex; justify-content: center; gap: 30px; margin-top: 28px; }
.socials a { color: var(--text); }
.socials svg { width: 38px; height: 38px; display: block; }
.copyright { color: var(--muted); font-size: 14px; margin-top: 28px; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  main { padding: 24px 0 40px; }
  .wrap { padding: 0 16px; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { order: -1; width: 220px; }
  .about p { font-size: 19px; }
  .field-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .channel { gap: 12px; }
  .channel img { width: 56px; height: 56px; }
  .channel-name { font-size: 19px; }
  .channel-stats { font-size: 12.5px; }
  .channel .btn-sub { margin-left: 0; }
  .search { flex: 1 1 100%; }
  .theme-toggle { right: 4px; }
  .nav-inner { justify-content: flex-start; padding-right: 44px; overflow-x: auto; }
  .nav-inner a { padding: 8px 10px; font-size: 16px; }
}
