/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --color-bg: #121416;
  --color-bg-gradient-end: #434b55;
  --color-wrapper: #000000;
  --color-header: #222222;
  --color-nav: #333333;
  --color-nav-border: #222222;
  --color-section: #303030;
  --color-section-end: #525252;
  --color-accent: #c56c28;
  --color-accent-hover: #d97d38;
  --color-text: #ababab;
  --color-text-muted: #9b9b9b;
  --color-heading: #ebebeb;
  --color-heading-2: #acacac;
  --color-heading-3: #9b9b9b;
  --color-link: rgb(153, 92, 0);
  --color-card-bg: #1e2124;
  --color-card-border: #2a2d32;
  --color-card-border-hover: #c56c28;
  --color-tag-bg: #2a2d32;
  --color-tag-text: #ababab;
  --color-btn-bg: #c56c28;
  --color-btn-text: #ffffff;
  --color-footer-text: #ccc;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--color-bg);
  background: var(--color-bg) linear-gradient(var(--color-bg), var(--color-bg-gradient-end)) fixed;
}

body {
  padding: 50px 0;
  margin: 0;
  font: 14px/1.5 Lato, "Helvetica", Helvetica, Arial, sans-serif;
  color: var(--color-text);
  font-weight: 400;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

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

p {
  margin: 0 0 20px;
  padding: 0;
}

strong {
  font-weight: 600;
}

img {
  max-width: 100%;
}

/* ===========================
   Layout
   =========================== */
.wrapper {
  max-width: 960px;
  margin: 0 auto;
  background: var(--color-wrapper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===========================
   Header
   =========================== */
header {
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--color-header);
  position: relative;
  padding: 15px 20px;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header, section, footer {
  display: block;
}

header .logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 1px;
}

header .tagline {
  margin: 0;
  color: #fff;
  font-size: 13px;
}

/* ===========================
   Navigation
   =========================== */
.navigation {
  background-color: var(--color-nav);
}

.navigation ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--color-nav);
  border-bottom: 1px solid var(--color-nav-border);
}

.navigation li {
  float: left;
  border-right: 1px solid var(--color-nav-border);
}

.navigation li a {
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.navigation li a:hover {
  background-color: #555;
  color: white;
}

.navigation li a.active {
  background-color: var(--color-accent);
  color: white;
}

/* ===========================
   Content / Section
   =========================== */
.content {
  padding: 20px;
  font-size: 15px;
  background: linear-gradient(var(--color-section), var(--color-section-end) 700px);
  border-radius: 0 0 var(--radius) var(--radius);
  position: relative;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  padding: 0;
  margin: 0 0 20px;
  line-height: 1.2;
}

h1, h2, h3 {
  line-height: 1.1;
}

h1 {
  font-size: 28px;
}

h2 {
  color: var(--color-heading-2);
}

h3, h4, h5, h6 {
  color: var(--color-heading-3);
}

p, ul, ol, table, pre, dl {
  margin: 0 0 20px;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--color-card-border);
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 36px;
  color: var(--color-heading);
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 18px;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero-bio {
  max-width: 640px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===========================
   Skills Section
   =========================== */
.skills-section {
  margin-bottom: 40px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.skills-category h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.skills-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skills-list li {
  padding: 3px 0;
  font-size: 14px;
  color: var(--color-text);
}

.skills-list li::before {
  content: "›  ";
  color: var(--color-accent);
}

/* ===========================
   Section Header (featured/recent)
   =========================== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  margin-bottom: 0;
}

.featured-section,
.recent-section {
  margin-bottom: 40px;
}

/* ===========================
   Card Grid
   =========================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* ===========================
   Card
   =========================== */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.card.hidden {
  display: none;
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--color-heading);
}

.card-title a {
  color: inherit;
}

.card-title a:hover {
  color: var(--color-accent);
}

.card-date {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 13px;
  color: var(--color-text);
  flex: 1;
  margin-bottom: 12px;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ===========================
   Filter Bar
   =========================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--color-card-border);
  border-radius: 20px;
  background: transparent;
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ===========================
   Tags
   =========================== */
.tag-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  border-radius: 20px;
  font-size: 11px;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-block;
  padding: 8px 18px;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
  border: 1px solid transparent;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ===========================
   Post/Project Detail
   =========================== */
.post-detail,
.project-detail {
  max-width: 720px;
}

.detail-banner {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.post-meta .tag-list {
  margin-bottom: 0;
}

.detail-links {
  display: flex;
  gap: 8px;
}

.post-body {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.back-link {
  margin-top: 20px;
}

/* ===========================
   Contact
   =========================== */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  margin-bottom: 12px;
  font-size: 15px;
}

/* ===========================
   Code blocks
   =========================== */
code, pre {
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
  font-size: 12px;
}

pre {
  padding: 20px;
  background: #3a3c42;
  color: #f8f8f2;
  margin: 0 0 20px;
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

pre code {
  color: #f8f8f2;
}

code {
  color: #aaddff;
}

/* ===========================
   Blockquote
   =========================== */
blockquote {
  margin: 0 0 20px;
  padding: 15px 20px 1px 40px;
  font-style: italic;
  background: rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--color-accent);
  color: var(--color-text-muted);
}

/* ===========================
   Table
   =========================== */
table {
  width: 100%;
  border-collapse: collapse;
}

tr {
  border-bottom: 1px solid #aaa;
}

tr:last-child {
  border-bottom: none;
}

th, td {
  text-align: left;
  padding-bottom: 10px;
}

th {
  color: white;
  width: 20%;
}

/* ===========================
   HR
   =========================== */
hr {
  border: 0;
  background: #aaa;
  height: 1px;
  margin: 0 0 20px;
}

/* ===========================
   Footer
   =========================== */
footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  color: var(--color-footer-text);
  overflow: hidden;
  display: flex;
  justify-content: space-between;
}

footer a {
  color: #fff;
  font-weight: bold;
}

footer p {
  margin: 0;
}

/* ===========================
   Responsive - 720px
   =========================== */
@media screen and (max-width: 720px) {
  body {
    padding: 0;
  }

  .wrapper {
    border-radius: 0;
    box-shadow: none;
    width: 100%;
  }

  header {
    border-radius: 0;
  }

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

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

  footer {
    border-radius: 0;
    flex-direction: column;
    gap: 4px;
  }
}

/* ===========================
   Responsive - 480px
   =========================== */
@media screen and (max-width: 480px) {
  .navigation ul {
    display: flex;
    flex-wrap: wrap;
  }

  .navigation li {
    float: none;
    border-right: none;
    border-bottom: 1px solid var(--color-nav-border);
  }

  .hero h1 {
    font-size: 28px;
  }

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