/* ============================================================
   article.css — Styles for article-m365-copilot.html
   Ioannis Androulakis personal site
   ============================================================ */

/* ── RESET & TOKENS ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:           #0d1b2a;
  --navy-mid:       #1a2e45;
  --cream:          #f5f0e8;
  --warm-white:     #faf8f4;
  --accent:         #c8964a;
  --accent-light:   #e8b96a;
  --text-primary:   #0d1b2a;
  --text-secondary: #4a5568;
  --text-light:     #8a9ab0;
  --border:         rgba(13, 27, 42, 0.09);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── READING PROGRESS BAR ── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
  width: 0%;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

nav.scrolled {
  box-shadow: 0 2px 24px rgba(13, 27, 42, 0.08);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--navy);
}

/* ── CORNER PREV/NEXT NAV ── */
.corner-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
  white-space: nowrap;
}

.corner-nav-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(200, 150, 74, 0.05);
}

.corner-nav-link.disabled {
  opacity: 0.32;
  pointer-events: none;
}

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--navy);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--cream);
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--accent-light);
}

.mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.75rem;
  cursor: pointer;
}

/* ── ARTICLE HEADER ── */
.article-header {
  padding: 9rem 3rem 4rem;
  max-width: 820px;
  margin: 0 auto;
  animation: fadeUp 0.85s ease both;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.breadcrumb a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  font-size: 0.65rem;
  color: var(--text-light);
}

.breadcrumb span {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.tag {
  padding: 0.3rem 0.85rem;
  background: rgba(200, 150, 74, 0.12);
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(200, 150, 74, 0.25);
}

.article-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 1rem;
}

.article-title em {
  font-style: italic;
  color: var(--accent);
}

.article-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meta-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.meta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.meta-author-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy);
}

.meta-author-title {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-light);
}

.meta-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.meta-item {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-light);
}

.meta-item strong {
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── ARTICLE LAYOUT ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 5rem;
  max-width: 1060px;
  margin: 0 auto;
  padding: 3rem 3rem 5rem;
  align-items: start;
}

/* ── ARTICLE BODY ── */
.article-body {
  min-width: 0;
}

.article-body p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.article-body p:first-child {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #3a4a5c;
  font-weight: 400;
}

.article-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--navy);
  margin: 2.75rem 0 1rem;
  line-height: 1.2;
}

.article-body h4 {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2rem 0 0.6rem;
}

.article-body ul,
.article-body ol {
  padding-left: 0;
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.article-body li {
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 1.5rem;
  position: relative;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.article-body ol {
  counter-reset: ol-counter;
}

.article-body ol li {
  counter-increment: ol-counter;
}

.article-body ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.article-body strong {
  font-weight: 500;
  color: var(--text-primary);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── CALLOUT ── */
.callout {
  background: rgba(200, 150, 74, 0.07);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.callout p {
  font-size: 0.93rem !important;
  line-height: 1.75 !important;
  color: var(--text-primary) !important;
  font-weight: 400 !important;
  margin: 0 !important;
}

.callout-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

/* ── IMAGE PAIR ── */
.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
}

.image-pair figure {
  margin: 0;
}

.image-pair img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
}

.image-pair figcaption {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-light);
  margin-top: 0.4rem;
  text-align: center;
}

/* ── SIDEBAR ── */
.article-sidebar {
  position: sticky;
  top: 7rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-title::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--accent);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 0.2rem 0 0.2rem 0.75rem;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.toc-list a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.year-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  list-style: none;
}

.year-nav-list a {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-left: 2px solid transparent;
  display: block;
  transition: all 0.2s;
}

.year-nav-list a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.year-nav-list a.current {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.author-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.author-mini-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
}

.author-mini-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.author-mini-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--navy);
}

.author-mini-role {
  font-size: 0.73rem;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.5;
}

.author-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.25rem;
}

.author-mini-link:hover {
  text-decoration: underline;
}

/* ── BACK BAR ── */
.back-bar {
  background: var(--warm-white);
  border-top: 1px solid var(--border);
  padding: 1.25rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

/* ── FOOTER ── */
footer {
  background: var(--navy);
  padding: 3rem 3rem 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 1.5rem;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.footer-logo span {
  color: var(--accent-light);
}

.footer-tagline {
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.32);
  margin-top: 0.4rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-nav-title {
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 0.2rem;
}

.footer-nav a {
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--cream);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copy {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.2);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .corner-nav-link .link-label {
    display: none;
  }

  .article-header {
    padding: 8rem 1.5rem 3rem;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 2rem 1.5rem 4rem;
  }

  .article-sidebar {
    display: none;
  }

  .image-pair {
    grid-template-columns: 1fr;
  }

  .back-bar {
    padding: 1.25rem 1.5rem;
  }

  footer {
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 2rem;
  }
}

@media (max-width: 500px) {
  .article-header {
    padding: 7.5rem 1.25rem 2.5rem;
  }

  .article-meta {
    gap: 1rem;
  }

  .meta-sep {
    display: none;
  }
}
