/*
Theme Name: Metzae Media
Theme URI: https://metzae.media
Author: Metzae Media
Author URI: https://metzae.media
Description: A minimal, dark-mode theme for Metzae Media — web development portfolio and creative services.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: metzae
*/

/* ========== RESET & BASE ========== */

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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --border: #2a2a2a;
  --border-light: #333;
  --text-primary: #f0f0f0;
  --text-secondary: #999;
  --text-muted: #666;
  --accent: #fff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.7;
}

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

/* ========== LAYOUT ========== */

.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.site-content {
  flex: 1;
}

/* ========== HEADER ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-branding a {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ========== NAVIGATION ========== */

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.primary-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition);
}

/* ========== HERO (Front Page) ========== */

.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  opacity: 1;
}

/* ========== SECTIONS ========== */

.section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.section-header p {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ========== PROJECT GRID ========== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.project-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.03);
}

.project-card-content {
  padding: 1.5rem;
}

.project-card-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-card-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.project-card-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-secondary);
}

/* Active site highlight: brighter frame + a live "Active" badge */
.project-card--active {
  border-color: var(--border-light);
  box-shadow: 0 0 0 1px var(--border-light);
}

.project-card--active:hover {
  box-shadow: 0 0 0 1px var(--accent);
}

.project-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem 0.3rem 0.55rem;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 100px;
}

.project-card-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1db954;
  animation: metzae-pulse 2s infinite;
}

@keyframes metzae-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(29, 185, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .project-card-badge::before { animation: none; }
}

/* Compact "active development" list (no thumbnails) for the bottom of the page */
.active-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.active-list-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all var(--transition);
}

.active-list-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.active-list-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1db954;
  flex: none;
  animation: metzae-pulse 2s infinite;
}

.active-list-item .active-list-host {
  color: var(--text-muted);
  font-size: 0.78rem;
}

@media (prefers-reduced-motion: reduce) {
  .active-list-item::before { animation: none; }
}

/* ========== SERVICES ========== */

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

.service-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.service-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card-image img {
  transform: scale(1.03);
}

.service-card-content {
  padding: 1.75rem 1.5rem;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== PAGE CONTENT ========== */

.page-header {
  padding: 5rem 0 2rem;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.entry-content {
  padding-bottom: 4rem;
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
}

.entry-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.entry-content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

.entry-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.entry-content blockquote {
  border-left: 3px solid var(--border-light);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.entry-content img {
  border-radius: 6px;
  margin: 1.5rem 0;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========== POSTS / ARCHIVE ========== */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}

.post-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-content {
  padding: 1.25rem 1.5rem 1.5rem;
}

.post-card-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.post-card-content .post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== SINGLE POST ========== */

.single-post-header {
  padding: 5rem 0 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.single-post-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.single-post-meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.single-post-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.single-post-content .entry-content p {
  font-size: 1.05rem;
}

/* ========== FOOTER ========== */

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

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--text-primary);
  opacity: 1;
}

/* ========== PAGINATION ========== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
  opacity: 1;
}

.pagination .current {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* ========== FORMS ========== */

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  transition: border-color var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--border-light);
}

/* Contact Form 7 */
.wpcf7 .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 1.25rem;
}

.wpcf7 input[type="submit"] {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.wpcf7 input[type="submit"]:hover {
  opacity: 0.85;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    text-align: center;
  }

  .primary-nav li {
    border-bottom: 1px solid var(--border);
  }

  .primary-nav li:last-child {
    border-bottom: none;
  }

  .primary-nav a {
    display: block;
    padding: 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

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

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

/* ========== WORDPRESS CLASSES ========== */

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin: 1.5rem auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* WordPress embeds */
.wp-block-embed,
.entry-content iframe {
  max-width: 100%;
  margin: 1.5rem 0;
}

.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
