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

:root {
  --color-bg: #131313;
  --color-text: #e0e0e0;
  --color-text-muted: #999;
  --color-accent-1: #bada55;
  --color-accent-2: #fe5713;
  --font-sans: "IBM Plex Sans", sans-serif;
  --font-serif: "IBM Plex Serif", serif;
  --font-mono: "IBM Plex Mono", monospace;
}

/* --- Fonts --- */
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("/fonts/IBMPlexSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("/fonts/IBMPlexSerif-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("/fonts/IBMPlexSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("/fonts/IBMPlexSerif-SemiBoldItalic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-SemiBoldItalic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }

/* --- Global --- */
html { font-size: 16px; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.site {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* --- Header --- */
.site-header {
  margin-bottom: 2rem;
}
.site-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: #fff;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.15rem, 3vw, 1.35rem); margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--color-accent-1);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--color-accent-2); }

strong { font-weight: 700; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(255,255,255,0.08);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}
pre {
  background: rgba(255,255,255,0.06);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
pre code {
  background: none;
  padding: 0;
}

/* --- Home layout --- */
.home-layout {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  align-items: flex-start;
}
.home-main {
  flex: 1;
  min-width: 0;
}
.home-sidebar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

/* --- Profile image --- */
.profile-image img {
  border-radius: 50%;
  width: 96px;
  height: 96px;
  object-fit: cover;
}

/* --- Contact buttons --- */
.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.btn {
  display: block;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-email {
  background: var(--color-accent-1);
  color: var(--color-bg);
  border: 1px solid var(--color-accent-1);
}
.btn-email:hover {
  background: transparent;
  color: var(--color-accent-1);
}
.btn-linkedin {
  background: #0a66c2;
  color: #fff;
  border: 1px solid #0a66c2;
}
.btn-linkedin:hover {
  background: transparent;
  color: #0a66c2;
}
.btn-signal {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}
.btn-signal:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* --- Lists --- */
ul, ol { padding-left: 1.25rem; margin: 0.5rem 0 1.5rem; }
li { margin-bottom: 0.6rem; line-height: 1.5; }

/* --- Posts listing --- */
.posts-section { margin-top: 3rem; }
.posts-section h2 { font-family: var(--font-serif); }
.posts-list {
  list-style: none;
  padding-left: 0;
}
.posts-list li {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.posts-list a {
  font-weight: 700;
  font-size: 1.05rem;
}
.posts-list time {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --- Post page --- */
.post-header { margin-bottom: 2rem; }
.post-title { margin-bottom: 0.5rem; }
.post-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.post-meta time { margin-right: 1rem; }
.post-body { margin-bottom: 3rem; }
.post-body img { max-width: 100%; height: auto; border-radius: 6px; }
.post-footer {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.post-footer a {
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 639px) {
  .site { padding: 1.5rem 1rem; }

  .home-layout {
    flex-direction: column;
  }
  .home-sidebar {
    order: -1;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }
  .profile-image img {
    width: 72px;
    height: 72px;
  }
  .contact-buttons {
    flex: 1;
  }
}
