/*
 * Overrides for the parts the original template drove with jQuery plugins
 * (superslides, animated-headline, isotope, magnific-popup, simplebar).
 * React handles the behaviour now; these rules replace the plugins' styling.
 */

/* ---- Section switching (was: page transition plugin) ---- */
.site-main .pt-page {
  transition: opacity 0.35s ease;
}

/* ---- Preloader ---- */
.preloader {
  animation: preloader-out 0.4s ease forwards;
  animation-delay: 0.25s;
}
@keyframes preloader-out {
  to {
    opacity: 0;
  }
}

/* ---- Banner slideshow (was: superslides) ---- */
.banner-slider,
.banner-slider #slides,
.banner-slider .slides-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.banner-slider .slides-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.banner-slider .slides-container img.is-active {
  opacity: 1;
}

/* The dark wash used to come from simplebar's wrapper pseudo-element. */
.banner-slider::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #151515;
  opacity: 0.5;
  pointer-events: none;
}

.banner-section .banner-content {
  z-index: 2;
}

/* ---- Rotating job titles (was: jquery.animatedheadline) ---- */
.cd-headline .cd-words-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: top;
  text-align: left;
}

.cd-headline .cd-words-wrapper b {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.45s ease;
}

.cd-headline .cd-words-wrapper b.is-visible {
  position: relative;
  opacity: 1;
}

/* ---- Portfolio grid + filter (was: isotope) ---- */
.portfolio-section .portfolio-filter ul li {
  cursor: pointer;
}

.portfolio-section .item {
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

/* Isotope used to pack items of mixed heights; keep a uniform thumbnail instead. */
.portfolio-section .portfolio-items .item figure {
  overflow: hidden;
  margin-bottom: 30px;
}

.portfolio-section .portfolio-items .item figure img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: top center;
}

/* ---- Lightbox (was: magnific-popup) ---- */
.portfolio-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  background-color: rgba(11, 11, 11, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.portfolio-lightbox img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

.portfolio-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: #fff;
  opacity: 0.7;
}

.portfolio-lightbox-close:hover {
  opacity: 1;
}

/* ---- Standalone pages (blog): scroll normally instead of swapping sections ---- */
.site-main--static {
  position: static;
  height: auto;
  overflow: visible;
  margin-left: 200px;
}

.site-main--static .pt-page {
  position: static;
  width: 100%;
  height: auto;
  opacity: 1;
  visibility: visible;
  overflow: visible;
  padding: 50px 0 60px;
}

@media (max-width: 991.98px) {
  .site-main--static {
    margin-left: 0;
    padding-top: 70px;
  }
}

/* The 404 has no sidebar, so it should not be inset by one. */
.site-main--bare {
  margin-left: 0;
  background-color: #2c2d2f;
  min-height: 100vh;
}

.not-found {
  text-align: center;
  padding: 80px 0;
}

.not-found h1 {
  font-size: 110px;
  line-height: 1;
  color: #00a3e1;
  margin-bottom: 10px;
}

.not-found h2 {
  font-size: 26px;
  margin-bottom: 14px;
}

.not-found p {
  margin-bottom: 28px;
}

/* ---- Blog ---- */
.blog-section .blog-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.blog-section .blog-item .blog-content h4 {
  font-size: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.blog-section .blog-item .blog-content h4 a {
  color: #fff;
}

.blog-section .blog-item .blog-content h4 a:hover {
  color: #00a3e1;
}

.blog-section .blog-item .blog-content p {
  font-size: 13px;
  line-height: 1.7;
}

.blog-section .blog-item .read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #00a3e1;
}

.post-heading {
  margin-bottom: 30px;
}

.post-heading .cat {
  display: block;
  margin-bottom: 7px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #00a3e1;
}

.post-content {
  max-width: 780px;
  line-height: 1.9;
}

.post-content h2 {
  font-size: 26px;
  margin: 34px 0 14px;
  color: #fff;
}

.post-content h3 {
  font-size: 21px;
  margin: 26px 0 12px;
  color: #fff;
}

.post-content p {
  margin-bottom: 16px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 18px 20px;
  list-style: disc;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid #00a3e1;
  font-style: italic;
  color: #e1e1e1;
}

.post-content pre {
  background-color: #232426;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 16px 18px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.post-content pre code {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
  color: #d8d8d8;
  white-space: pre;
}

.post-content :not(pre) > code {
  background-color: #232426;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 13px;
  color: #00a3e1;
}

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

.post-content a {
  color: #00a3e1;
  text-decoration: underline;
}

/* ---- Header name (was: fitty) ---- */
.header-main .image-container .header-name {
  font-size: 18px;
  line-height: 1.2;
  word-break: break-word;
}

/* ---- Misc ---- */
.header-toggle {
  cursor: pointer;
}

.nav-footer .social a[aria-current='true'] img {
  outline: 1px solid #00a3e1;
}

button.btn-main[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Blog post chrome (breadcrumbs, tags) ---- */
.post-breadcrumbs {
  font-size: 13px;
  color: #8b8b8b;
  margin-bottom: 14px;
}

.post-breadcrumbs a {
  color: #8b8b8b;
}

.post-breadcrumbs a:hover {
  color: #00a3e1;
}

.post-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
}

.post-tags li {
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 163, 225, 0.35);
  color: #00a3e1;
  border-radius: 999px;
  padding: 3px 11px;
}

/* ---- Post body: what the rich text editor produces ---- */
.post-content img {
  border-radius: 6px;
  margin: 28px auto;
}

.post-content figure {
  margin: 28px 0;
}

.post-content figure img {
  margin: 0;
}

.post-content figcaption {
  font-size: 13px;
  color: #8b8b8b;
  text-align: center;
  margin-top: 8px;
}

.post-content h2 {
  font-size: 26px;
  margin: 44px 0 14px;
}

.post-content h3 {
  font-size: 21px;
  margin: 34px 0 12px;
}

.post-content h4 {
  font-size: 18px;
  margin: 28px 0 10px;
}

.post-content ul,
.post-content ol {
  padding-left: 22px;
  margin: 0 0 18px;
}

.post-content li {
  margin-bottom: 7px;
}

.post-content blockquote {
  border-left: 3px solid #00a3e1;
  padding: 2px 0 2px 18px;
  margin: 26px 0;
  color: #b8b8b8;
  font-style: italic;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 2px 6px;
}

.post-content pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 26px 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

.post-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin: 40px 0;
}

/* Alignment the editor's align buttons produce. */
.post-content [style*='text-align: center'] {
  text-align: center;
}

.post-content [style*='text-align: right'] {
  text-align: right;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  font-size: 15px;
}

.post-content th,
.post-content td {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 12px;
  text-align: left;
}

/* ------------------------------------------------------ Share and subscribe */

/*
 * Share links and feed links, drawn with the site's own styles rather than a
 * third-party widget. Every network offers a drop-in script; each one is a few
 * hundred kilobytes that watches the reader and blocks rendering, to draw the
 * same six icons these do for nothing.
 */

.share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
}

.share-label {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-list a,
.share-list button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.share-list a:hover,
.share-list button:hover {
  border-color: currentColor;
  background: rgba(128, 128, 128, 0.12);
  transform: translateY(-1px);
  text-decoration: none;
}

.share-list a:focus-visible,
.share-list button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Confirmation that the copy actually happened; without it the click does
   nothing visible and gets repeated. */
.share-list button.is-done {
  border-color: #3fa34d;
  color: #3fa34d;
}

@media (prefers-reduced-motion: reduce) {
  .share-list a,
  .share-list button {
    transition: none;
  }
  .share-list a:hover,
  .share-list button:hover {
    transform: none;
  }
}

.subscribe {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
  font-size: 13px;
}

.subscribe-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.subscribe a {
  padding: 3px 11px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 999px;
  line-height: 1.7;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.subscribe a:hover {
  border-color: currentColor;
  background: rgba(128, 128, 128, 0.12);
  text-decoration: none;
}

.subscribe-hint {
  opacity: 0.6;
}

/* ---------------------------------------------------------------------------
   Captcha

   Sized in the stylesheet rather than left to the image so the box does not
   change height when the picture arrives — the form sits under an article, and
   a jump at that moment moves the text somebody is reading.
   --------------------------------------------------------------------------- */

.captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  margin: 0 0 18px;
}

.captcha-loading {
  display: flex;
  align-items: center;
  min-height: 92px;
  margin: 0 0 18px;
  font-size: 13px;
  opacity: 0.6;
}

.captcha-image {
  position: relative;
  flex: 0 0 auto;
  line-height: 0;
}

.captcha-image img {
  width: 230px;
  height: 80px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 6px;
}

.captcha-refresh {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.captcha-refresh:hover {
  background: #fff;
}

/* Label directly above its box, the pair beside the picture. Spread across the
   full width they read as three unrelated things. */
.captcha-entry {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 6px;
}

.captcha-label {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.captcha-input {
  width: 170px;
  padding: 9px 12px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.captcha-alt {
  flex: 1 1 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 12px;
  text-align: left;
  text-decoration: underline;
  opacity: 0.65;
  cursor: pointer;
}

.captcha-alt:hover {
  opacity: 1;
}

/* ---------------------------------------------------------------------------
   Comments
   --------------------------------------------------------------------------- */

.comments {
  margin: 60px 0 0;
  padding: 40px 0 0;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.comments-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 22px;
}

.comments-count {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.18);
  font-size: 13px;
  font-weight: 400;
}

.comments-empty,
.comments-closed {
  margin: 0 0 28px;
  opacity: 0.7;
}

.comment-list,
.comment-replies {
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}

/* Replies are indented once and never again: a thread that keeps nesting ends
   up a column of single words on a phone. */
.comment-replies {
  margin: 18px 0 0 0;
  padding-left: 22px;
  border-left: 2px solid rgba(128, 128, 128, 0.2);
}

.comment {
  padding: 0 0 20px;
}

.comment + .comment {
  margin-top: 20px;
  border-top: 1px solid rgba(128, 128, 128, 0.14);
  padding-top: 20px;
}

.comment-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}

.comment-author {
  font-weight: 600;
}

.comment-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(63, 163, 77, 0.16);
  color: #3fa34d;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comment-date {
  font-size: 12px;
  opacity: 0.55;
}

/* Comments are stored and rendered as plain text — no markup is ever
   interpreted — so the line breaks somebody typed are all the formatting
   there is, and they have to survive. */
.comment-body {
  margin: 0 0 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-reply,
.comment-cancel {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 12px;
  text-decoration: underline;
  opacity: 0.6;
  cursor: pointer;
}

.comment-reply:hover,
.comment-cancel:hover {
  opacity: 1;
}

.comment-form {
  max-width: 720px;
}

.comment-form h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.comment-hint {
  margin: 0 0 20px;
  font-size: 13px;
  opacity: 0.65;
}

.comment-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.comment-fields label {
  flex: 1 1 240px;
}

.comment-form label {
  display: block;
  margin: 0 0 18px;
  font-size: 13px;
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 15px;
}

.comment-form textarea {
  resize: vertical;
}

/*
  The honeypot.

  `display: none` is the one thing that does not work here — a competent bot
  checks for it, and some browsers skip hidden fields on autofill. This takes
  the field out of the flow and off the screen while leaving it a real, filled-in
  field as far as anything scripted can tell.
*/
.comment-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.comment-ok,
.comment-error {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
}

.comment-ok {
  border: 1px solid rgba(63, 163, 77, 0.4);
  color: #3fa34d;
}

.comment-error {
  border: 1px solid rgba(214, 69, 65, 0.4);
  color: #d64541;
}
