/* VIENNA DESIGN WEEK vibe: searing yellow, black text, huge type, rigid grid */
:root{
  --vdw-yellow: #ffffff;
  --ink: #111;
  --ink-dim: #555;
  --bg: #ffffff;
  --gap: 1.25rem;
  --container: 1080px;
}

body {
  background: #ffffff !important;
}

/* Dark mode colors */
[data-theme="dark"]{
  --vdw-yellow: #1a1a1a;
  --ink: #e0e0e0;
  --ink-dim: #999;
  --bg: #0d0d0d;
}

[data-theme="dark"] body {
  background: #0d0d0d !important;
}

/* Base */
*{ box-sizing: border-box }
html, body{ margin: 0; padding: 0 }
html{
  height: 100%;
}
body{
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(1rem, 5vw, 4rem); /* responsive horizontal padding */
  padding-block: 2rem;                     /* vertical breathing room */
}

/* Reduced padding for header container */
.vdw-header .container {
  padding-block: 1rem;
}

/* Header & Footer */
.vdw-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 3px solid var(--ink);
  width: 100%;
  margin: 0;
  box-shadow: 0 4px 0px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .vdw-header{
  box-shadow: 0 4px 0px rgba(255, 255, 255, 0.1);
}

.vdw-header .brand{
  font-weight: 900;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  display: inline-block;
  margin-bottom: 0.25rem;
  font-family: monospace;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .vdw-header .brand{
  text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.1);
}
.header-bottom{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}
.vdw-header .nav{
  display: flex;
  gap: 1rem;
}
.vdw-header .nav a{
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  border-bottom: 3px solid transparent;
  font-family: monospace;
  font-size: 1.1rem;
  transition: all 0.1s ease;
  padding: 0.35rem 0.75rem;
  background: transparent;
}
.vdw-header .nav a:hover{
  background: var(--ink);
  color: var(--bg);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .vdw-header .nav a:hover{
  box-shadow: 2px 2px 0px rgba(255, 255, 255, 0.2);
}

/* Main content area */
main{
  flex: 1;
}

/* Search Form in Header */
.search-form{
  display: flex;
  align-items: stretch;
  border: 3px solid #000;
  background: #f5f5f5;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
  transition: all 0.1s ease;
}

[data-theme="dark"] .search-form{
  background: #2a2a2a;
  border-color: #e0e0e0;
  box-shadow: 4px 4px 0px rgba(255, 255, 255, 0.1);
}

.search-form:focus-within{
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .search-form:focus-within{
  box-shadow: 5px 5px 0px rgba(255, 255, 255, 0.15);
}

.search-input{
  border: none;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  background: transparent;
  outline: none;
  width: 160px;
  color: var(--ink);
  font-family: monospace;
}
.search-input::placeholder{
  color: var(--ink-dim);
  font-weight: 700;
  opacity: 0.6;
}
.search-input:focus{
  background: transparent;
}
.search-button{
  border: none;
  border-left: 3px solid #000;
  background: transparent;
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

[data-theme="dark"] .search-button{
  border-left-color: #e0e0e0;
}

.search-button:hover{
  background: var(--ink);
  color: var(--bg);
}
.search-button svg{
  display: block;
}

@media (max-width: 700px){
  .header-bottom{
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .search-form{
    width: 100%;
  }
  .search-input{
    flex: 1;
  }
}

.vdw-footer{
  margin-top: 4rem;
  padding: 1rem 0;
  border-top: 3px solid var(--ink);
  background: var(--bg);
  box-shadow: 0 -4px 0px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .vdw-footer{
  box-shadow: 0 -4px 0px rgba(255, 255, 255, 0.1);
}
.vdw-footer .container {
  padding-block: 0;
}
.footer-content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 0;
}
.footer-content p{
  margin: 0;
}
.social-links{
  display: flex;
  gap: 1rem;
  order: -1;
}
.social-links a{
  color: var(--ink);
  text-decoration: none;
  transition: opacity .2s ease;
  display: flex;
  align-items: center;
}
.social-links a:hover{
  opacity: 0.7;
}
[data-theme="dark"] .social-links a{
  color: #b0b0b0;
}
.dark-mode-toggle{
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .1s ease;
  line-height: 1;
}
.dark-mode-toggle:hover{
  background: var(--ink);
  color: var(--bg);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .dark-mode-toggle:hover{
  box-shadow: 2px 2px 0px rgba(255, 255, 255, 0.2);
}
.dark-mode-toggle svg{
  display: block;
}
/* Show sun in dark mode, moon in light mode */
[data-theme="light"] .sun-icon{
  display: none;
}
[data-theme="dark"] .moon-icon{
  display: none;
}
@media (max-width: 700px){
  .footer-content{
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .social-links{
    order: 0;
  }
}

/* Page Headers */
.page-header{
  padding-top: 0;
  margin-bottom: 1.5rem;
}
.page-title{
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  margin: 0 0 1rem 0;
  font-weight: 900;
  text-transform: uppercase;
}
.hero{
  padding-block: 2.5rem;
  border-bottom: 3px solid var(--ink);
}
.shout{
  font-size: clamp(2.25rem, 7vw, 5rem);
  line-height: .95;
  margin: 0 0 .5rem 0;
  font-weight: 900;
  text-transform: uppercase;
}
.tagline{ font-weight: 700; font-size: 1.1rem }
.intro{
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.intro + section{
  margin-top: 0 !important;
}
.intro p{ max-width: 70ch }

/* Grid helpers */
.grid{ display: grid }
.grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)) }
.gap{ gap: var(--gap) }
@media (max-width: 800px){
  .grid-2{ grid-template-columns: 1fr }
}

/* Cards */
.card{
  border: 3px solid var(--ink);
  padding: 1rem;
  background: var(--vdw-yellow);
  transition: transform .06s ease, background .2s ease;
}
.card:hover{
  transform: translate(-2px, -2px);
  background: #fff176;
}
[data-theme="dark"] .card:hover{
  background: #1e3a5f;
}
.card-link{ color: inherit; text-decoration: none; display: block }
.card-title{
  margin: 0 0 .25rem 0;
  font-size: 1.75rem;
  font-weight: 900;
  text-transform: uppercase;
}
.card-lead{ margin: .25rem 0 .5rem 0; font-weight: 700 }
.meta{ color: var(--ink-dim); font-weight: 700 }

/* Article & Blog Post */
.article-head{
  border-bottom: 3px solid var(--ink);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}
.post-header h1,
.blog-post h1{
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  margin: 0 0 .5rem 0;
  font-weight: 900;
  text-transform: uppercase;
  max-width: 70ch;
}
.post-header{
  max-width: 70ch;
}
.post-hero{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  object-fit: contain;
}
.post-body h2,
.prose h2{
  font-size: 1.75rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 2rem 0 .75rem 0;
  line-height: 1.1;
}
.post-body h3,
.prose h3{
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 1.5rem 0 .5rem 0;
  line-height: 1.2;
}
.post-body p,
.prose p{
  font-size: 1.1rem;
  line-height: 1.6;
  margin: .75rem 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.post-body,
.post-body p,
.post-body h2,
.post-body h3,
.post-body ul,
.post-body ol,
.comments-section,
.post-navigation{
  max-width: 70ch;
}
.post-body{
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 2000px) {
  .post-body,
  .comments-section,
  .post-navigation{
    max-width: 80%;
  }
}

@media (max-width: 1600px) {
  .post-body,
  .comments-section,
  .post-navigation{
    max-width: 90%;
  }
}

@media (max-width: 1200px) {
  .post-body,
  .comments-section,
  .post-navigation{
    max-width: 100%;
  }
}
.post-body ul,
.post-body ol,
.prose ul,
.prose ol{
  margin: .75rem 0;
  padding-left: 1.5rem;
}
.post-body li,
.prose li{
  font-size: 1.1rem;
  margin: .35rem 0;
  line-height: 1.6;
}
.post-body strong,
.prose strong{
  font-weight: 900;
}
.post-body a,
.prose a{
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.post-body a:hover,
.prose a:hover{
  background: var(--vdw-yellow);
}

/* Code blocks */
.post-body pre,
.prose pre{
  border: none;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  background: #f8f8f8 !important;
  border-radius: 0;
  width: fit-content;
  max-width: 100%;
}
.post-body pre code,
.prose pre code{
  color: #2d2d2d;
}

/* Dark mode - dark background */
[data-theme="dark"] .post-body pre,
[data-theme="dark"] .prose pre{
  background: #1e1e1e !important;
}
[data-theme="dark"] .post-body pre code,
[data-theme="dark"] .prose pre code{
  color: #e0e0e0;
}
.post-body code,
.prose code{
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}
.post-body pre code,
.prose pre code{
  background: transparent;
  padding: 0;
  border: none;
}
.post-body :not(pre) > code,
.prose :not(pre) > code{
  background: var(--vdw-yellow);
  padding: 0.2em 0.4em;
  border: 2px solid var(--ink);
  font-weight: 600;
}
[data-theme="dark"] .post-body :not(pre) > code,
[data-theme="dark"] .prose :not(pre) > code{
  background: #2a2a2a;
  border-color: #555;
}
.lead{ font-weight: 700; font-size: 1.25rem; max-width: 70ch; line-height: 1.5 }
.post-header .lead{ max-width: 70ch }
.prose figure{ margin: 1.5rem 0 }
.prose img{
  width: 100%;
  height: auto;
  display: block;
  border: 3px solid var(--ink);
}

/* Blog post container */
.blog-post{
  position: relative;
}

/* Share buttons to the right of blog post */
.blog-post .share-buttons{
  position: absolute;
  left: calc(100% - 1.5rem);
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.share-label{
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.9rem;
}
.share-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: transform .06s ease, background .2s ease;
}
.share-button:hover{
  transform: translate(-2px, -2px);
  background: #fff176;
}
[data-theme="dark"] .share-button:hover{
  background: #1e3a5f;
}
.share-button svg{
  width: 20px;
  height: 20px;
}

/* Comments section */
.comments-section{
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px solid var(--ink);
}
.comments-title{
  font-size: 1.75rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 1.5rem 0;
  line-height: 1.1;
}
/* Utterances iframe styling */
.utterances{
  width: 100%;
  max-width: 100%;
}

/* Post navigation */
.post-navigation{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  margin-bottom: -4rem;
}
.nav-link{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 3px solid var(--ink);
  background: var(--vdw-yellow);
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  transition: transform .06s ease, background .2s ease;
}
.nav-link:hover:not(.nav-disabled){
  transform: translate(-2px, -2px);
  background: #fff176;
}

/* Dark mode navigation hover */
[data-theme="dark"] .nav-link:hover:not(.nav-disabled){
  background: #1e3a5f;
}
.nav-arrow{
  font-size: 1.5rem;
  line-height: 1;
}
.nav-disabled{
  visibility: hidden;
}

/* Blog index cards */
.post-list{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.post-item{
  border: 3px solid var(--ink);
  background: var(--vdw-yellow);
  transition: transform .06s ease, background .2s ease;
  display: flex;
  flex-direction: column;
}
.post-item:hover{
  transform: translate(-2px, -2px);
  background: #fff176;
}
[data-theme="dark"] .post-item:hover{
  background: #1e3a5f;
}
.post-link{
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
}
.post-title{
  margin: 0 0 .25rem 0;
  font-weight: 900;
  font-size: 1.25rem;
  text-transform: uppercase;
}
.post-intro{ color: var(--ink-dim); margin-top: .25rem; font-weight: 700; margin-bottom: 1rem }
.post-thumb{
  width: 100%;
  height: auto;
  display: block;
  border: 3px solid var(--ink);
  margin-top: auto;
}
.muted{ color: var(--ink-dim); font-size: .9rem; margin-bottom: .5rem; font-weight: 700 }

/* Blog grid layout (main + sidebar) */
.blog-index{
  padding-top: 2rem;
}
.blog-grid{
  display: grid;
  grid-template-columns: 1fr 280px; /* main | sidebar */
  gap: 2.5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.blog-main{ min-width: 0 }

/* Blog header with RSS link */
.blog-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.rss-link{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 3px solid var(--ink);
  background: var(--vdw-yellow);
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: transform .06s ease, background .2s ease;
  white-space: nowrap;
}
.rss-link:hover{
  transform: translate(-2px, -2px);
  background: #fff176;
}
[data-theme="dark"] .rss-link:hover{
  background: #1e3a5f;
}
.rss-link svg{
  flex-shrink: 0;
}

.blog-sidebar{
  border-left: 3px solid var(--ink);
  padding-left: 1.5rem;
}

/* RSS link in sidebar */
.rss-link-sidebar{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  width: 100%;
  justify-content: center;
}

/* Sidebar contents */
.sidebar-title{
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: .75rem;
}
.sidebar-list{
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li{ margin-bottom: .4rem }
.sidebar-list a{
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.sidebar-list a:hover{ text-decoration: underline }

/* Responsive (phones) */
@media (max-width: 700px){
  .blog-grid{ grid-template-columns: 1fr }
  .blog-sidebar{
    border-left: none;
    padding-left: 0;
    position: static;
    margin-top: 2rem;
  }
}

/* About Me Page */
.aboutme{
  padding: 0;
}
.aboutme__grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(1rem, 5vw, 4rem);
  padding-top: 2rem;
}
.aboutme__photo{
  position: sticky;
  top: 2rem;
}
.aboutme__img{
  width: 100%;
  height: auto;
  display: block;
  border: 3px solid var(--ink);
}
@media (max-width: 800px){
  .aboutme__grid{
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .aboutme__photo{
    position: static;
  }
  .aboutme__img{
    max-width: 320px;
  }
}

/* Contact Form */
form.grid.gap{
  max-width: 780px;
  margin: 2rem 0 4rem;
  display: grid;
  gap: 1.25rem;
}
form.grid.gap .field{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: .5rem 1rem;
  align-items: start;
}
form.grid.gap .field .meta{
  font-weight: 900;
  justify-self: end;
  line-height: 2.2;
  text-transform: uppercase;
  font-size: 0.9rem;
}
form.grid.gap input[type="text"],
form.grid.gap input[type="email"],
form.grid.gap input[type="tel"],
form.grid.gap input[type="url"],
form.grid.gap select,
form.grid.gap textarea{
  width: 100%;
  border: 3px solid var(--ink);
  padding: .75rem .9rem;
  font: inherit;
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .2s ease;
}
form.grid.gap input[type="text"]:focus,
form.grid.gap input[type="email"]:focus,
form.grid.gap input[type="tel"]:focus,
form.grid.gap input[type="url"]:focus,
form.grid.gap select:focus,
form.grid.gap textarea:focus{
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
form.grid.gap textarea{
  min-height: 150px;
  resize: vertical;
}
form.grid.gap button[type="submit"]{
  border: 3px solid var(--ink);
  background: var(--vdw-yellow);
  padding: 1rem 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform .06s ease, background .2s ease;
  width: auto;
  min-width: 150px;
  margin-left: calc(160px + 1rem);
}
form.grid.gap button[type="submit"]:hover{
  transform: translate(-2px, -2px);
  background: #fff176;
}
[data-theme="dark"] form.grid.gap button[type="submit"]:hover{
  background: #1e3a5f;
}
@media (max-width: 640px){
  form.grid.gap .field{
    grid-template-columns: 1fr;
  }
  form.grid.gap .field .meta{
    justify-self: start;
    line-height: 1.2;
  }
  form.grid.gap button[type="submit"]{
    margin-left: 0;
    width: 100%;
  }
}