/* ==========================================================
   Nebula Scroll — Theme inspired by Stellar (HTML5 UP)
   Visual DNA: gradient cosmos bg, white content island,
   light sans-serif type, ghost buttons, gradient decorators,
   circular accents, airy spacious rhythm.
   ========================================================== */

/* --- CSS Variables --- */
:root {
  --bg-gradient-start: #e37682;
  --bg-gradient-end: #5f4d93;
  --bg-mid: #935d8c;
  --accent-pink: #efa8b0;
  --accent-lavender: #c79cc8;
  --accent-purple: #a89cc8;
  --accent-blue: #9bb2e1;
  --accent-sky: #8cc9f0;
  --surface: #ffffff;
  --surface-alt: #f7f7f7;
  --text: #636363;
  --text-light: rgba(99,99,99,0.55);
  --text-on-dark: rgba(255,255,255,0.7);
  --heading-on-dark: #ffffff;
  --border: #dddddd;
  --border-light: rgba(255,255,255,0.35);
  --radius: 6px;
  --radius-lg: 10px;
  --wrapper-width: 66em;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: 0.25s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-weight: 300; font-size: 17px; line-height: 1.7; color: var(--text-on-dark); background-color: var(--bg-mid); background-image: linear-gradient(45deg, var(--bg-gradient-start) 15%, var(--bg-gradient-end) 85%); min-height: 100vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition), border-color var(--transition); }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 300; line-height: 1.35; letter-spacing: -0.02em; color: var(--heading-on-dark); }

/* --- Wrapper --- */
.site-wrapper {
  max-width: var(--wrapper-width);
  margin: 0 auto;
  padding: 0 2em;
}
@media(max-width:480px){ .site-wrapper { padding: 0 1em; } }

/* --- Skip Nav --- */
.skip-nav { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-nav:focus { position: fixed; top: 0; left: 0; width: auto; height: auto; padding: 1em 2em; background: var(--surface); color: var(--text); z-index: 99999; font-size: 1rem; }

/* ==========================================================
   HEADER / NAVIGATION
   ========================================================== */
.site-header {
  padding: 2.5em 0 1.2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1000;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  border-bottom: none;
}
.site-header__logo { width: 2.4em; height: 2.4em; border-radius: 50%; border: 1px solid var(--border-light); padding: 0.15em; }
.site-header__logo img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; }
.site-header__name {
  font-size: 1.3em;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.01em;
}

/* Desktop nav */
.site-nav { display: flex; align-items: center; }
.site-nav__list { display: flex; gap: 0.2em; background: rgba(247,247,247,0.92); border-radius: var(--radius); padding: 0.3em; }
.site-nav__link {
  display: block;
  padding: 0.45em 1.1em;
  border-radius: var(--radius);
  font-size: 0.88em;
  font-weight: 400;
  color: var(--text);
  transition: background var(--transition);
  border-bottom: none;
}
.site-nav__link:hover { background: rgba(0,0,0,0.06); color: var(--text); }

/* Hamburger */
.hamburger { display: none; background: none; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 0.5em 0.6em; cursor: pointer; flex-direction: column; gap: 4px; }
.hamburger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 1px; transition: transform var(--transition), opacity var(--transition); }
.hamburger.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
.site-nav__mobile {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(247,247,247,0.97);
  border-radius: var(--radius);
  padding: 0.5em;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.site-nav__mobile.is-open { display: block; }
.site-nav__mobile .site-nav__link { display: block; padding: 0.6em 1em; }

@media(max-width:768px) {
  .site-nav__list { display: none; }
  .hamburger { display: flex; }
}

/* ==========================================================
   CONTENT ISLAND — white area for main content
   ========================================================== */
.content-island {
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 0;
}
.content-island h1,.content-island h2,.content-island h3,.content-island h4,.content-island h5,.content-island h6 { color: var(--text); }
.content-island a { border-bottom: 1px dotted var(--border); }
.content-island a:hover { color: var(--accent-purple); border-bottom-color: transparent; }

/* ==========================================================
   HERO SECTION (on gradient bg, above island)
   ========================================================== */
.hero {
  text-align: center;
  padding: 4em 2em 5em;
}
.hero__title {
  font-size: 2.8em;
  font-weight: 300;
  color: #fff;
  margin-bottom: 0.35em;
  letter-spacing: -0.03em;
}
.hero__subtitle {
  font-size: 1.15em;
  color: var(--text-on-dark);
  max-width: 38em;
  margin: 0 auto 1.8em;
  line-height: 1.65;
}
.hero__subtitle p { margin: 0 0 0.5em; }
.hero__cta {
  display: inline-block;
  padding: 0 2em;
  height: 2.8em;
  line-height: 2.8em;
  border-radius: var(--radius);
  font-weight: 400;
  font-size: 0.95em;
  color: #fff !important;
  background: var(--accent-sky);
  border-bottom: none !important;
  transition: background var(--transition);
  letter-spacing: 0.01em;
}
.hero__cta:hover { background: #9acff2; }

@media(max-width:768px){
  .hero { padding: 2.5em 1em 3.5em; }
  .hero__title { font-size: 2em; }
  .hero__subtitle { font-size: 1em; }
}
@media(max-width:480px){
  .hero__title { font-size: 1.7em; }
}

/* ==========================================================
   SECTION STYLING (inside island)
   ========================================================== */
.island-section {
  padding: 4em 4.5em 3em;
  border-top: 1px solid var(--border);
}
.island-section:first-child { border-top: none; }

@media(max-width:1280px){ .island-section { padding: 3.5em 3.5em 2.5em; } }
@media(max-width:980px){ .island-section { padding: 3em 2.5em 2em; } }
@media(max-width:736px){ .island-section { padding: 2.5em 1.5em 1.5em; } }
@media(max-width:480px){ .island-section { padding: 2em 1.2em 1.2em; } }

/* Section header with gradient underline */
.section-header { margin-bottom: 2.5em; }
.section-header--center { text-align: center; }
.section-header__title {
  font-size: 1.8em;
  font-weight: 300;
  margin-bottom: 0;
  position: relative;
  display: inline-block;
}
.section-header__title::after {
  content: '';
  display: block;
  width: 3em;
  height: 2px;
  border-radius: 2px;
  margin-top: 0.65em;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple), var(--accent-sky));
}
.section-header--center .section-header__title::after {
  margin-left: auto;
  margin-right: auto;
}
.section-header__desc {
  font-size: 1.1em;
  color: var(--text-light);
  margin-top: 0.9em;
  letter-spacing: -0.015em;
}

@media(max-width:736px){
  .section-header__title { font-size: 1.45em; }
  .section-header__desc { font-size: 1em; }
}

/* ==========================================================
   TOPICS (thematic areas)
   ========================================================== */
.topics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
}
.topic-card {
  flex: 1 1 calc(33.333% - 2em);
  min-width: 220px;
  max-width: 380px;
  text-align: center;
  padding: 1.5em 1em;
}
.topic-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5em;
  height: 4.5em;
  border-radius: 50%;
  border: 1px solid var(--border);
  margin-bottom: 1.3em;
  position: relative;
}
.topic-card__icon::before {
  content: '';
  display: block;
  width: 3.2em;
  height: 3.2em;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.topic-card:nth-child(5n+1) .topic-card__icon { border-color: var(--accent-pink); }
.topic-card:nth-child(5n+1) .topic-card__icon::before { border-color: var(--accent-pink); }
.topic-card:nth-child(5n+2) .topic-card__icon { border-color: var(--accent-lavender); }
.topic-card:nth-child(5n+2) .topic-card__icon::before { border-color: var(--accent-lavender); }
.topic-card:nth-child(5n+3) .topic-card__icon { border-color: var(--accent-purple); }
.topic-card:nth-child(5n+3) .topic-card__icon::before { border-color: var(--accent-purple); }
.topic-card:nth-child(5n+4) .topic-card__icon { border-color: var(--accent-blue); }
.topic-card:nth-child(5n+4) .topic-card__icon::before { border-color: var(--accent-blue); }
.topic-card:nth-child(5n+5) .topic-card__icon { border-color: var(--accent-sky); }
.topic-card:nth-child(5n+5) .topic-card__icon::before { border-color: var(--accent-sky); }

.topic-card__name {
  font-size: 1.15em;
  font-weight: 400;
  margin-bottom: 0.6em;
  color: var(--text);
}
.topic-card__desc {
  font-size: 0.92em;
  color: var(--text-light);
  line-height: 1.65;
}
.topic-card__desc p { margin: 0 0 0.5em; }

@media(max-width:768px){
  .topic-card { flex: 1 1 calc(50% - 2em); }
}
@media(max-width:540px){
  .topic-card { flex: 1 1 100%; max-width: 100%; }
}

/* ==========================================================
   LATEST POSTS
   ========================================================== */
.posts-list { display: flex; flex-direction: column; gap: 0; }

.post-item {
  display: flex;
  align-items: flex-start;
  gap: 2.5em;
  padding: 2.2em 0;
  border-bottom: 1px solid var(--border);
}
.post-item:first-child { padding-top: 0; }
.post-item:last-child { border-bottom: none; padding-bottom: 0; }

.post-item__cover {
  flex: 0 0 220px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-item__cover img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: var(--radius);
}

.post-item__body { flex: 1; min-width: 0; }
.post-item__date {
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.5em;
}
.post-item__title {
  font-size: 1.25em;
  font-weight: 400;
  margin-bottom: 0.45em;
}
.post-item__title a {
  color: var(--text);
  border-bottom: none;
  transition: color var(--transition);
}
.post-item__title a:hover { color: var(--accent-purple); }
.post-item__excerpt {
  font-size: 0.92em;
  color: var(--text-light);
  line-height: 1.65;
}
.post-item__excerpt p { margin: 0; }
.post-item__more {
  display: inline-block;
  margin-top: 0.8em;
  font-size: 0.85em;
  font-weight: 400;
  color: var(--accent-sky);
  border-bottom: 1px dotted var(--accent-sky) !important;
}
.post-item__more:hover { border-bottom-color: transparent !important; color: var(--accent-purple); }

.posts-footer { margin-top: 2.5em; text-align: center; }

@media(max-width:768px){
  .post-item { flex-direction: column; gap: 1.2em; }
  .post-item__cover { flex: 0 0 auto; width: 100%; }
}

/* ==========================================================
   FAQ
   ========================================================== */
.faq-list { max-width: 48em; }
.faq-list--center { margin-left: auto; margin-right: auto; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.6em 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; }

.faq-item__question {
  font-size: 1.08em;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.8em;
  user-select: none;
}
.faq-item__question::before {
  content: '+';
  flex: 0 0 1.4em;
  width: 1.4em;
  height: 1.4em;
  line-height: 1.3em;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-weight: 300;
  font-size: 1.1em;
  color: var(--accent-purple);
  transition: transform var(--transition), border-color var(--transition);
}
.faq-item.is-open .faq-item__question::before {
  content: '−';
  border-color: var(--accent-sky);
  color: var(--accent-sky);
}

.faq-item__answer {
  display: none;
  padding: 1em 0 0 2.2em;
  font-size: 0.94em;
  color: var(--text-light);
  line-height: 1.7;
}
.faq-item__answer p { margin: 0 0 0.8em; }
.faq-item.is-open .faq-item__answer { display: block; }

/* ==========================================================
   BUTTONS — Ghost style (Stellar DNA)
   ========================================================== */
.btn {
  display: inline-block;
  padding: 0 1.6em;
  height: 2.7em;
  line-height: 2.7em;
  border-radius: var(--radius);
  font-weight: 300;
  font-size: 0.92em;
  text-align: center;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--text) !important;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid var(--border) !important;
  text-decoration: none;
}
.btn:hover { background: rgba(0,0,0,0.04); border-bottom: 1px solid var(--border) !important; }

.btn--primary {
  background: var(--accent-sky);
  color: #fff !important;
  border-color: var(--accent-sky);
  border-bottom-color: var(--accent-sky) !important;
}
.btn--primary:hover { background: #9acff2; border-color: #9acff2; border-bottom-color: #9acff2 !important; }

/* Ghost button on dark bg */
.btn--ghost-light {
  border-color: var(--border-light);
  color: #fff !important;
  border-bottom-color: var(--border-light) !important;
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.08); }

/* ==========================================================
   PAGINATION
   ========================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  padding: 2.5em 0 1em;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-block;
  min-width: 2.4em;
  height: 2.4em;
  line-height: 2.4em;
  text-align: center;
  border-radius: var(--radius);
  font-size: 0.88em;
  font-weight: 400;
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom: 1px solid var(--border) !important;
  transition: background var(--transition);
}
.pagination a:hover { background: rgba(0,0,0,0.04); }
.pagination .active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ==========================================================
   PAGE TEMPLATE (single page)
   ========================================================== */
.page-header {
  text-align: center;
  padding: 4.5em 2em 3.5em;
}
.page-header__title {
  font-size: 2.6em;
  font-weight: 300;
  color: #fff;
}
.page-content {
  line-height: 1.75;
  font-size: 1em;
}
.page-content h2 { font-size: 1.5em; font-weight: 400; margin: 1.8em 0 0.6em; color: var(--text); }
.page-content h3 { font-size: 1.25em; font-weight: 400; margin: 1.5em 0 0.5em; color: var(--text); }
.page-content p { margin: 0 0 1.4em; }
.page-content ul, .page-content ol { margin: 0 0 1.4em 1.5em; }
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 0.4em; }
.page-content blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: 0.5em 0 0.5em 1.5em;
  margin: 0 0 1.4em;
  font-style: italic;
  color: var(--text-light);
}
.page-content img { border-radius: var(--radius); margin: 1em 0; }
.page-content a { color: var(--accent-sky); border-bottom: 1px dotted var(--accent-sky); }
.page-content a:hover { border-bottom-color: transparent; }

/* ==========================================================
   POST TEMPLATE (single post)
   ========================================================== */
.post-header {
  text-align: center;
  padding: 4em 2em 3em;
}
.post-header__title {
  font-size: 2.4em;
  font-weight: 300;
  color: #fff;
  margin-bottom: 0.3em;
}
.post-header__date {
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark);
}
.post-cover {
  margin: -2em 4.5em 2.5em;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-cover img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: top;
}
@media(max-width:980px){ .post-cover { margin: -1.5em 2.5em 2em; } }
@media(max-width:736px){ .post-cover { margin: -1em 1.5em 1.5em; } }
@media(max-width:480px){ .post-cover { margin: -0.5em 0 1.2em; } }

.post-excerpt {
  font-size: 1.1em;
  color: var(--text-light);
  margin-bottom: 2em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid var(--border);
  line-height: 1.7;
}
.post-excerpt p { margin: 0; }

.post-body {
  line-height: 1.75;
}
.post-body h2 { font-size: 1.5em; font-weight: 400; margin: 1.8em 0 0.6em; color: var(--text); }
.post-body h3 { font-size: 1.25em; font-weight: 400; margin: 1.5em 0 0.5em; color: var(--text); }
.post-body p { margin: 0 0 1.4em; }
.post-body ul, .post-body ol { margin: 0 0 1.4em 1.5em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 0.4em; }
.post-body blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: 0.5em 0 0.5em 1.5em;
  margin: 0 0 1.4em;
  font-style: italic;
  color: var(--text-light);
}
.post-body img { border-radius: var(--radius); margin: 1em 0; }
.post-body a { color: var(--accent-sky); border-bottom: 1px dotted var(--accent-sky); }
.post-body a:hover { border-bottom-color: transparent; }

/* ==========================================================
   BLOG INDEX
   ========================================================== */
.blog-header {
  text-align: center;
  padding: 4em 2em 3em;
}
.blog-header__title {
  font-size: 2.4em;
  font-weight: 300;
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2em;
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.blog-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.blog-card__cover img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.blog-card__body { padding: 1.4em 1.5em 1.6em; }
.blog-card__date {
  font-size: 0.76em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.4em;
}
.blog-card__title {
  font-size: 1.12em;
  font-weight: 400;
  margin-bottom: 0.4em;
}
.blog-card__title a { color: var(--text); border-bottom: none; }
.blog-card__title a:hover { color: var(--accent-purple); }
.blog-card__excerpt {
  font-size: 0.88em;
  color: var(--text-light);
  line-height: 1.6;
}
.blog-card__excerpt p { margin: 0; }

@media(max-width:680px){
  .blog-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  padding: 4em 0 2.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
}
.site-footer__about {
  flex: 1 1 45%;
  min-width: 240px;
}
.site-footer__about-name {
  font-size: 1.15em;
  font-weight: 400;
  color: #fff;
  margin-bottom: 0.5em;
}
.site-footer__about-tagline {
  font-size: 0.9em;
  color: var(--text-on-dark);
  margin-bottom: 1.2em;
  line-height: 1.6;
}
.site-footer__nav {
  flex: 1 1 25%;
  min-width: 160px;
}
.site-footer__nav-title {
  font-size: 0.85em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 1em;
}
.site-footer__nav-list { display: flex; flex-direction: column; gap: 0.5em; }
.site-footer__nav-link {
  font-size: 0.88em;
  color: var(--text-on-dark);
  border-bottom: 1px dotted rgba(255,255,255,0.2);
  display: inline-block;
  transition: color var(--transition), border-color var(--transition);
}
.site-footer__nav-link:hover { color: #fff; border-bottom-color: transparent; }

.site-footer__contact {
  flex: 1 1 25%;
  min-width: 160px;
}
.site-footer__contact-title {
  font-size: 0.85em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 1em;
}
.site-footer__email {
  font-size: 0.88em;
  color: var(--text-on-dark);
  border-bottom: 1px dotted rgba(255,255,255,0.2);
  transition: color var(--transition), border-color var(--transition);
}
.site-footer__email:hover { color: #fff; border-bottom-color: transparent; }

.site-footer__bottom {
  width: 100%;
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.78em;
  color: rgba(255,255,255,0.45);
}

@media(max-width:768px){
  .site-footer { flex-direction: column; }
}

/* ==========================================================
   UTILITY
   ========================================================== */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Gradient decorative bar (statistics-inspired) */
.gradient-bar {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2em 0;
}
.gradient-bar__segment {
  flex: 1;
  height: 4px;
}
.gradient-bar__segment:nth-child(1) { background: var(--accent-pink); }
.gradient-bar__segment:nth-child(2) { background: var(--accent-lavender); }
.gradient-bar__segment:nth-child(3) { background: var(--accent-purple); }
.gradient-bar__segment:nth-child(4) { background: var(--accent-blue); }
.gradient-bar__segment:nth-child(5) { background: var(--accent-sky); }

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--accent-sky);
  outline-offset: 2px;
}

/* Content column for two-column text (Stellar DNA: p.content) */
.two-col-text {
  columns: 22em 2;
  column-gap: 2.5em;
  text-align: justify;
}
@media(max-width:736px){
  .two-col-text { columns: 1; text-align: left; }
}
