/*
Theme Name: Edgar Cloud Blog
Theme URI: https://example.com/edgar-cloud-blog
Author: Edgar
Description: A minimalist, responsive WordPress blog theme focused on readability and performance.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: edgar-cloud-blog
*/

/* =================================
   1. Design Tokens
================================= */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #2f343a;
  --muted: #5b6470;
  --line: #e5e7eb;
  --accent: #1f6feb;
  --max-width: 1100px;
}


/* =================================
   2. Base / Reset
================================= */

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
}

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

.site-logo img {
  height: 85px;
  width: auto;
  display: block;
}


/* =================================
   3. Layout
================================= */

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

.site-main-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  padding: 2rem 0;
}


/* =================================
   4. Header
================================= */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 2.2rem 0;
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: clamp(1.65rem, 2.4vw, 2rem);
  font-weight: 700;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-description {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}


/* =================================
   5. Navigation
================================= */

.main-navigation {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1rem;
}

.main-navigation a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}


/* =================================
   Navigation Social Icons
================================= */

.nav-social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 16px;
}

.nav-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-social svg {
  width: 20px;
  height: 20px;
}

.nav-social a:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* GitHub */

.nav-social a[aria-label="GitHub"] {
  color: #24292e;
}

/* LinkedIn */

.nav-social a[aria-label="LinkedIn"] {
  color: #0A66C2;
}

/* YouTube */

.nav-social a[aria-label="YouTube"] {
  color: #FF0000;
}


/* =================================
   6. Links
================================= */

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease;
}

.entry-content a {
  position: relative;
  font-weight: 500;
}

.entry-content a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: rgba(31,111,235,0.4);
  transform: scaleX(0.6);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.entry-content a:hover::after {
  transform: scaleX(1);
}


/* =================================
   7. Typography
================================= */

.entry-content {
  font-size: 1.08rem;
  line-height: 1.8;
}

.entry-content h2 {
  margin-top: 2rem;
}

.entry-content h3 {
  margin-top: 1.6rem;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.post-meta a {
  color: var(--text);
  font-weight: 500;
}


/* =================================
   8. Posts
================================= */

.post-card {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.post-title a {
  color: #000;
  font-weight: 700;
}

.post-title a:hover {
  color: #555;
}

.post-title,
.entry-title,
.archive-title {
  margin: 0;
  line-height: 1.3;
}

.post-title {
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
}

.entry-title,
.archive-title {
  font-size: clamp(1.7rem, 2.7vw, 2.3rem);
}

.post-thumbnail {
  margin: 0.9rem 0;
}


/* =================================
   9. Code Blocks
================================= */

.entry-content pre {
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 1.2rem;
  font-size: 0.9rem;
}

.entry-content code {
  font-family: Consolas, Monaco, "Courier New", monospace;
}


/* =================================
   10. Sidebar
================================= */

.sidebar .widget {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar .widget-title {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.sidebar ul {
  margin: 0;
  padding-left: 1.2rem;
}

.sidebar a {
  color: var(--text);
}

.sidebar a:hover {
  color: #000;
}


/* =================================
   11. Comments
================================= */

.comments-area {
  margin-top: 3rem;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-list li {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.comment-author {
  font-weight: 600;
}

.comment-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.comment-form {
  display: grid;
  gap: 1rem;
  max-width: 650px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.comment-form textarea {
  min-height: 140px;
}

.comment-form input[type="submit"] {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
}

.comment-form input[type="submit"]:hover {
  opacity: 0.9;
}


/* =================================
   12. Footer
================================= */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.2rem 0 2rem;
  font-size: 0.92rem;
}


/* =================================
   13. Accessibility
================================= */

.screen-reader-text {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* =================================
   14. Hero Section
================================= */

.hero {
  background-size: cover;
  background-position: center;
  padding: 140px 0;
  position: relative;
  color: white;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero h1 {
  font-size: 3rem;
}

.hero-button {
  background: white;
  color: black;
  padding: 10px 18px;
  border-radius: 6px;
}

/* Post titles on homepage */
.post-title a {
  color: #000;
}

.post-title a:hover {
  color: #000;
}
.post-navigation a {
  color: var(--text);
  font-weight: 600;
}

.post-navigation a:hover {
  color: var(--accent);
}

/* Better comment form */

.comments-area {
  margin-top: 40px;
}

.comment-form {
  max-width: 520px;
}

.comment-form p {
  margin-bottom: 12px;
}

.comment-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.9rem;
  font-family: inherit;
}

.comment-form textarea {
  min-height: 110px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-form input[type="submit"] {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  width: auto;
}

.comment-form input[type="submit"]:hover {
  opacity: 0.9;
}
/* =================================
   Blog Navigation
================================= */

.posts-navigation {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}

.posts-navigation a {
  color: var(--text);
}

.posts-navigation a:hover {
  text-decoration: underline;
}
/* =================================
   15. Responsive
================================= */

@media (max-width: 900px) {

  .site-main-wrap {
    grid-template-columns: 1fr;
  }

  .header-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

}

@media (max-width: 640px) {

  .container {
    width: min(100% - 1.25rem, var(--max-width));
  }

}