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

:root {
  --color-bg: #faf9f7;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-accent: #2c5f2e;
  --color-accent-light: #e8f0e8;
  --color-border: #e0ddd8;
  --font-body: 'Georgia', serif;
  --font-ui: system-ui, -apple-system, sans-serif;
  --max-width: 960px;
  --gap: 2rem;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 600;
  line-height: 1.25;
}

/* ===== Layout ===== */
.site-wrapper {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1; }

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
  background: var(--color-bg);
}

.site-header .site-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; color: var(--color-accent); }

.site-logo span {
  color: var(--color-accent);
}

/* ===== Nav ===== */
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active { color: var(--color-accent); text-decoration: none; }

/* ===== Hero ===== */
.page-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 700px;
}

.page-hero .subtitle {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 600px;
}

/* ===== Page content ===== */
.page-content {
  padding: var(--gap) 0;
}

.page-content > * + * { margin-top: 1.5rem; }

.page-content h2 {
  font-size: 1.375rem;
  margin-top: 2.5rem;
}

.page-content h3 {
  font-size: 1.125rem;
  margin-top: 2rem;
}

.page-content p { max-width: 700px; }

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-muted);
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: normal;
}

/* ===== Home sections ===== */
.home-intro {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-border);
}

.home-intro h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 720px;
}

.home-intro p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  max-width: 620px;
  color: var(--color-muted);
}

.home-section {
  padding: var(--gap) 0;
  border-bottom: 1px solid var(--color-border);
}

.home-section h2 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

/* Projects grid */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.project-card {
  background: var(--color-bg);
  padding: 1.5rem;
  flex: 1 1 260px;
  transition: background 0.2s;
}

.project-card:hover { background: var(--color-accent-light); }

.project-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.project-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-card a:hover { text-decoration: none; }

/* Partners */
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.partners-group h3 {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

.partners-group ul { list-style: none; }
.partners-group li { font-size: 0.875rem; }

/* ===== Blog list ===== */
.blog-container { padding: var(--gap) 0; }

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.blog-card {
  background: var(--color-bg);
  padding: 1.25rem 1.5rem;
  transition: background 0.2s;
}

.blog-card:hover { background: var(--color-accent-light); }

.blog-title { font-size: 1rem; font-weight: 600; }
.blog-title a { color: var(--color-text); }
.blog-preview p { font-size: 0.875rem; color: var(--color-muted); margin-top: 0.375rem; }

/* ===== Article (romlicontainer) ===== */
.page-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--color-border); }
.page-header h1 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }

.romlicontainer {
  padding: var(--gap) 0;
  max-width: 720px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: auto;
}

.site-footer .site-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-muted);
}

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

/* ===== Responsive ===== */
@media (max-width: 640px) {
  :root { --gap: 1.5rem; }

  .site-header .site-wrapper { flex-direction: column; align-items: flex-start; }

  .site-nav ul { gap: 0.25rem 1rem; }

  .home-intro { padding: 2.5rem 0; }

  .site-footer .site-wrapper { flex-direction: column; }
}
