/* ============================================
   Tecnomad — Main Stylesheet
   ============================================ */

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

:root {
  --clr-bg: #0f1117;
  --clr-surface: #1a1d27;
  --clr-surface2: #21253a;
  --clr-accent: #F58221;
  --clr-accent2: #c9600a;
  --clr-text: #e2e8f0;
  --clr-muted: #8892a4;
  --clr-border: #2d3148;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --max-width: 1100px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #fff; }

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

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent2));
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity var(--transition), transform var(--transition);
}
.btn:hover {
  opacity: 0.88;
  color: #fff;
  transform: translateY(-2px);
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
}

/* ---- LOGO IMAGE ---- */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-icon { font-size: 1.4rem; }
.logo-accent { color: var(--clr-accent); }

/* Logo text used in footer */
.logo-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-text);
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  gap: 2rem;
}
.main-nav a {
  color: var(--clr-muted);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--clr-text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--clr-text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1f0e00 0%, #0f1117 50%, #1a0e00 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(245, 130, 33, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 96, 10, 0.10) 0%, transparent 60%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 6rem 0;
}

.hero-tag {
  display: inline-block;
  background: rgba(245, 130, 33, 0.12);
  border: 1px solid rgba(245, 130, 33, 0.35);
  color: var(--clr-accent);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-content h1 {
  font-family: var(--font-body);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--clr-muted);
  max-width: 520px;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}

/* ---- ABOUT STRIP ---- */
.about-strip {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  padding: 3.5rem 0;
}

.about-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.avatar {
  font-size: 4rem;
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-surface2);
  border-radius: 50%;
  border: 2px solid var(--clr-border);
}

.about-text h2 {
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #fff;
}

.about-text p {
  color: var(--clr-muted);
  max-width: 680px;
}

/* ---- ARTICLES SECTION ---- */
.articles-section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--font-body);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent2));
  border-radius: 3px;
}

/* ---- CARD GRID ---- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(245, 130, 33, 0.35);
}

.card-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}
.card-thumb--router  { background: linear-gradient(135deg, #2a1500, #3d2000); }
.card-thumb--laptop  { background: linear-gradient(135deg, #1a0a00, #2d1500); }
.card-thumb--power   { background: linear-gradient(135deg, #1a1a00, #2d2800); }
.card-thumb--apps    { background: linear-gradient(135deg, #2a0a00, #3d1500); }

/* Photo background card thumb */
.card-thumb--photo {
  background-image: url('../images/img-6708.jpg');
  background-size: cover;
  background-position: center;
}
.card-thumb--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 6, 0, 0.72) 0%,
    rgba(20, 10, 0, 0.62) 100%
  );
}
.card-thumb--photo span {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7));
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  background: rgba(245, 130, 33, 0.12);
  border: 1px solid rgba(245, 130, 33, 0.28);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 0.65rem;
  color: #fff;
}
.card-body h3 a {
  color: inherit;
}
.card-body h3 a:hover {
  color: var(--clr-accent);
}

.card-body p {
  font-size: 0.9rem;
  color: var(--clr-muted);
  flex: 1;
  margin-bottom: 1rem;
}

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

.card-date {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--clr-muted);
}

.read-more {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--clr-accent);
}
.read-more.muted {
  color: var(--clr-muted);
  cursor: default;
}

/* ---- ARTICLE PAGE ---- */
.article-hero {
  position: relative;
  border-bottom: 1px solid var(--clr-border);
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, #1f0e00 0%, #0f1117 60%, #1a0e00 100%);
  overflow: hidden;
}

/* Photo variant */
.article-hero--photo {
  padding: 0;
  background: none;
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 5, 0, 0.70) 0%,
    rgba(10, 6, 0, 0.78) 50%,
    rgba(15, 17, 23, 0.92) 100%
  );
  z-index: 1;
}

.article-hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0 3rem;
}

.article-hero h1,
.article-hero-content h1 {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin: 0.75rem 0 1rem;
  max-width: 760px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.article-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  color: var(--clr-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.article-wrap {
  padding: 4rem 0;
}

.article-body {
  max-width: 720px;
}

.article-body .lead {
  font-size: 1.12rem;
  color: var(--clr-text);
  margin-bottom: 2rem;
  line-height: 1.8;
  border-left: 3px solid var(--clr-accent);
  padding-left: 1.25rem;
}

.article-body h2 {
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 2.5rem 0 0.85rem;
}

.article-body p {
  color: var(--clr-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.article-body ul,
.article-body ol {
  color: var(--clr-muted);
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.article-body li {
  margin-bottom: 0.5rem;
}
.article-body li strong {
  color: var(--clr-text);
}

.article-body blockquote {
  background: var(--clr-surface);
  border-left: 4px solid var(--clr-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--clr-text);
}

.article-back {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-inner .logo-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-inner p {
  color: var(--clr-muted);
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .main-nav.open { display: flex; }

  .nav-toggle { display: block; }

  .site-header { position: relative; }

  .about-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    padding: 4rem 0;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .logo-img {
    height: 42px;
  }
}
