/* Claude DbO — main.css */

:root {
  --bg:          #0f0f0f;
  --surface:     #171717;
  --border:      #2a2a2a;
  --orange:      #e85d26;
  --orange-dim:  rgba(232, 93, 38, 0.12);
  --text:        #e8e4dc;
  --muted:       #666;
  --mono:        'DM Mono', monospace;
  --serif:       'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-title a {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.site-title a span { color: var(--orange); }

/* ── Nav ── */
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.primary-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b0a99e;                /* lighter than --muted, warmer than white */
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s;
}

/* horizontal-slide underline — grows left to right */
.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.3s ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item a {
  color: var(--orange);
}

.primary-nav a:hover::after,
.primary-nav .current-menu-item a::after {
  width: 100%;
}

/* ── Main content ── */
.site-main {
  min-height: 70vh;
}

/* ── Page hero ── */
.page-hero {
  padding: 3rem 3rem 0rem;/* was 4rem 3rem 2rem */
  max-width: 680px;
}

.blog .page-hero,
.search .page-hero {
  padding-bottom:2rem;
}

.page .page-hero {

}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  margin-bottom: 1rem;/* was 2rem */
  color: var(--text);
}

.page-hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.page-hero p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 520px;
}

/* ── Standard page content ── */
.entry-content {
  padding: 1.5rem 3rem 2rem;/* was 3rem*/;
  max-width: 720px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--text);
  margin-bottom: 1rem;
  margin-top: 2rem;
  line-height: 1.2;
}

.entry-content h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-style: italic; }
.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.2rem; }

.entry-content p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

.entry-content strong { color: #999; font-weight: 500; }

.entry-content ul,
.entry-content ol {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

/* ── Card grid (projects / work) ── */
.card-grid {
  padding: 2rem 3rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5px;
  border-top: 1.5px solid var(--border);
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--orange);
  transition: height 0.3s ease;
}

.card:hover { border-color: #3a3a3a; background: #1c1c1c; }
.card:hover::before { height: 100%; }

.card-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 500;
}

.card-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.card-desc strong { color: #999; font-weight: 500; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.card-stack { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.pill {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 2px;
}

.card-arrow {
  color: var(--orange);
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.card:hover .card-arrow { transform: translate(3px, -3px); }

/* ── Blog index ── */
.posts-grid {
  padding: 2rem 3rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5px;
  border-top: 1.5px solid var(--border);
}

.post-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--orange);
  transition: height 0.3s ease;
}

.post-card:hover { border-color: #3a3a3a; background: #1c1c1c; }
.post-card:hover::before { height: 100%; }

.post-date {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
}

.post-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.post-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.post-read-more {
  color: var(--orange);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.post-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  margin: -2rem -2rem 0;
  width: calc(100% + 4rem);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.post-card:hover .post-thumb img {
  transform: scale(1.03);
}

/* ── Single post ── */
.single-post-meta {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-top {
  padding: 3rem;
  border-bottom: 1px solid var(--border);
}

.footer-widgets {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-widget {
  flex: 1;
  min-width: 200px;
}

.footer-widget-title {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget ul li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

.footer-widget ul li a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-widget ul li a:hover { color: var(--orange); }

.footer-widget input[type="search"] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  width: 100%;
  outline: none;
}

.footer-widget input[type="search"]:focus {
  border-color: var(--orange);
}

.footer-widget input[type="submit"] {
  background: var(--orange);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.footer-back-to-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex: 0;
  min-width: auto;
}

.back-to-top {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  white-space: nowrap;
}

.back-to-top:hover { color: var(--orange); }

.footer-bottom {
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer p { font-size: 0.78rem; color: var(--muted); }
.site-footer a { color: var(--orange); font-size: 0.78rem; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Pagination ── */
.pagination {
  padding: 2rem 3rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.pagination .page-numbers {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: var(--orange);
  color: var(--orange);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-hero          { animation: fadeUp 0.5s ease both; }
.card:nth-child(1)  { animation: fadeUp 0.5s 0.1s ease both; }
.card:nth-child(2)  { animation: fadeUp 0.5s 0.2s ease both; }
.card:nth-child(3)  { animation: fadeUp 0.5s 0.3s ease both; }
.card:nth-child(4)  { animation: fadeUp 0.5s 0.4s ease both; }
.card:nth-child(5)  { animation: fadeUp 0.5s 0.5s ease both; }
.card:nth-child(6)  { animation: fadeUp 0.5s 0.6s ease both; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .site-header,
  .page-hero,
  .entry-content,
  .card-grid,
  .posts-grid,
  .single-post,
  .site-footer { padding-left: 1.5rem; padding-right: 1.5rem; }

  .card-grid,
  .posts-grid { grid-template-columns: 1fr; }

  .primary-nav ul { gap: 1rem; }
}

/* ── Button system ─────────────────────────────────────────── */

.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.65rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--orange);
  border: 1.5px solid var(--orange);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease;
  z-index: 0;
}

.btn::before,
button::before,
input[type="submit"]::before,
input[type="button"]::before,
input[type="reset"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  color: #0f0f0f;
  border-color: #fff;
}

.btn:hover::before,
button:hover::before,
input[type="submit"]:hover::before,
input[type="button"]:hover::before,
input[type="reset"]:hover::before {
  transform: translateY(0);
}
/* Ghost / outlined variant */
.btn-ghost {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}

.btn-ghost:hover {
  --btn-fill: 100%;
  color: #0f0f0f;
  border-color: var(--orange);
}

/* Small variant */
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.7rem;
}

/* Search input + button pair */
.search-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-wrap:focus-within {
  border-color: var(--orange);
}

.search-wrap input[type="search"],
.search-wrap input[type="text"] {
  flex: 1;
  background: var(--surface);
  border: none;
  outline: none;
  padding: 0.65rem 1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  min-width: 0;
}

.search-wrap input::placeholder {
  color: var(--muted);
}

.search-wrap button,
.search-wrap input[type="submit"] {
  border-radius: 0;
  border: none;
  border-left: 1.5px solid var(--border);
  flex-shrink: 0;
}

/* ── Contact form inputs ── */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  border-radius: 2px;
  transition: border-color 0.2s;
}

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

textarea {
  min-height: 160px;
  resize: vertical;
}

/* fix the white fill on autofill */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  -webkit-text-fill-color: var(--text);
}

/* ------------  MISC. -----------------  */
.orange { color: var(--orange);
}

.post-excerpt:empty {display:none;
}
