@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

/* ---- Theme Variables ---- */
:root {
  --bg: #faf8f5;
  --text: #2c2420;
  --text-secondary: #8a7e76;
  --border: #e8e0d8;
  --hover: #d4724e;
  --tag-bg: #f0ebe5;
  --card-bg: #f5f0eb;
}

[data-theme="dark"] {
  --bg: #1a1816;
  --text: #f0ebe5;
  --text-secondary: #9a8e84;
  --border: #2e2924;
  --hover: #e8845a;
  --tag-bg: #252220;
  --card-bg: #221f1c;
}

/* ---- Base ---- */
html, body {
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---- Color Ribbon ---- */
.ribbon {
  width: 100%;
  height: 4px;
  flex-shrink: 0;
}

/* ---- Site Header (shared across all pages) ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: var(--bg);
}

.site-header__brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-header__nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: auto;
}

.site-header__nav a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.site-header__nav a.active {
  color: var(--text);
}

.footer-toggle {
  padding: 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-toggle .theme-toggle {
  width: 36px;
  height: 36px;
}

.footer-contact {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(2px);
  transition: stroke 0.2s;
}


.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }

[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* ---- Homepage ---- */
.home {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 2rem;
}

.home__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.home__link {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  transition: color 0.2s;
  outline: none;
}

.home__link:focus-visible {
  color: var(--hover);
}

/* ---- Page Layout (inner pages) ---- */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page__content {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 4rem 2rem;
}

.page__title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.page__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* ---- Post List (tutorials + blog) ---- */
.post-list {
  display: flex;
  flex-direction: column;
}

.post-row a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 0;
  transition: color 0.2s;
}


.post-row__title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.post-row__date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Buttons (consulting etc.) ---- */
.btn {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
}

.btn--primary:hover {
  opacity: 0.85;
}

/* ---- Consulting Page ---- */
.consulting-hero {
  margin-bottom: 3rem;
}

.consulting-hero__rate {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.consulting-section {
  margin-bottom: 3rem;
}

.consulting-section__title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.consulting-section ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.consulting-section li {
  font-size: 1rem;
  padding-left: 1.2rem;
  position: relative;
}

.consulting-section li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--text-secondary);
}

.consulting-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.consulting-cta {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 8px;
  text-align: center;
}

.consulting-cta__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.consulting-cta__text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ---- About Page ---- */
.about-section {
  margin-bottom: 3rem;
}

.about-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.about-links a {
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}


/* ---- Video Embed ---- */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ---- Page Footer ---- */
.page__footer {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .site-header__nav {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .home__link {
    font-size: 2rem;
  }

  .page__title {
    font-size: 2rem;
  }

  .page__content {
    padding-top: 2.5rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1816;
    --text: #f0ebe5;
    --text-secondary: #9a8e84;
    --border: #2e2924;
    --hover: #e8845a;
    --tag-bg: #252220;
    --card-bg: #221f1c;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
}
