/*
Theme Name: IDM401 Assignments
Theme URI: https://idm401.rockyarcaroworks.com
Author: Rocky Arcaro
Description: Minimal theme for weekly assignment posts.
Version: 1.0.0
Text Domain: idm401-assignments
*/

:root{--fg:#111;--muted:#667085;--maxw:900px;}
*{box-sizing:border-box}
body{margin:0;font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--fg)}
.container{max-width:var(--maxw);margin:0 auto;padding:24px 16px}
a{color:#2563eb;text-decoration:none}
a:hover{text-decoration:underline}
header.site-header{border-bottom:1px solid #eee}
header .brand{font-weight:700;font-size:1.25rem;padding:14px 0}
.post-list{display:grid;gap:16px;margin:24px 0}
.post-card{padding:16px;border:1px solid #eee;border-radius:12px}
.post-card h2{margin:0 0 6px;font-size:1.25rem}
.meta{color:var(--muted);font-size:.9rem;margin-bottom:8px}
footer.site-footer{border-top:1px solid #eee;color:var(--muted)}
.pagination{display:flex;gap:8px;align-items:center;margin:24px 0}
.pagination .prev,.pagination .next{padding:8px 12px;border:1px solid #ddd;border-radius:10px}

/* ============== Brand tokens (edit these!) ============== */
:root {
  --font-brand: 'DELIRIUM', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Colors */
  --bg: #ffffff;
  --fg: #0f172a;          /* dark navy/ink */
  --muted: #64748b;       /* slate */
  --accent: #2563eb;      /* brand blue */
  --accent-ink: #0b3ea2;  /* hover/darker */
  --card: #ffffff;
  --border: #e5e7eb;

  /* Layout */
  --maxw: 960px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 28px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
}

/* ============== Base ============== */
* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font-brand);
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-3); }

a { color: var(--accent); text-decoration: none }
a:hover { color: var(--accent-ink); text-decoration: underline }

img, video { max-width: 100%; height: auto; border-radius: 10px }

/* ============== Header ============== */
.site-header { border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 10; }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 14px 0; }
.brand { display: flex; gap: var(--space-3); align-items: center; }
.brand img { height: 36px; width: auto; }
.brand .title { font-weight: 700; letter-spacing: .2px; }

.custom-logo,
.brand img {
  height: auto;
  width: auto;
  max-width: 100%;      /* don’t overflow container */
  max-height: 12vw;     /* scales with viewport width */
}

/* Optional: set sensible caps so it’s never too small or too huge */
@media (min-width: 1200px) {
  .custom-logo,
  .brand img {
    max-height: 200px;   /* cap on very large screens */
  }
}
@media (max-width: 480px) {
  .custom-logo,
  .brand img {
    max-height: 48px;   /* minimum size for small phones */
  }
}

.brand {
  display: flex;
  flex-direction: column;   /* stack vertically */
  align-items: center;      /* center horizontally */
  text-align: center;
  gap: 8px;                 /* space between logo and title */
}


.site-header .inner {
  display: flex;
  flex-direction: column;   /* stack brand and nav vertically */
  align-items: center;
}

.brand .title {
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: center;
  margin-top: 0.5rem;
  font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
  color:black;
  /* clamp(min, fluid scaling, max) */
}

/* ============== Buttons ============== */
.button, .wp-block-button__link {
  display: inline-block;
  padding: 10px 14px; border-radius: 999px; background: var(--accent); color: #fff; box-shadow: var(--shadow);
}
.button:hover, .wp-block-button__link:hover { background: var(--accent-ink); text-decoration: none }

/* ============== Cards/List ============== */
.post-list { display: grid; gap: var(--space-4); padding: var(--space-5) 0; }
.post-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); box-shadow: var(--shadow); }
.post-card h2 { margin: 0 0 6px; font-size: 1.25rem; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: var(--space-2); }

/* ===== Cards & Grid ===== */
.post-grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:20px;
  padding:24px 0;
}
.post-card{
  grid-column:span 12;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--border, #e5e7eb);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .18s ease, box-shadow .18s ease;
}
.post-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}
.post-card .thumb-wrap{
  position:relative;
  overflow:hidden;
  background:#f6f7f9;
}
.post-card .thumb{
  width:100%;
  aspect-ratio:16/9;     /* modern browsers */
  object-fit:cover;
  display:block;
}
.post-card .body{
  padding:16px;
}
.post-card h2{
  margin:0 0 6px;
  font-size:1.20rem;
  line-height:1.25;
}
.post-card .meta{
  display:flex; flex-wrap:wrap; gap:10px;
  color:var(--muted, #667085);
  font-size:.9rem; margin-bottom:8px;
}
.post-card .excerpt{ margin:8px 0 10px; color:#0f172a; }
.post-card .chips{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.post-card .chip{
  font-size:.78rem; padding:4px 8px; border-radius:999px;
  background:#f1f5ff; color:#1741c5; border:1px solid #dbe6ff;
}
.post-card .actions{ margin-top:auto; padding:0 16px 16px; }
.post-card .button{
  display:inline-block; padding:10px 14px; border-radius:10px;
  background:var(--accent, #2563eb); color:#fff; text-decoration:none;
}

/* Responsive columns */
@media (min-width: 640px){ .post-card{ grid-column:span 6; } }
@media (min-width: 1024px){ .post-card{ grid-column:span 4; } }

/* ===== Single post ===== */
.article{
  background:#fff; border:1px solid var(--border,#e5e7eb);
  border-radius:14px; padding:20px; box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.article .hero{
  margin:-20px -20px 16px; overflow:hidden; border-radius:14px 14px 0 0;
}
.article .hero img{ width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.article .meta{ color:var(--muted,#667085); font-size:.95rem; margin:6px 0 12px; }
.article .content{ line-height:1.75; }
.article .content img, .article .content video{ max-width:100%; height:auto; border-radius:10px; }
.article .chips{ display:flex; gap:8px; flex-wrap:wrap; margin:12px 0 0; }
.article .chip{ font-size:.78rem; padding:4px 8px; border-radius:999px; background:#f6f7f9; border:1px solid #e5e7eb; }

/* Prev/Next navigation */
.post-nav{
  display:flex; justify-content:space-between; gap:12px; margin-top:20px;
}
.post-nav a{
  flex:1; display:block; padding:12px; border:1px solid #e5e7eb; border-radius:10px;
  text-decoration:none; color:#0f172a; background:#fff;
}
.post-nav a:hover{ background:#f8fafc; }

/* Optional: clamp title size responsively */
h1.entry-title{
  font-size:clamp(1.4rem, 2.5vw + .5rem, 2.2rem);
  line-height:1.2; margin:0 0 6px;
}

/* ===== Black & White Card Style with Hover ===== */
.post-card {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 6px 6px 0 #000;    /* black shadow always on */
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}

.post-card:hover {
  transform: scale(1.02);        /* slight enlargement */
  box-shadow: 6px 6px 0 #000;    /* re-apply shadow on hover */
}

/* Thumbnail */
.post-card .thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid #000;
}

/* Card body text */
.post-card .body {
  padding: 16px;
  color: #000;
}
.post-card h2,
.post-card h2 a,
.post-card .meta,
.post-card .excerpt,
.post-card .chip {
  color: #000;
}

/* Chips */
.post-card .chip {
  font-size: .78rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #000;
  background: #fff;
}

/* Button */
.post-card .button {
  display: inline-block;
  margin-top: auto;
  padding: 8px 14px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 600;
  color: #000;
}
.post-card .button:hover {
  background: #000;
  color: #fff;
}

/* ===== Global Typography ===== */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: #000;
}

/* Headings: Montserrat, bold hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  line-height: 1.25;
  color: #000;
}

/* Hierarchy sizing (fluid with clamp) */
h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);   /* ~32–44px */
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);    /* ~24–32px */
}
h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem); /* ~20–24px */
}
h4 {
  font-size: clamp(1.1rem, 2vw, 1.25rem); /* ~18–20px */
}
h5 {
  font-size: 1rem; /* ~16px */
  font-weight: 600;
}
h6 {
  font-size: 0.9rem; /* ~14px */
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Paragraphs */
p {
  margin: 1em 0;
}

/* Links */
.article a,
.post-card a {
  color: #000;
  text-decoration: underline;
}
.article a:hover,
.post-card a:hover {
  background: #000;
  color: #fff;
}

/* Lists */
ul, ol {
  margin: 1em 0 1em 1.5em;
  padding: 0;
}
li {
  margin: 0.5em 0;
  font-size: 1rem;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid #000;
  padding-left: 1em;
  margin: 1.5em 0;
  font-style: italic;
  color: #333;
}

/* ============== Post content ============== */
.content { padding-top: var(--space-2); }
.content h2,h3,h4 { margin-top: 1.3em; margin-bottom: .5em; }
.content p, .content li { max-width: 70ch; }

.back-button {
  margin: 16px 0;
}

.back-button a {
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 600;
}

.back-button a:hover {
  background: #000;
  color: #fff;
}

/* ============== Footer ============== */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); margin-top: var(--space-5); }
.site-footer .inner { padding: var(--space-4) 0; }