/* === Calendar page — extends portfolio.css ===========================
   Loaded only when the Calendar page template is active.
   ====================================================================== */

.cal-page {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  padding: 160px var(--pad-x) clamp(80px, 12vh, 140px);
  overflow: hidden;
}
.cal-page .hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.4;
}

.cal-shell {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 60px;
  max-width: var(--maxw);
  margin: 0 auto;
  align-items: stretch;
}
@media (max-width: 1000px) {
  .cal-shell { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Sidebar ---------- */
.cal-sidebar {
  display: flex; flex-direction: column;
  gap: 28px;
  padding: 8px 0;
}
.cal-eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.cal-title {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 0.95; letter-spacing: -0.02em;
}
.cal-title .em { color: var(--accent); }
.cal-lede {
  font-family: var(--display); font-style: italic;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.4;
  color: var(--fg-dim);
  max-width: 36ch;
}

.cal-meta {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cal-meta-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  gap: 16px;
}
.cal-meta-row:first-child { border-top: 0; }
.cal-meta-row .k {
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}
.cal-meta-row .v {
  color: var(--fg);
  text-align: right;
}

.cal-topics {
  display: flex; flex-direction: column; gap: 12px;
}
.cal-topics-label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.cal-topics ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.cal-topics li {
  font-size: 14px;
  color: var(--fg-dim);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.cal-topics li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

.cal-fallback {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
  align-items: flex-start;
}
.cal-fallback-label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-muted);
}

/* ---------- Embed frame ---------- */
.cal-embed-wrap {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  min-height: 720px;
  display: flex; flex-direction: column;
}
.cal-frame-corners span {
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--accent);
}
.cal-frame-corners span:nth-child(1) { top: -1px; left: -1px;     border-right: 0; border-bottom: 0; }
.cal-frame-corners span:nth-child(2) { top: -1px; right: -1px;    border-left: 0;  border-bottom: 0; }
.cal-frame-corners span:nth-child(3) { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.cal-frame-corners span:nth-child(4) { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

.cal-embed-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
}
.cal-embed-status {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg);
}
.cal-embed-status .dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.cal-embed-meta {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cal-embed {
  flex: 1;
  position: relative;
  min-height: 600px;
}
.cal-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: 0;
  display: block;
}

.cal-embed-foot {
  display: flex; justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  gap: 16px;
}

/* ---------- Placeholder (when no embed set) ---------- */
.cal-placeholder {
  position: relative;
  height: 100%;
  min-height: 600px;
  overflow: hidden;
  display: grid; place-items: center;
}
.cal-placeholder-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black, transparent 75%);
}
.cal-placeholder-inner {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 520px;
  padding: 40px 32px;
}
.cal-placeholder-icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: 24px;
}
.cal-pulse {
  animation: cal-pulse 1.8s ease-in-out infinite;
}
@keyframes cal-pulse {
  0%, 100% { opacity: 1; r: 2; }
  50% { opacity: 0.3; r: 4; }
}
.cal-placeholder-title {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.cal-placeholder-text {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin-bottom: 28px;
}
.cal-placeholder-text code {
  font-family: var(--mono); font-size: 12px;
  color: var(--accent);
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.cal-placeholder-tags {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.cal-placeholder-tags span {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
  transition: all .25s var(--ease);
}
.cal-placeholder-tags span:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- FAQ strip below ---------- */
.cal-faq {
  border-top: 1px solid var(--line);
}
