/* Base Styles & Variables */
:root {
  --bg-color: #fafafe;
  --text-main: #111827;
  --text-muted: #4b5563;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e5e7eb;
  --card-bg: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --max-width: 800px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--text-main);
  font-weight: 700;
}

p {
  color: var(--text-muted);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

main {
  flex-grow: 1;
  padding: 60px 0;
}

/* Header & Navigation */
header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: translateY(-1px);
}

.logo::before {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.logo span {
  color: var(--primary);
  font-weight: 600;
  margin-left: 2px;
  padding: 3px 8px;
  background-color: rgba(37, 99, 235, 0.1);
  border-radius: 6px;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 0;
}

.hero h1 {
  font-size: 3rem;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
}

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

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

/* Blog Cards */
.blog-list {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  display: block;
}

.blog-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  line-height: 1.3;
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.read-more {
  display: inline-block;
  margin-top: 15px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.read-more:hover {
  text-decoration: underline;
}

/* Single Post */
.post-header {
  text-align: center;
  margin-bottom: 40px;
}

.post-header h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.post-content {
  font-size: 1.1rem;
}

.post-content h2 {
  margin-top: 40px;
  margin-bottom: 20px;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 20px;
  margin-left: 0;
  font-style: italic;
  color: var(--text-muted);
  background-color: #f3f4f6;
  padding: 15px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content code {
  background-color: #f1f5f9;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.post-content pre {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.5;
}

.post-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

.about-image {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--border);
  border-radius: 50%;
  object-fit: cover;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.skills-list li {
  background-color: #f3f4f6;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
  border: 1px solid var(--border);
}

/* Contact Form */
.contact-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 0;
  margin-top: 60px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-links a {
  color: var(--text-muted);
}

.social-links a:hover {
  color: var(--primary);
}

/* Section Headings */
.section-title {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: none;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-image {
    max-width: 200px;
    margin: 0 auto;
  }
  
  .skills-list {
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
}

/* Dashboard */
.dashboard-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.snippet-box {
  background-color: #f1f5f9;
  padding: 15px;
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
}
