/* ============================================================
   SvennHill — Core Stylesheet
   Aesthetic: analog / retro web / VHS texture
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark:       #2e2e2e;
  --bg-content:    #e9e7e3;
  --text:          #111111;
  --text-muted:    #555555;
  --accent:        #3a3a3a;
  --link:          #1a1a8c;
  --link-visited:  #888888;
  --border:        #c4c2be;
  --header-bg:     #242424;
  --footer-bg:     #242424;
  --font-mono:     'Courier New', Courier, monospace;
  --max-width:     860px;
}

/* VHS tape tile texture */
body {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
  color: var(--text);
  background-color: var(--bg-dark);
  background-image: url("img/vhs-texture.png");
  background-repeat: repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   VHS Header — Diagonal Color Nav
   ============================================================ */

.site-header {
  background-color: var(--header-bg);
  /* Light grey grid pattern on charcoal */
  background-image:
    repeating-linear-gradient(0deg,   rgba(200,200,200,0.20) 0px, rgba(200,200,200,0.20) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg,  rgba(200,200,200,0.20) 0px, rgba(200,200,200,0.20) 1px, transparent 1px, transparent 40px);
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
  position: relative;
  min-height: 148px;
}

/* Worn grain overlay on header */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("img/vhs-texture.png");
  background-repeat: repeat;
  opacity: 0.10;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}

/* Edge-darkening vignette on header */
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 28% 100% at 0%   50%, rgba(0,0,0,0.40) 0%, transparent 100%),
    radial-gradient(ellipse 28% 100% at 100% 50%, rgba(0,0,0,0.30) 0%, transparent 100%),
    radial-gradient(ellipse 100% 35% at 50%  0%,  rgba(0,0,0,0.22) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* All header direct children sit above overlays */
.site-header > .vhs-left,
.site-header > .vhs-center,
.site-header > .vhs-stripe-area { position: relative; z-index: 3; }

/* --- Center spacer: dark area between brand and stripes --- */
.vhs-center {
  flex: 1;
  position: relative;
}

/* --- Thin horizontal rainbow bar in center area --- */
.vhs-color-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 42px;
  height: 5px;
  background: linear-gradient(to right, #ffca34, #ff7635, #f83f4d, #c62899, #2346ba, #00bc8c);
  z-index: 4;
  pointer-events: none;
}

/* --- Left column: brand stacked above avatar --- */
.vhs-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px 14px 10px 14px;
  flex-shrink: 0;
  gap: 8px;
}

/* --- Brand box --- */
.vhs-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.vhs-brand a,
.vhs-brand span {
  display: inline-block;
  border: 2px solid #ffffff;
  padding: 7px 13px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.35em;
  font-weight: bold;
  letter-spacing: 1px;
  white-space: nowrap;
  text-decoration: none;
}

.vhs-brand a:hover { background: rgba(255,255,255,0.08); }

/* --- Diagonal color stripe nav area — fixed width, does not stretch --- */
.vhs-stripe-area {
  width: 500px;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  overflow: visible;
  position: relative;
}

/* --- Black separator: skewed to hug the teal bar's edge --- */
.vhs-tab-sep {
  flex: none;
  width: 10px;
  background: #111111;
  transform: skewX(35deg);
  flex-shrink: 0;
  z-index: 2;
  position: relative;
}

/* Subtle grain on stripes */
.vhs-stripe-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("img/vhs-texture.png");
  background-repeat: repeat;
  opacity: 0.08;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 5;
}

/* Each diagonal tab — parallelogram via skewX (\ direction, top-left to bottom-right) */
.vhs-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transform: skewX(35deg);
  position: relative;
  z-index: 1;
  transition: filter 0.15s ease;
}

/* Text: counter-skew + rotate to run diagonally along the stripe */
.vhs-tab span {
  display: inline-block;
  transform: skewX(-35deg) rotate(55deg);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: bold;
  letter-spacing: 0.8px;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.65);
}

.vhs-tab:hover         { filter: brightness(1.22); }
.vhs-tab:hover span    { text-decoration: underline; }
.vhs-tab.active        { filter: brightness(0.78); }
.vhs-tab.active span   { text-decoration: underline; }

/* --- Trapezoid cutout in center area — reveals body texture beneath --- */
.vhs-trapezoid {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 36px;
  background-color: var(--bg-dark);
  background-image: url("img/vhs-texture.png");
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.92;
  clip-path: polygon(8% 0%, 92% 0%, 100% 100%, 0% 100%);
  z-index: 4;
}

/* --- Profile pic (inside .vhs-left, below brand) --- */
.vhs-avatar {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  border: 2px solid #aaaaaa;
  flex-shrink: 0;
  background-color: #1a1a1a;
  background-image: url("img/home_page/profile_pic.jpg");
  background-size: cover;
  background-position: center top;
}

/* Tab / bar colors */
.tab-1 { background: #00bc8c; } /* teal    — writing      */
.tab-2 { background: #2346ba; } /* blue    — photography  */
.tab-3 { background: #c62899; } /* magenta — videography  */
.tab-4 { background: #f83f4d; } /* red     — journal      */
.tab-5 { background: #ff7635; } /* orange  — now          */
.tab-6 { background: #ffca34; } /* yellow  — about        */

/* Thin black separator bar between content and footer */
.vhs-separator {
  height: 4px;
  background-color: #10181f;
  width: 100%;
  flex-shrink: 0;
}

/* ============================================================
   VHS Sticky Label Footer
   ============================================================ */

.site-footer {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

/* --- Footer Top Bar (dark navy) --- */
.footer-top {
  background-color: var(--footer-bg);
  background-image:
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.048) 0px, rgba(255,255,255,0.048) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.048) 0px, rgba(255,255,255,0.048) 1px, transparent 1px, transparent 40px);
  display: flex;
  align-items: center;
  min-height: 80px;
  position: relative;
  overflow: hidden;
}

/* Grain overlay on footer top */
.footer-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("img/vhs-texture.png");
  background-repeat: repeat;
  opacity: 0.10;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}

/* Footer top children above overlay */
.footer-top .vhs-brand,
.footer-top-mid,
.vhs-footer-pic { position: relative; z-index: 3; }

/* Center section of footer top bar */
.footer-top-mid {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Three-line stripe icon */
.footer-stripe-icon {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-stripe-icon span {
  display: block;
  width: 40px;
  height: 5px;
}

.footer-stripe-icon span:nth-child(1) { background: #f83f4d; }
.footer-stripe-icon span:nth-child(2) { background: #1f49b7; }
.footer-stripe-icon span:nth-child(3) { background: #00bc8c; }

/* --- Footer pic — rounded square --- */
.vhs-footer-pic {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  flex-shrink: 0;
  align-self: center;
  margin: 0 14px 0 6px;
  background-color: #1a2a3a;
  background-image: url("img/home_page/footer_pic.jpg");
  background-size: cover;
  background-position: center;
}

/* --- Footer Label Middle (cream, ruled lines + paper texture) --- */
.footer-label {
  background-color: #ede9e3;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 27px,
      #282828 27px,
      #282828 28px
    );
  padding: 6px 28px;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

/* Paper / grain texture on ruled lines area */
.footer-label::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("img/vhs-texture.png");
  background-repeat: repeat;
  opacity: 0.07;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* Individual ruled-line content row */
.footer-ruled-line {
  position: relative;
  z-index: 2;
  height: 28px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.78em;
  color: #1a1a1a;
}

.footer-ruled-line a {
  color: #1a1a1a;
  text-decoration: none;
}

.footer-ruled-line a:hover { text-decoration: underline; }

/* --- Footer Rainbow Stripe (gradient OK, thicker) --- */
.footer-rainbow {
  width: 100%;
  height: 20px;
  background: linear-gradient(to right,
    #ffca34,
    #ff7635,
    #f83f4d,
    #c62899,
    #2346ba,
    #00bc8c
  );
  flex-shrink: 0;
}

/* --- Footer Bottom Bar (dark navy, "drawing with light") --- */
.footer-bottom {
  background-color: var(--footer-bg);
  background-image:
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.048) 0px, rgba(255,255,255,0.048) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.048) 0px, rgba(255,255,255,0.048) 1px, transparent 1px, transparent 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 65px;
  padding: 14px 24px;
  position: relative;
  overflow: hidden;
}

/* Grain overlay on footer bottom */
.footer-bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("img/vhs-texture.png");
  background-repeat: repeat;
  opacity: 0.10;
  mix-blend-mode: screen;
  pointer-events: none;
}

.footer-tagline {
  position: relative;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 2.2em;
  font-weight: bold;
  font-style: italic;
  letter-spacing: 4px;
}

/* ============================================================
   Content Wrapper
   ============================================================ */
.site-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
  flex: 1;
  width: 100%;
}

.content-box {
  background: var(--bg-content);
  padding: 28px 32px 32px;
}

/* --- Dividers --------------------------------------------- */
.dash-rule {
  border: none;
  color: var(--border);
  font-size: 0.75em;
  letter-spacing: 0.5px;
  overflow: hidden;
  white-space: nowrap;
  margin: 10px 0;
  user-select: none;
}

.dash-rule::before {
  content: "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -";
}

/* --- Post / Entry ----------------------------------------- */
.entry {
  margin-bottom: 40px;
}

.entry-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 6px;
}

.entry-title a {
  color: var(--text);
  text-decoration: none;
}

.entry-title a:hover {
  text-decoration: underline;
}

.entry-meta {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.entry-meta::before {
  content: "= ";
}

.entry-meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.entry-meta a:hover {
  text-decoration: underline;
}

.entry-content {
  margin-top: 10px;
}

.entry-content p {
  margin-bottom: 1em;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-footer {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-top: 8px;
}

.entry-footer::before {
  content: "= ";
}

.entry-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.entry-footer a:hover {
  text-decoration: underline;
}

/* --- Page Title ------------------------------------------- */
.page-title {
  font-size: 1.4em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* --- Comments / Leave a Comment link ---------------------- */
.comment-link {
  display: inline-block;
  font-size: 0.85em;
  text-align: right;
  width: 100%;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 6px;
}

.comment-link::before {
  content: ">_ ";
}

.comment-link:hover {
  color: var(--text);
}

/* --- Archive / Post List ---------------------------------- */
.archive-list {
  list-style: none;
  padding: 0;
}

.archive-list li {
  padding: 6px 0;
  border-bottom: 1px dotted var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.archive-list li:last-child {
  border-bottom: none;
}

.archive-list a {
  color: var(--link);
  text-decoration: none;
}

.archive-list a:visited {
  color: var(--link-visited);
}

.archive-list a:hover {
  text-decoration: underline;
}

.archive-date {
  color: var(--text-muted);
  font-size: 0.88em;
  white-space: nowrap;
}

/* --- Photography Grid ------------------------------------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.photo-item {
  position: relative;
  overflow: hidden;
  background: #e0e0e0;
  aspect-ratio: 1 / 1;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(0.85);
  transition: filter 0.2s ease;
}

.photo-item:hover img {
  filter: contrast(1.1) saturate(1);
}

.photo-caption {
  font-size: 0.78em;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 2px;
}

/* --- Journal / Scan Items --------------------------------- */
.journal-entry {
  margin-bottom: 32px;
}

.journal-entry img {
  max-width: 100%;
  border: 1px solid var(--border);
  display: block;
  margin-bottom: 8px;
  filter: sepia(0.15) contrast(1.05);
}

.journal-entry-meta {
  font-size: 0.82em;
  color: var(--text-muted);
}

.journal-entry-meta::before {
  content: "= ";
}

/* --- Video List ------------------------------------------- */
.video-list {
  list-style: none;
  padding: 0;
}

.video-item {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px dotted var(--border);
}

.video-item:last-child {
  border-bottom: none;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #111;
  margin-bottom: 10px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-title {
  font-weight: bold;
  font-size: 1.05em;
  margin-bottom: 4px;
}

.video-meta {
  font-size: 0.82em;
  color: var(--text-muted);
}

.video-meta::before {
  content: "= ";
}

/* --- Now Page --------------------------------------------- */
.now-section {
  margin-bottom: 28px;
}

.now-section h3 {
  font-size: 1em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  color: var(--accent);
}

.now-section h3::before {
  content: ">> ";
}

/* --- Links & Typography ----------------------------------- */
a {
  color: var(--link);
}

a:visited {
  color: var(--link-visited);
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: bold;
}

blockquote {
  border-left: 3px solid var(--border);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-muted);
  font-style: italic;
}

code, pre {
  font-family: var(--font-mono);
  background: #f4f4f4;
  padding: 2px 5px;
  font-size: 0.9em;
}

pre {
  padding: 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
}

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

/* --- Utility ---------------------------------------------- */
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 600px) {
  .site-header { min-height: 80px; }
  .vhs-brand a, .vhs-brand span {
    font-size: 1.0em;
    padding: 5px 8px;
  }
  .vhs-avatar {
    width: 60px;
    height: 60px;
  }
  .vhs-footer-pic {
    width: 68px;
    height: 68px;
    margin: 0 8px;
  }
  .vhs-tab span { font-size: 0.52em; letter-spacing: 0.4px; }
  .vhs-trapezoid { width: 140px; height: 22px; }
  .vhs-stripe-area { width: 320px; }
  .footer-tagline { font-size: 1.4em; letter-spacing: 2px; }
  .footer-label { padding: 6px 14px; }
  .footer-ruled-line { font-size: 0.68em; }
  .content-box { padding: 18px 16px 24px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
