/* ===========================================================================
   Fly Me To The Cloud — theme approximating the original WordPress design
   =========================================================================== */

:root {
  --teal: #1ba1c5;
  --teal-dark: #178aa8;
  --navy: #2f4356;
  --ink: #33475b;
  --body: #5a6b7b;
  --page-bg: #f4f6f9;
  --card-shadow: 0 6px 18px rgba(16, 34, 48, .10);
  --radius: 14px;
  --radius-sm: 8px;
  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", "Source Sans Pro", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Inter", "Segoe UI Variable Display", "Segoe UI", "Source Sans Pro", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(120deg, #223142 0%, var(--navy) 55%, #35566b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 2px 10px rgba(16, 34, 48, .18);
  transition: box-shadow .25s ease;
}
/* teal accent line along the bottom edge */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), #4fc3df 55%, transparent);
}
.site-header.scrolled {
  box-shadow: 0 10px 26px rgba(16, 34, 48, .28);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: padding .25s ease;
}
.site-header.scrolled .header-inner { padding: 8px 20px; }
.site-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.site-logo img { height: 54px; width: auto; transition: height .25s ease; }
.site-header.scrolled .site-logo img { height: 38px; }
.site-logo-text { font-family: var(--font-head); font-size: 26px; font-weight: 600; color: #fff; }
.site-tagline {
  color: rgba(255, 255, 255, .82);
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .3px;
  padding-left: 16px;
  margin-left: 2px;
  border-left: 2px solid rgba(27, 161, 197, .55);
  transition: opacity .2s ease;
}
.site-header.scrolled .site-tagline { opacity: 0; }
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav a {
  color: rgba(255, 255, 255, .88);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14px;
  text-transform: capitalize;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .12); text-decoration: none; }
.nav-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: rgba(255, 255, 255, .88);
  border-radius: 50%;
}
.nav-search:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* --- Layout ---------------------------------------------------------------- */
.page-wrap { padding: 40px 20px; }
.container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 30px;
}
.content { flex: 1 1 auto; min-width: 0; }
.sidebar { flex: 0 0 330px; }

/* --- Post cards ------------------------------------------------------------ */
.post-card {
  background: #fff;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(16, 34, 48, .06);
  margin-bottom: 30px;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 34, 48, .16);
}
.card-image { display: block; }
.card-image img { display: block; width: 100%; }
.card-body { padding: 26px 32px 30px; }
.card-title {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--teal); text-decoration: none; }
.card-meta {
  margin: 0 0 16px;
  color: var(--teal);
  font-size: 12.5px;
  letter-spacing: .3px;
}
.card-excerpt { color: var(--body); }
.card-excerpt p { margin: 0 0 20px; }
.read-more {
  font-size: 13px;
  color: var(--teal-dark);
  font-weight: 600;
}

/* --- Single post / page ---------------------------------------------------- */
.single-post {
  background: #fff;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(16, 34, 48, .06);
  padding: 34px 40px 40px;
  border-radius: var(--radius);
}
.single-title {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: .2px;
  text-transform: uppercase;
  color: var(--ink);
}
.single-content { color: #444; }
.single-content h1, .single-content h2, .single-content h3, .single-content h4 {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 1.7em 0 .6em;
}
.single-content p { margin: 0 0 1.6em; }
.single-content img { margin: 12px 0; }
.single-content figure { margin: 18px 0; }
.single-content figure img { display: block; }
.single-content pre,
.single-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
}
.single-content pre {
  background: #1e2733;
  color: #e6edf3;
  padding: 16px 18px;
  overflow: auto;
  border-radius: 4px;
}
.single-content code { background: #eef2f5; padding: 1px 5px; border-radius: 3px; }
.single-content pre code { background: none; padding: 0; }
.single-content blockquote {
  margin: 18px 0;
  padding: 6px 18px;
  border-left: 4px solid var(--teal);
  color: #667;
  background: #f6fafc;
}
.single-content a { color: var(--teal-dark); text-decoration: underline; }
.single-tags { margin-top: 28px; padding-top: 18px; border-top: 1px solid #eee; }

/* --- YouTube facade embed --------------------------------------------------- */
.yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 18px 0 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 14px rgba(16, 34, 48, .18);
}
.yt-embed .yt-link { display: block; width: 100%; height: 100%; }
.yt-embed .yt-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease, filter .3s ease;
}
.yt-embed:hover .yt-thumb { transform: scale(1.03); filter: brightness(.9); }
.yt-embed .yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.yt-embed .yt-play svg { display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.yt-embed .yt-play-bg { fill: #212121; opacity: .82; transition: fill .2s ease, opacity .2s ease; }
.yt-embed:hover .yt-play-bg { fill: #ff0000; opacity: 1; }
.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Sidebar widgets ------------------------------------------------------- */
.widget {
  background: #fff;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(16, 34, 48, .06);
  padding: 20px 22px 24px;
  margin-bottom: 26px;
  border-radius: var(--radius);
}
.widget-title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
}
.widget-welcome { padding: 26px 20px 28px; }
.welcome-body { text-align: center; }
.welcome-photo {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: cover;
  margin: 6px auto 14px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 14px rgba(16, 34, 48, .18);
}
.welcome-name {
  margin: 0;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.015em;
  line-height: 1.2;
}
.welcome-role {
  margin: 2px 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.welcome-bio p { margin: 0 0 12px; font-size: 13.5px; }
.welcome-bio p:last-child { margin-bottom: 0; }
.welcome-location {
  margin: 14px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--body);
  letter-spacing: .2px;
}
.welcome-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--navy);
  background: #eef2f6;
  border: 1px solid rgba(16, 34, 48, .08);
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.social-link:hover {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
  text-decoration: none;
}
.social-link svg { display: block; }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 14px;
  align-items: center;
  padding: 2px 8px;
}
.badge-grid img {
  width: 100%;
  height: auto;
  filter: saturate(.9);
  transition: filter .15s ease, transform .15s ease;
}
.badge-grid img:hover { filter: saturate(1); transform: scale(1.04); }

.tag-cloud { line-height: 2.2; }
.tag-pill {
  display: inline-block;
  padding: 3px 10px;
  margin: 0 4px 6px 0;
  border: 1px solid #d8dee3;
  color: var(--teal-dark);
  border-radius: 3px;
  font-size: 90%;
}
.tag-pill:hover { background: var(--teal); color: #fff; border-color: var(--teal); text-decoration: none; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: #c7d2dc;
  text-align: center;
  padding: 26px 20px;
  font-size: 13px;
}
.site-footer p { margin: 0; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 820px) {
  .container { flex-direction: column; }
  .sidebar { flex-basis: auto; width: 100%; }
}

/* Tablet / large phone: keep a row but let nav wrap under if needed */
@media (max-width: 680px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    padding: 12px 16px;
  }
  .site-logo { flex: 1 1 100%; justify-content: center; }
  .site-logo img { height: 48px; }
  .site-header.scrolled .site-logo img { height: 42px; }
  .site-tagline {
    flex: 0 0 auto;
    order: 2;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    font-size: 13px;
    text-align: center;
  }
  .site-nav {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .site-nav a { padding: 6px 12px; }
  /* keep header compact when scrolled: drop the tagline entirely */
  .site-header.scrolled .site-tagline { display: none; }
  .site-header.scrolled .header-inner { padding: 8px 16px; }
  .page-wrap { padding: 28px 14px; }
}

/* Small phone: tighten spacing and shrink pills */
@media (max-width: 400px) {
  .site-logo img { height: 42px; }
  .site-nav { gap: 2px 4px; }
  .site-nav a { padding: 6px 9px; font-size: 13px; }
  .nav-search { width: 30px; height: 30px; }
}
