/* ========== Design Tokens ========== */
:root{
  --bg:#0b0b0b;
  --panel:#121212;
  --panel-2:#0f0f0f;
  --line:#1f1f1f;
  --line-2:#222;
  --text:#ddd;
  --muted:#9a9a9a;
  --muted-2:#777;
  --accent:#e53935;
  --accent-2:#ff5f58;

  --radius:14px;
  --radius-sm:10px;

  --wrap:1200px;
}

@media (prefers-color-scheme: dark){
  :root{ color-scheme: dark; }
}

/* ========== Base ========== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
               "Courier New", monospace;
  line-height:1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap{
  max-width:var(--wrap);
  margin:0 auto;
  padding:0 20px;
}

a{ 
  color:var(--accent); 
  text-decoration:none;
  transition: all 0.3s ease;
}
a:hover{ 
  text-decoration:underline;
  text-shadow: 0 0 8px rgba(229, 57, 53, 0.6);
  filter: drop-shadow(0 0 4px rgba(229, 57, 53, 0.5));
}

.no-js{
  background:#1a1a1a; color:#fff; padding:10px 20px; text-align:center;
  border-bottom:1px solid var(--line-2);
}

/* ========== Header / Hero ========== */
.hero{
  border-bottom:1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(17,17,17,.7), rgba(10,10,10,.0));
  position:sticky;
  top:0;
  backdrop-filter:saturate(140%) blur(6px);
  z-index:10;
}
.hero .wrap{
  display:flex; align-items:center; justify-content:center;
  flex-direction:column;
  padding:32px 20px;
  text-align:center;
}
.brand{ cursor:default; }
.site-title{
  margin:0; font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
  letter-spacing:2px; color:var(--accent);
  text-align:center;
}
.tagline{
  margin:8px 0 0 0; color:var(--muted-2);
  font-size:.92rem;
  text-align:center;
}
.nav{ 
  display:flex; 
  gap:14px; 
  margin-top:20px;
  justify-content:center;
  flex-wrap:wrap;
}
.nav-link{
  padding:8px 16px; 
  border:1px solid transparent; 
  border-radius:999px;
  color:var(--muted); 
  font-size:.95rem;
  transition: all 0.3s ease;
  position:relative;
}
.nav-link:hover{ 
  border-color:var(--line); 
  color:var(--text);
  box-shadow: 0 0 12px rgba(229, 57, 53, 0.4), 0 0 24px rgba(229, 57, 53, 0.2);
  transform: translateY(-2px);
}
.nav-link.active{ 
  border-color:var(--accent); 
  color:var(--text);
  box-shadow: 0 0 12px rgba(229, 57, 53, 0.5);
}

/* ========== Sections ========== */
.section{ padding:56px 0; }
.section-title{
  margin:0 0 32px 0;
  font-size: clamp(1.4rem, 1.5vw + 1rem, 2rem);
  color:var(--text);
  letter-spacing:0.5px;
  font-weight:600;
  position:relative;
  padding-bottom:12px;
}

.section-title::after{
  content:'';
  position:absolute;
  bottom:0;
  left:0;
  width:60px;
  height:3px;
  background:var(--accent);
  border-radius:2px;
}

/* ========== Media Placeholder ========== */
.media-section .wrap{ padding-top:22px; }
.media-placeholder{
  background:var(--panel);
  border:1px dashed var(--line);
  border-radius:var(--radius);
  min-height:260px;
  display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden;
}
.placeholder-inner{
  text-align:center; color:var(--muted);
  display:flex; flex-direction:column; align-items:center; gap:12px;
  padding:40px 10px;
}
.placeholder-inner .dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--accent); display:inline-block; margin:0 3px;
  animation: pulse 1.6s ease-in-out infinite;
}
.placeholder-inner .dot:nth-child(2){ animation-delay:.25s; }
.placeholder-inner .dot:nth-child(3){ animation-delay:.5s; }
.placeholder-inner p{ margin:6px 0 0 0; font-style:italic; color:var(--muted-2); }

@keyframes pulse{
  0%,100%{ opacity:.25; transform: translateY(0); }
  50%{ opacity:1; transform: translateY(-4px); }
}

.media-asset{
  display:block; width:100%;
  border:1px solid var(--line); border-radius:var(--radius);
}

/* ========== Posts Grid (Professional Blog Style) ========== */
.post-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:28px;
  padding: 8px 0;
}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  padding:32px 28px;
  border-radius:var(--radius);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor:pointer;
  display:flex;
  flex-direction:column;
  position:relative;
  overflow:hidden;
}

.card::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  width:3px;
  height:0;
  background:var(--accent);
  transition:height 0.3s ease;
}

.card:hover::before{
  height:100%;
}

.card:hover{
  border-color:var(--accent);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 16px 40px rgba(229, 57, 53, 0.25), 
    0 8px 20px rgba(0,0,0,.4),
    0 0 20px rgba(229, 57, 53, 0.15);
  background:linear-gradient(135deg, var(--panel) 0%, rgba(18, 18, 18, 0.95) 100%);
}

.card h2{
  margin:0 0 12px 0;
  color:var(--text);
  font-size: clamp(1.2rem, 1.2vw + 0.8rem, 1.5rem);
  font-weight:600;
  line-height:1.3;
  letter-spacing:-0.02em;
  transition:color 0.2s ease;
  padding-left:12px;
  border-left:2px solid transparent;
}

.card:hover h2{
  color:var(--accent);
  border-left-color:var(--accent);
}

.card .post-date{
  display:inline-block;
  color:var(--muted);
  font-size:0.875rem;
  font-weight:500;
  letter-spacing:0.5px;
  text-transform:uppercase;
  margin:0 0 16px 0;
  padding:6px 12px;
  background:rgba(255,255,255,0.03);
  border-radius:6px;
  width:fit-content;
  transition:all 0.2s ease;
}

.card:hover .post-date{
  color:var(--muted-2);
  background:rgba(229, 57, 53, 0.1);
}

.card .post-excerpt{
  color:var(--muted);
  margin:0;
  line-height:1.7;
  font-size:0.95rem;
  flex-grow:1;
  display:-webkit-box;
  -webkit-line-clamp:3;
  line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
  transition:color 0.2s ease;
}

.card:hover .post-excerpt{
  color:#bbb;
}

.card small{
  display:none;
}

/* ========== Contact & Footer ========== */
.contact{
  border-top:1px solid var(--line-2);
  border-bottom:1px solid var(--line-2);
  background:var(--panel-2);
}
.link-accent{ 
  color:var(--accent-2);
  transition: all 0.3s ease;
}
.link-accent:hover{ 
  color:var(--accent);
  text-shadow: 0 0 8px rgba(229, 57, 53, 0.6);
  filter: drop-shadow(0 0 4px rgba(229, 57, 53, 0.5));
}

.footer{
  text-align:center; 
  font-size:.9rem; 
  color:var(--muted);
  padding:40px 20px; 
  border-top:1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(10,10,10,.0), rgba(17,17,17,.7));
  margin-top:60px;
}

.footer .wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
}

.footer p{
  margin:0;
  color:var(--muted-2);
}

.footer a{
  color:var(--accent);
  transition: all 0.3s ease;
}

.footer a:hover{
  color:var(--accent-2);
  text-shadow: 0 0 8px rgba(229, 57, 53, 0.6);
  filter: drop-shadow(0 0 4px rgba(229, 57, 53, 0.5));
}

/* ========== Utilities & Responsiveness ========== */
:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:6px;
}

@media (max-width:720px){
  .hero .wrap{ 
    flex-direction:column; 
    align-items:center; 
    gap:10px; 
  }
  .nav{ 
    width:100%; 
    overflow:auto; 
    justify-content:center;
  }
  .post-grid{
    grid-template-columns: 1fr;
    gap:20px;
  }
  .card{
    padding:24px 20px;
  }
  .card:hover{
    transform: translateY(-6px) scale(1.01);
  }
  .section{
    padding:40px 0;
  }
}

/* ========== Buttons and Clickable Elements ========== */
button,
[role="button"],
input[type="button"],
input[type="submit"]{
  cursor:pointer;
  transition: all 0.3s ease;
}

button:hover,
[role="button"]:hover,
input[type="button"]:hover,
input[type="submit"]:hover{
  box-shadow: 0 0 12px rgba(229, 57, 53, 0.4), 0 0 24px rgba(229, 57, 53, 0.2);
  filter: drop-shadow(0 0 4px rgba(229, 57, 53, 0.5));
}

/* ========== Legacy Styles Kept (for compatibility) ========== */
header h1{ /* keep clickable behavior from your previous build */
  cursor:pointer;
  transition: all 0.3s ease;
}

header h1:hover{
  text-shadow: 0 0 12px rgba(229, 57, 53, 0.7);
  filter: drop-shadow(0 0 6px rgba(229, 57, 53, 0.5));
}

main{ /* reserved to avoid breaking old pages that rely on main layout */
  padding: 0 0 48px 0;
}
