/* ==========================================================================
   Mint Brutalist — Design System CSS
   Brutalist Bauhaus aesthetic for ploskonka.xyz
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Sans:ital,wght@0,400;0,700;1,400&family=Fira+Code:wght@400;700&display=swap');

/* ==========================================================================
   2.1 — Design Tokens (CSS Custom Properties)
   ========================================================================== */
:root {
  /* Colors — Primary Palette */
  --color-background: #111417;
  --color-surface: #1D2023;
  --color-primary: #46F1C5;
  --color-secondary: #FFB3B3;
  --color-tertiary: #FFD172;
  --color-accent: #005643;

  /* Colors — Text & Utility */
  --color-text: #E1E2E7;
  --color-text-muted: #85948D;
  --color-outline: #3B4A44;

  /* Colors — Extended */
  --color-error: #FFB4AB;
  --color-error-container: #93000A;
  --color-inverse-primary: #006B55;
  --color-surface-container-lowest: #0B0E11;
  --color-surface-container-low: #191C1F;
  --color-surface-container: #1D2023;
  --color-surface-container-high: #272A2E;
  --color-surface-container-highest: #323538;
  --color-surface-bright: #37393D;

  /* Typography — Font Families */
  --font-display: 'Archivo Black', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-code: 'Fira Code', monospace;

  /* Typography — Scale */
  --text-display: 56px;
  --text-h1: 48px;
  --text-h2: 32px;
  --text-h3: 24px;
  --text-body: 18px;
  --text-small: 14px;
  --text-code: 15px;
  --text-label: 12px;

  /* Spacing */
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 80px;
  --space-3xl: 120px;

  /* Layout */
  --content-max-width: 720px;
}

/* ==========================================================================
   2.3 — Base Reset & Global Typography
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400; /* Archivo Black only has one weight */
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

code, pre, kbd, samp {
  font-family: var(--font-code);
  font-size: var(--text-code);
}

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

::selection {
  background-color: var(--color-primary);
  color: var(--color-background);
}

/* ==========================================================================
   2.4 — Brutalist Component Styles
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-background);
  box-shadow: 4px 4px 0 var(--color-accent);
}

.btn-primary:hover {
  box-shadow: 6px 6px 0 var(--color-accent);
  transform: translate(-2px, -2px);
  color: var(--color-background);
}

.btn-primary:active {
  box-shadow: 2px 2px 0 var(--color-accent);
  transform: translate(0, 0);
}

.btn-sm {
  font-size: var(--text-small);
  padding: 8px 20px;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-outline);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Form Inputs */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background-color: var(--color-background);
  border: 2px solid var(--color-accent);
  border-radius: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  padding: var(--space-sm);
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Section Dividers */
.section-divider {
  border: none;
  height: 2px;
  background-color: var(--color-outline);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background-color: rgba(17, 20, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-outline);
}

.site-header .wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.site-header .wordmark:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.site-header .nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.site-header .nav-links a {
  font-family: var(--font-display);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header .nav-links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.site-header .hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.site-header .hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: background-color 0.2s ease;
}

.site-header .hamburger:hover span {
  background-color: var(--color-primary);
}

@media (max-width: 780px) {
  .site-header .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: rgba(17, 20, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-outline);
    padding: var(--space-md);
    gap: var(--space-sm);
  }

  .site-header .nav-links.nav-open {
    display: flex;
  }

  .site-header .hamburger {
    display: flex;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-outline);
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-small);
}

.site-footer .footer-copyright {
  font-family: var(--font-display);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.site-footer .footer-links {
  display: flex;
  gap: var(--space-sm);
}

.site-footer .footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-small);
  transition: color 0.2s ease;
}

.site-footer .footer-links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

@media (max-width: 780px) {
  .site-footer {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

/* ==========================================================================
   Post Page — Single Post Layout
   ========================================================================== */

/* Post Container */
.post {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* Post Header */
.post-header {
  margin-bottom: var(--space-xl);
}

.post-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-code);
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.meta-dot {
  color: var(--color-primary);
}

.post-accent-line {
  height: 3px;
  width: 60px;
  background-color: var(--color-primary);
  margin-top: var(--space-sm);
}

/* ==========================================================================
   Post Body Typography
   ========================================================================== */
.post-body p {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  text-transform: uppercase;
  position: relative;
  padding-left: var(--space-md);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.post-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: var(--color-tertiary);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  text-transform: uppercase;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.post-body pre {
  background-color: var(--color-surface);
  border-left: 3px solid var(--color-primary);
  font-family: var(--font-code);
  font-size: var(--text-code);
  padding: var(--space-sm);
  border-radius: 0;
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

.post-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.post-body code {
  background-color: var(--color-surface);
  font-family: var(--font-code);
  padding: 2px 4px;
  font-size: var(--text-code);
}

.post-body blockquote {
  border-left: 3px solid var(--color-secondary);
  padding-left: var(--space-md);
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.post-body ul,
.post-body ol {
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

.post-body ul li::marker {
  color: var(--color-tertiary);
}

.post-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.post-body a {
  color: var(--color-primary);
  text-decoration: none;
}

.post-body a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */
.toc {
  border-left: 3px solid var(--color-primary);
  padding: var(--space-md);
  margin-bottom: var(--space-xl);
  background-color: var(--color-surface);
}

.toc h2 {
  font-family: var(--font-display);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.toc h2::before {
  display: none;
}

.toc a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc a:hover {
  color: var(--color-primary);
}

.toc ul {
  list-style: none;
  padding-left: var(--space-sm);
}

.toc li {
  margin-bottom: 8px;
  font-size: var(--text-small);
}

/* ==========================================================================
   Post Footer
   ========================================================================== */
.post-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-outline);
}

.back-link {
  display: inline-block;
  font-family: var(--font-code);
  font-size: var(--text-small);
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: color 0.2s ease;
}

.back-link:hover {
  text-decoration: underline;
}

.post-cta {
  background-color: var(--color-surface);
  padding: var(--space-lg);
}

.post-cta-heading {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.post-cta-form {
  display: flex;
  gap: var(--space-sm);
  align-items: stretch;
}

.post-cta-input {
  flex: 1;
}

.post-cta-btn {
  white-space: nowrap;
}

/* ==========================================================================
   Post Page — Responsive (≤780px)
   ========================================================================== */
@media (max-width: 780px) {
  .post-title {
    font-size: 30px;
    line-height: 1.1;
  }

  .post-accent-line {
    width: 40%;
  }

  .post-body p {
    font-size: 16px;
  }

  .post-body h2 {
    font-size: 24px;
  }

  .post-cta-form {
    flex-direction: column;
  }

  .post-cta-form .post-cta-input,
  .post-cta-form .post-cta-btn {
    width: 100%;
  }
}

/* ==========================================================================
   3.0 — Homepage: Hero Section
   ========================================================================== */
.hero {
  width: 100%;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
  align-items: center;
}

.hero-text {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 110px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--color-text);
}

.hero h1 .highlight {
  color: var(--color-primary);
}

.hero .subtitle {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 24px);
  color: var(--color-text-muted);
  max-width: 540px;
  line-height: 1.6;
}

.hero-photo {
  grid-column: span 4;
  display: flex;
  justify-content: center;
  position: relative;
}

.author-photo {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 4px solid var(--color-accent);
  box-shadow: 10px 10px 0 var(--color-accent);
  overflow: hidden;
}

.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero Background Warm Glow (top-left) */
.hero::before {
  content: "";
  position: absolute;
  width: 384px;
  height: 384px;
  background-color: var(--color-tertiary);
  opacity: 0.2;
  filter: blur(48px);
  border-radius: 50%;
  top: -80px;
  left: -80px;
  pointer-events: none;
}

/* Hero Gold Circle (mid-right area) */
.hero::after {
  content: "";
  position: absolute;
  width: 256px;
  height: 256px;
  background-color: var(--color-tertiary);
  opacity: 0.9;
  border-radius: 50%;
  top: 25%;
  right: 25%;
  pointer-events: none;
  display: block;
}

/* Hero Photo Decorative Elements */
.hero-glow {
  display: none;
}

.hero-shape {
  position: absolute;
  width: 96px;
  height: 96px;
  background-color: var(--color-secondary);
  bottom: -24px;
  left: -24px;
  z-index: 1;
  pointer-events: none;
}

.hero-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--color-accent);
}

/* ==========================================================================
   3.05 — Homepage: Offering Section
   ========================================================================== */
.offering {
  padding: var(--space-3xl) 0 var(--space-xl) 0;
}

.offering .section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.offering .section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.offering .section-line {
  flex-grow: 1;
  height: 4px;
  background-color: var(--color-primary);
}

.offering-subtitle {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 24px);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: var(--space-xl);
}

.offering-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.offering-card {
  background-color: var(--color-surface);
  padding: var(--space-lg);
  border-top: 3px solid var(--color-primary);
}

.offering-card--teal {
  border-top-color: var(--color-primary);
}

.offering-card--coral {
  border-top-color: var(--color-secondary);
}

.offering-card--gold {
  border-top-color: var(--color-tertiary);
}

.offering-card-number {
  font-family: var(--font-code);
  font-size: var(--text-label);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: var(--space-sm);
}

.offering-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.offering-card p {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.offering-footer {
  text-align: center;
}

.offering-risk {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   3.1 — Homepage: Post List Section
   ========================================================================== */
.post-list {
  padding: var(--space-3xl) 0;
}

.post-list .section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.post-list .section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.post-list .section-line {
  flex-grow: 1;
  height: 4px;
  background-color: var(--color-primary);
}

.post-rows {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--color-outline);
}

.post-row {
  display: grid;
  grid-template-columns: 2fr 8fr 2fr;
  align-items: center;
  padding: var(--space-lg) var(--space-sm);
  border-bottom: 2px solid var(--color-outline);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.post-row:hover {
  background-color: var(--color-surface-container-low);
  text-decoration: none;
}

.post-row .post-date {
  font-family: var(--font-code);
  font-size: var(--text-small);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.post-row .post-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 32px);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.post-row:hover .post-title {
  color: var(--color-primary);
}

.post-row .post-arrow {
  font-size: 28px;
  color: var(--color-text-muted);
  text-align: right;
  transition: color 0.2s ease;
}

.post-row:hover .post-arrow {
  color: var(--color-primary);
}

.post-list-footer {
  margin-top: var(--space-xl);
  text-align: center;
}

.post-list-view-all {
  font-family: var(--font-code);
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 4px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-list-view-all:hover {
  color: var(--color-tertiary);
  border-color: var(--color-tertiary);
  text-decoration: none;
}

/* ==========================================================================
   3.2 — Homepage: Contact Section
   ========================================================================== */
.contact-section {
  background-color: var(--color-surface);
  padding: var(--space-3xl) 0;
  border-top: 4px solid var(--color-accent);
  border-bottom: 4px solid var(--color-accent);
}

.contact-grid {
  max-width: 1280px;
  margin: 0 auto;
}

.contact-info {
  position: relative;
}

.contact-accent-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-secondary);
}

.contact-info-inner {
  padding-left: 40px;
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 72px);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.contact-description {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
  max-width: 28rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-code);
  font-size: var(--text-body);
  color: var(--color-primary);
}

.contact-icon {
  font-size: 20px;
}

/* ==========================================================================
   3.3 — Homepage: Responsive (Mobile <= 780px)
   ========================================================================== */
@media (max-width: 780px) {
  /* Hero */
  .hero {
    min-height: auto;
    padding: var(--space-xl) 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-text {
    grid-column: span 1;
    text-align: left;
  }

  .hero-photo {
    grid-column: span 1;
    order: -1;
  }

  .author-photo {
    width: 240px;
  }

  .hero::after {
    display: none;
  }

  .hero-shape {
    display: none;
  }

  .hero .btn {
    width: 100%;
    text-align: center;
  }

  /* Offering */
  .offering {
    padding: var(--space-xl) 0;
  }

  .offering-grid {
    grid-template-columns: 1fr;
  }

  .offering-footer .btn {
    width: 100%;
    text-align: center;
  }

  /* Post List */
  .post-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: var(--space-md) var(--space-sm);
  }

  .post-row .post-date {
    order: -1;
  }

  .post-row .post-arrow {
    display: none;
  }

  /* Contact */
  .contact-section {
    padding: var(--space-xl) 0;
  }

  .contact-info-inner {
    padding-left: var(--space-md);
  }
}
