/*
Theme Name: Guru Author
Description: A simple author theme with a customizable sports-journalism front page.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guru-author
*/

:root {
  --bg-frost: #e4edf7;
  --bg-white: #ffffff;
  --ink: #081832;
  --azure: #0c56a3;
  --azure-deep: #0a3d78;
  --ice: #5fc0e0;
  --ice-pale: #d2ebf5;
  --steel: #2c4a68;
  --line: #aec6dd;
  --font-display: "Newsreader", serif;
  --font-body: "Public Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-frost);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.admin-bar { min-height: calc(100vh - 32px); }

main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--bg-white);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 3px;
}

/* Header */
header.site-head {
  background: var(--bg-white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

body.admin-bar header.site-head { top: 32px; }

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 10px;
  line-height: 1;
  min-width: 0;
}

.brand small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--azure-deep);
  letter-spacing: 1.6px;
  padding: 3px 8px;
  background: var(--ice-pale);
  border-radius: 3px;
  position: relative;
  top: -1px;
  white-space: nowrap;
}

nav.main-nav { display: flex; justify-content: flex-end; flex: 1; }

.head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-switch a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--steel);
  padding: 4px 6px;
  border-radius: 3px;
}

.lang-switch a:hover,
.lang-switch .is-current a {
  color: var(--azure-deep);
  background: var(--ice-pale);
}

nav.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav li { flex-shrink: 0; }

nav.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--steel);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

nav.main-nav a:hover,
nav.main-nav .current-menu-item > a,
nav.main-nav .current-menu-ancestor > a,
nav.main-nav .current_page_item > a {
  color: var(--azure-deep);
  border-bottom-color: var(--ice);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 72px;
  overflow: hidden;
  background: var(--ink);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 72% 30%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 24, 50, 0.05) 0%, rgba(8, 24, 50, 0.35) 45%, rgba(6, 18, 38, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 24px 52px;
  max-width: 1120px;
  margin: 0 auto;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ice);
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ice);
  display: inline-block;
  flex-shrink: 0;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.08;
  color: #fff;
  max-width: 14ch;
  overflow-wrap: break-word;
}

.hero p.lede {
  font-size: 17px;
  color: var(--ice-pale);
  max-width: 46ch;
  margin-top: 22px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 3px;
  transition: transform .15s, background .15s;
}

button.btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary { background: var(--azure); color: #fff; }
.btn-primary:hover { background: var(--azure-deep); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; }
.btn-ghost:hover { border-color: var(--ice); }

/* Prediction ticker */
.scoreboard {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  border-bottom: 1px solid var(--azure-deep);
}

.scoreboard-track {
  display: flex;
  width: max-content;
  animation: scoreboard-scroll linear infinite;
  will-change: transform;
}

.scoreboard-group {
  display: flex;
  flex-shrink: 0;
}

.scoreboard::before,
.scoreboard::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  z-index: 1;
  pointer-events: none;
}

.scoreboard::before {
  left: 0;
  background: linear-gradient(to right, var(--ink), transparent);
}

.scoreboard::after {
  right: 0;
  background: linear-gradient(to left, var(--ink), transparent);
}

.scoreboard:hover .scoreboard-track {
  animation-play-state: paused;
}

@keyframes scoreboard-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(var(--scoreboard-shift, 0px) * -1)); }
}

@media (prefers-reduced-motion: reduce) {
  .scoreboard { overflow-x: auto; }

  .scoreboard-track { animation: none; }
}

.score-item {
  font-family: var(--font-mono);
  color: var(--ice-pale);
  font-size: 13px;
  padding: 14px 26px;
  border-right: 1px solid rgba(143, 211, 234, 0.18);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.score-item .tag {
  font-size: 10px;
  color: var(--ice);
  letter-spacing: .5px;
  font-weight: 700;
}

.score-item b {
  color: #fff;
  font-weight: 700;
}

/* Sections */
.section { padding: 72px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 36px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-head h1,
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: 30px;
  color: var(--ink);
}

.section-head p,
.archive-description {
  font-size: 14px;
  color: var(--steel);
  max-width: 36ch;
}

.archive-description { margin: -16px 0 28px; max-width: 62ch; }
.archive-description p + p { margin-top: 0.6em; }

.about {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 56px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 32ch;
  position: relative;
  padding-top: 20px;
}

.about blockquote::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 3px;
  background: var(--azure);
}

.about p.bio {
  font-size: 14.5px;
  color: var(--steel);
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 auto;
}

.about .sig {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--azure);
  letter-spacing: .3px;
}

.article-list { border-top: 1px solid var(--line); }

.article-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.article-row .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--azure);
  letter-spacing: .4px;
  font-weight: 700;
}

.article-row h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
}

.article-row h3 a:hover { color: var(--azure-deep); }

.article-row .date {
  font-size: 12.5px;
  color: var(--steel);
  white-space: nowrap;
}

.empty-note { color: var(--steel); font-size: 15px; }

/* Lists, search, entries */
.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.search-form input[type="search"] {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  background: var(--bg-white);
  padding: 12px 14px;
  font: inherit;
  color: inherit;
  border-radius: 3px;
}

.navigation.pagination { margin-top: 28px; }

.navigation.pagination .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--bg-white);
  font-size: 14px;
}

.navigation.pagination .page-numbers.current {
  background: var(--azure);
  color: #fff;
  border-color: var(--azure);
}

.entry {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 48px 44px 40px;
  max-width: 760px;
  margin: 0 auto;
}

.entry-header {
  position: relative;
  padding-top: 20px;
}

.entry-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--azure);
}

.entry-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--azure);
  margin-bottom: 14px;
}

.entry-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ice);
  flex-shrink: 0;
}

.entry h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
}

.entry-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--steel);
}

.entry-thumb img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 28px;
}

.entry-content {
  margin-top: 28px;
  font-size: 17px;
  line-height: 1.7;
  max-width: 68ch;
}

.entry-content > * + * { margin-top: 1em; }
.entry-content ul,
.entry-content ol { padding-left: 1.2em; }
.entry-content li + li { margin-top: 0.35em; }
.entry-content img { height: auto; border-radius: 6px; }
.entry-content iframe { max-width: 100%; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  margin-top: 1.4em;
}

.entry-content a {
  color: var(--azure-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover { color: var(--azure); }

.entry-content blockquote,
.entry-content .wp-block-quote {
  margin: 1.4em 0;
  padding-left: 16px;
  border-left: 3px solid var(--azure);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
}

.entry-content figcaption,
.entry-content .wp-caption-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--steel);
}

.entry-content hr,
.entry-content .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.6em 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.entry-content th,
.entry-content td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.entry-content th {
  font-size: 12px;
  letter-spacing: .3px;
  color: var(--azure);
}

.entry-content pre,
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.entry-content pre {
  padding: 14px 16px;
  background: var(--bg-frost);
  border-radius: 6px;
  overflow-x: auto;
}

.page-links { margin-top: 1.4em; font-size: 14px; }
.edit-link { margin-top: 22px; font-size: 13px; }
.edit-link a { color: var(--azure); text-decoration: underline; }

.post-navigation {
  max-width: 760px;
  margin: 18px auto 0;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-navigation .nav-links > :only-child { grid-column: 1 / -1; }

.post-navigation a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
}

.post-navigation a:hover .nav-title { color: var(--azure-deep); }

.post-navigation .nav-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--azure);
}

.post-navigation .nav-title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.3;
}

.post-navigation .nav-next { text-align: left; align-items: flex-start; }

.back-home { margin: 22px 0; }

.comments {
  max-width: 760px;
  margin: 36px auto 0;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px 44px;
}

.comments .comment-reply-title,
.comments > h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  margin-bottom: 16px;
}

.comment-list,
.comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 24px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-meta { font-size: 13px; color: var(--steel); margin-bottom: 6px; }
.comment-form { margin-top: 24px; }
.comment-form p { margin-bottom: 12px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-white);
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  border-radius: 3px;
}

.comment-form .submit {
  display: inline-block;
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  border: 0;
  border-radius: 3px;
  background: var(--azure);
  color: #fff;
  cursor: pointer;
}

.comment-form .submit:hover { background: var(--azure-deep); }

/* Footer */
footer {
  background: var(--ink);
  color: var(--ice-pale);
  margin-top: 40px;
}

.foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}

.foot-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: #fff;
}

.foot-brand p {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  color: var(--steel);
  margin-top: 10px;
  max-width: 32ch;
  line-height: 1.6;
}

footer h4 {
  font-size: 12px;
  letter-spacing: .4px;
  color: var(--ice);
  margin-bottom: 14px;
  font-weight: 600;
}

footer ul { list-style: none; }
footer li { margin-bottom: 9px; }
footer a { font-size: 13.5px; color: var(--ice-pale); opacity: .85; }
footer a:hover { opacity: 1; color: var(--ice); }

footer .current-menu-item > a { color: var(--ice); opacity: 1; }

.foot-bottom {
  border-top: 1px solid rgba(143, 211, 234, 0.15);
  padding: 20px 24px;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--steel);
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1180px) {
  nav.main-nav ul { gap: 18px; }
  .head-inner { gap: 16px; }
}

@media (max-width: 1080px) {
  .brand { flex-wrap: wrap; }

  nav.main-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    z-index: 40;
    padding: 12px 24px 24px;
    overflow: auto;
    justify-content: flex-start;
  }

  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 0; }

  nav.main-nav a {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }

  .nav-toggle { display: block; }
}

@media (max-width: 860px) {
  .hero { min-height: 520px; }
  .about { padding: 36px 24px; }
  .about blockquote { font-size: 21px; }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-inner > :first-child { grid-column: 1 / -1; }
  .article-row { grid-template-columns: 1fr; gap: 6px; }
  .entry,
  .comments { padding: 28px 20px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  body.admin-bar { min-height: calc(100vh - 46px); }
  body.admin-bar header.site-head { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
