/* =============================================
   STATIC BLOG — UNO GHOST THEME (CSS3 Port)
   Zero dependency — no frameworks, no plugins
   ============================================= */

/* -----------------------------------------------
   1. GOOGLE FONTS (Raleway + Roboto Slab)
   Loaded via <link> in index.html — importing
   here as a fallback for direct stylesheet use.
----------------------------------------------- */
/* @import url("https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&family=Roboto+Slab:wght@300;400&display=swap"); */

/* -----------------------------------------------
   1b. FOUNDATION ICONS FONT
   Font files live in the uno-master folder so
   the path is relative to style.css location.
----------------------------------------------- */
@font-face {
  font-family: "foundation-icons";
  src: url("../assets/fonts/foundation-icons/foundation-icons.eot");
  src: url("../assets/fonts/foundation-icons/foundation-icons.eot?#iefix") format("embedded-opentype"),
       url("../assets/fonts/foundation-icons/foundation-icons.woff") format("woff"),
       url("../assets/fonts/foundation-icons/foundation-icons.ttf") format("truetype"),
       url("../assets/fonts/foundation-icons/foundation-icons.svg#fontcustom") format("svg");
  font-weight: normal;
  font-style: normal;
}

/* Circular icon buttons used in the sidebar nav */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  color: #fff;
  opacity: .8;
  text-decoration: none;
  transition: opacity .2s ease, border-color .2s ease, background .2s ease;
}
.icon-btn:hover {
  opacity: 1;
  border-color: #fff;
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.icon-btn::before {
  font-family: "foundation-icons";
  font-style: normal;
  font-weight: normal;
  font-size: 25px;
  line-height: 1;
  speak: none;
  -webkit-font-smoothing: antialiased;
}

.icon-btn--github::before { content: "\f1c9"; }
.icon-btn--mail::before   { content: "\f16d"; }

/* -----------------------------------------------
   2. CSS CUSTOM PROPERTIES (from variables.scss)
----------------------------------------------- */
:root {
  /* Grey scale */
  --gray-lightest:  #F8F8F8;
  --gray-lighter:   #EEEEEE;
  --gray-light:     #DDDDDD;
  --gray:           #CCCCCC;
  --gray-dark:      #999999;
  --gray-darker:    #666666;
  --gray-darkest:   #333333;

  /* Brand colours */
  --red:            #E25440;
  --red-hover:      #B9301C;
  --secondary:      #5BA4E5;
  --secondary-light:#C3DAEF;
  --secondary-bg:   #EAF3FB;
  --green:          #156F78;
  --mobile-menu-bg: #0E4B52; /* darken(green, 10%) */

  /* Semantic aliases */
  --primary-color:  var(--red);
  --hover-color:    var(--red-hover);
  --link-color:     var(--red);

  /* Fonts */
  --sans:  'Raleway', sans-serif;
  --serif: 'Roboto Slab', serif;

  /* Misc */
  --border-radius:  3px;
}

/* -----------------------------------------------
   3. CSS RESET (Meyer reset v2.0)
----------------------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section { display: block; }
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after { content: ''; content: none; }
table { border-collapse: collapse; border-spacing: 0; }

/* -----------------------------------------------
   4. BASE & BOX MODEL
----------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 1em;
  color: var(--gray-darker);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Clearfix */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* -----------------------------------------------
   5. TYPOGRAPHY
----------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--gray-darkest);
  font-weight: 400;
  line-height: 1.2em;
}

h1 { font-size: 3.2em; line-height: 1.2em; letter-spacing: .05em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }
h4 { font-size: 1.4em; }
h5 { font-size: 1em; }
h6 { font-size: .9em; }

p {
  margin-bottom: 1.3em;
  line-height: 1.7em;
}

strong, b { font-weight: bold; }
em, i { font-style: italic; }

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover {
  color: var(--hover-color);
}

blockquote {
  background: var(--gray-lightest);
  border: 1px solid var(--gray-lighter);
  border-left: 4px solid var(--gray-light);
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  font-size: .95em;
  line-height: 1.7em;
}

code {
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-light);
  border-radius: var(--border-radius);
  font-family: Consolas, Menlo, Monaco, 'Lucida Console', monospace;
  font-size: .85em;
  padding: 2px 5px;
}

pre {
  background: var(--gray-lightest);
  border: 1px solid var(--gray-lighter);
  border-radius: var(--border-radius);
  overflow-x: auto;
  padding: 1.2em 1.5em;
  margin-bottom: 1.3em;
  line-height: 1.6em;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: .9em;
}

ol, ul {
  padding-left: 1.8em;
  margin-bottom: 1.3em;
  line-height: 1.7em;
}
ol { list-style-type: decimal; }
ul { list-style-type: disc; }
li { margin-bottom: .4em; }

hr {
  display: block;
  border: none;
  border-top: 1px solid var(--gray-light);
  height: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* Utility */
.hidden { display: none !important; }

/* -----------------------------------------------
   6. LAYOUT
----------------------------------------------- */

/* Main content wrapper sits to the right of the fixed sidebar */
.content-wrapper {
  position: relative;
  z-index: 800;
  width: 60%;
  max-width: 800px;
  margin-left: 40%;
  min-height: 100vh;
  opacity: 1;
  transform: translateX(0);
  /* Fade + slide in — starts 280ms after panel begins moving */
  transition: opacity  500ms ease 280ms,
              transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 280ms;
}

/* On the home screen the content is hidden and pushed right */
body.home-template .content-wrapper {
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  /* Quick retreat — no delay so it disappears before panel expands */
  transition: opacity  220ms ease,
              transform 220ms ease;
}

.content-wrapper__inner {
  margin: 0 10%;
  padding: 50px 0;
}

/* -----------------------------------------------
   7. SIDEBAR / COVER PANEL  (from _panels.scss)
----------------------------------------------- */

.panel-cover {
  display: block;
  position: fixed;
  z-index: 900;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  /* Default cover image (from uno-master); JS overrides with settings.cover when present */
  background-color: var(--gray-darkest);
  background-image: url('../assets/images/background-cover.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  /*
   * max-width: 100vw (not 'none') — CSS cannot interpolate from the keyword
   * 'none' to a pixel value, so it would snap. 100vw is always at least as
   * wide as the viewport, giving the same unconstrained behaviour while
   * allowing a smooth transition.
   *
   * Easing: slow start, fast middle, slow end — cinematic panel sweep.
   */
  max-width: 100vw;
  transition: width     700ms cubic-bezier(0.77, 0, 0.175, 1),
              max-width 700ms cubic-bezier(0.77, 0, 0.175, 1);
}

/* Collapsed state (sidebar mode) — added by JS on navigation */
.panel-cover--collapsed {
  width: 40%;
  max-width: 530px;
}

/* Gradient overlay sits on top of the cover image */
.panel-cover--overlay {
  display: block;
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(140deg, rgba(68, 68, 68, .2) 20%, rgba(0, 0, 0, .2));
}

/* Table-layout vertically centers inner content */
.panel-main {
  display: table;
  width: 100%;
  height: 100%;
}

.panel-main__inner {
  display: table-cell;
  vertical-align: middle;
  position: relative;
  z-index: 800;
  padding: 0 60px;
}

.panel-main__content {
  max-width: 620px;
  margin: 0 auto;
}

/* No-JS fallback: sidebar is always narrow */
.no-js .panel-main {
  width: 40%;
  max-width: 530px;
}

/* Inverted (white text on dark image) */
.panel-inverted {
  font-weight: 100;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .4);
}
.panel-inverted a {
  color: #fff;
}

/* Blog title in sidebar */
.panel-cover__title.panel-title {
  margin: 0 0 5px 0;
  font-size: 2.5em;
  letter-spacing: 4px;
  color: #fff;
}
.panel-cover__title.panel-title a {
  color: #fff;
}

/* Description under title */
.panel-cover__description {
  font-family: var(--serif);
  font-size: 1.2em;
  font-weight: 500;
  letter-spacing: 3px;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  margin: 0 30px;
}

/* Dividers between sidebar sections */
.panel-cover__divider {
  width: 50%;
  margin: 20px auto;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.panel-cover__divider--secondary {
  width: 15%;
}

/* Logo in sidebar */
.panel-cover__logo.logo {
  display: block;
  margin: 0 auto .2em auto;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, .3);
}

.logo-link {
  display: inline-block;
}

/* -----------------------------------------------
   8. NAVIGATION (from _navigation.scss)
----------------------------------------------- */
.navigation-wrapper {
  display: inline-block;
  position: relative;
}

nav {
  display: inline-block;
  position: relative;
}

.navigation {
  /* Flex so all items — text pill + icon circles — align on the same axis */
  display: inline-flex;
  align-items: center;
  float: left;
  position: relative;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style-type: none;
}

.navigation__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

/* Generic nav link styles — does NOT apply to .icon-btn (circular icons) */
.navigation__item a:not(.icon-btn) {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 8px 18px;
  border: 1px solid #fff;
  border-radius: 28px;
  font-size: .9em;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
  opacity: .8;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  transition: opacity .15s ease, border-color .15s ease;
}
.navigation__item a:not(.icon-btn):hover {
  color: #fff;
  border-color: #fff;
  opacity: 1;
}

/* Ensure .icon-btn always uses its own display/size — highest wins */
.navigation__item a.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

.cover-navigation {
  margin-top: 10px;
}

.cover-navigation--social {
  margin-left: 30px;
}

.navigation--social .navigation__item a {
  padding: 8px 10px;
  font-size: .85em;
}

/* -----------------------------------------------
   9. BUTTONS (from _buttons.scss)
----------------------------------------------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  font-size: .9em;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: none;
  color: var(--primary-color);
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn:hover {
  color: var(--hover-color);
  border-color: var(--hover-color);
}

.btn-secondary {
  border-color: var(--secondary);
  color: var(--secondary);
}
.btn-secondary:hover {
  color: #3d7ec4;
  border-color: #3d7ec4;
}

.btn-tertiary {
  border-color: var(--gray-dark);
  color: var(--gray-dark);
}
.btn-tertiary:hover {
  color: #7a7a7a;
  border-color: #7a7a7a;
}

.btn-large {
  padding: 10px 24px;
  font-size: 1.1em;
}

.btn-small {
  padding: 8px 12px;
  font-size: .7em;
}

/* -----------------------------------------------
   10. MOBILE MENU BUTTON (from _buttons.scss)
----------------------------------------------- */
.btn-mobile-menu {
  display: none; /* Hidden by default; shown at ≤960px */
  position: fixed;
  z-index: 9999;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 42px;
  background: rgba(14, 75, 82, .98);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
  cursor: pointer;
}

.hamburger-icon,
.close-icon {
  display: inline-block;
  position: relative;
  top: -1px;
  font-size: 26px;
  line-height: 42px;
  color: #fff;
}

/* -----------------------------------------------
   11. POST LIST  (from _post-list.scss)
----------------------------------------------- */
.main-post-list {
  text-align: left;
}

.post-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
  text-align: left;
}

.post-list li {
  margin: 0 0 2.2em 0;
}

.post-list li:last-child .post-list__divider {
  display: none;
}

.post-list__post-title {
  margin-top: 0;
  margin-bottom: .2em;
  font-size: 1.5em;
  line-height: 1.3em;
}

.post-list__post-title a {
  color: var(--gray-darkest);
  transition: color .15s ease;
}
.post-list__post-title a:hover {
  color: var(--hover-color);
}

.excerpt {
  margin-top: .5em;
  color: var(--gray-dark);
  line-height: 1.6em;
}

.post-list__meta {
  display: block;
  margin: .7em 0 0 0;
  font-size: .9em;
  color: var(--gray);
}

.post-list__meta--date {
  margin-right: .5em;
  color:  #a4a3a3;
}

.post-list__meta--tags {
  margin-left: .5em;
}

.post-list__meta--tags a {
  color: #333333;
}
.post-list__meta--tags a:hover {
  color: var(--hover-color);
}

.post-list__divider {
  width: 30%;
  margin: 2.2em 0 2.1em 0;
  border-top: 1px solid var(--gray-light);
}

/* -----------------------------------------------
   12. SINGLE POST  (from _post.scss)
----------------------------------------------- */
.post-container--single {
  text-align: left;
}

.post-header {
  margin-bottom: 1.5em;
}

.post-title {
  margin-top: .2em;
  margin-bottom: .2em;
}

.post-meta {
  margin: 0 0 .4em 0;
  font-size: .9em;
  color: var(--gray);
}

.post-meta__date {
  margin-right: .5em;
  color: var(--gray);
}

.post-meta__tags {
  margin-left: .4em;
}

.post-meta__tags a {
  color: var(--gray);
  text-decoration: underline;
}
.post-meta__tags a:hover {
  color: var(--hover-color);
}

/* Post body content area */
.post {
  line-height: 1.7em;
}

.post img {
  max-width: 100%;
  height: auto;
  margin: 1em auto;
  display: block;
  border-radius: var(--border-radius);
}

.post pre {
  width: 95%;
}

.post hr {
  display: block;
  width: 30%;
  margin: 2em 0;
  border-top: 1px solid var(--gray-light);
}

.post h1, .post h2, .post h3,
.post h4, .post h5, .post h6 {
  margin-top: 1.5em;
  margin-bottom: .5em;
}

.post p { margin-bottom: 1.3em; }
.post ul, .post ol { margin-bottom: 1.3em; }

/* Tag archive heading */
.archive-title {
  font-size: 2em;
  margin-bottom: .2em;
  color: var(--gray-darkest);
}

.section-title__divider {
  width: 30%;
  margin: 1em 0 2em 0;
  border-top: 1px solid var(--gray-light);
}

/* -----------------------------------------------
   13. PAGINATION
----------------------------------------------- */
.post-list__divider--pagination {
  width: 100%;
  margin: 2em 0;
  border-top: 1px solid var(--gray-light);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5em;
  padding: 1em 0;
}

.pagination__page-number {
  font-size: .85em;
  color: var(--gray-dark);
  flex: 1;
  text-align: center;
}

/* -----------------------------------------------
   14. FOOTER
----------------------------------------------- */
.footer {
  margin-top: 60px;
  padding: 30px 0;
  border-top: 2px solid var(--gray-light);
  text-align: center;
  font-size: .9em;
  color: var(--gray-darker);
  line-height: 1.8em;
}

.footer .footer__copyright {
  display: block;
}

.footer a {
  color: var(--gray-darker);
  border-bottom: 1px solid var(--gray-light);
}
.footer a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* -----------------------------------------------
   15. LOADING & ERROR STATES
----------------------------------------------- */
.loading-state,
.error-state {
  padding: 4em 0;
  text-align: center;
  color: var(--gray-dark);
  font-size: 1.1em;
  line-height: 1.7em;
}

.error-state h2 {
  font-size: 1.6em;
  margin-bottom: .5em;
  color: var(--gray-darkest);
}

.error-state code {
  font-size: .9em;
}

.not-found-code {
  display: block;
  font-size: 5em;
  font-family: var(--serif);
  color: var(--gray-light);
  margin-bottom: .2em;
}

/* -----------------------------------------------
   16. ANIMATIONS (replaces animate.css subset)
----------------------------------------------- */
@keyframes slideInRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bounceInDown {
  0%   { transform: translateY(-20px); opacity: 0; }
  60%  { transform: translateY(6px);   opacity: 1; }
  80%  { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.animated.slideInRight {
  animation: slideInRight 400ms ease both;
}

.animated.bounceInDown {
  animation: bounceInDown 300ms ease both;
}

/* -----------------------------------------------
   17. MEDIA QUERIES
----------------------------------------------- */

/* ≥1300px — switch to fixed pixel offset so text line length stays comfortable */
@media all and (min-width: 1300px) {
  .content-wrapper {
    margin-left: 530px;
  }
}

/* ≤1100px — shrink sidebar typography */
@media all and (max-width: 1100px) {
  .panel-cover__logo.logo {
    width: 90px;
    height: 90px;
  }
  .panel-cover__title.panel-title {
    font-size: 2em;
  }
  .panel-cover__description {
    font-size: 1em;
  }
  .navigation__item a {
    padding: 8px 14px;
    font-size: .8em;
  }
}

/* ≤960px — MOBILE LAYOUT */
@media all and (max-width: 960px) {

  /* Show the hamburger bar */
  .btn-mobile-menu {
    display: block;
  }

  /* Panel is full-width/height (cover) in home view */
  .panel-cover {
    width: 100%;
    max-width: none;
    height: 100%;
    position: fixed;
  }

  /* When collapsed on mobile, only auto-height top bar */
  .panel-cover--collapsed {
    position: relative;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
  }

  /* Panel inner: stacked layout */
  .panel-main {
    display: block;
    width: 100%;
    padding-top: 52px; /* clear the fixed mobile menu bar */
  }

  .panel-main__inner {
    display: block;
    padding: 20px 20px 30px;
    text-align: center;
  }

  /* Navigation dropdown — hidden by default, toggled by JS */
  .navigation-wrapper {
    display: none;
    position: fixed;
    top: 42px;
    left: 0;
    right: 0;
    z-index: 9998;
    width: 100%;
    padding: 10px 0 20px;
    background: rgba(14, 75, 82, .98);
    text-align: center;
  }

  .navigation-wrapper.visible {
    display: block;
  }

  /* Stack nav items vertically */
  .navigation {
    display: block;
    float: none;
    width: 100%;
  }

  .navigation__item {
    display: block;
    margin: 8px 0 0 0;
    line-height: normal;
  }

  .navigation__item a {
    display: inline-block;
    padding: 8px 20px;
  }

  .cover-navigation--social {
    margin-left: 0;
    margin-top: 8px;
  }

  .navigation--social .navigation__item {
    display: inline-block;
    margin: 4px 2px;
  }

  /* Content slides in from right */
  .content-wrapper {
    width: 90%;
    max-width: none;
    margin: 0 auto;
    margin-top: 0; /* panel--collapsed is relative so it pushes content down */
  }

  .content-wrapper__inner {
    margin: 0 5%;
    padding: 30px 0;
  }

  /* Heading sizes */
  h1 { font-size: 2.2em; }
  .post-list__post-title { font-size: 1.3em; }
}

/* ≤340px — very small phones */
@media all and (max-width: 340px) {
  .panel-cover__title.panel-title {
    font-size: 1.5em;
  }
  .panel-cover__description {
    font-size: .9em;
  }
  .btn {
    display: block;
    margin: 4px auto;
    width: 80%;
    text-align: center;
  }
}
