/* styles.css */
:root {
  --font-jost: 'Jost', 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Inter', 'Segoe UI', Roboto, sans-serif;
  --bg: #ffffff;
  --text: #334155;
  --text-light: #64748b;
  --text-dark: #1e293b;
  --accent: #0ea5e9;
  --accent-light: #e0f2fe;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --rounded-3xl: 1.5rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  scroll-behavior: smooth;
  font-weight: 300;
  min-height: 100vh;
}

/* Layout Container */
.container {
  padding: 2rem 1rem 2.5rem;
}

@media (min-width: 640px) {
  .container {
    padding: 3.5rem 2rem 2.5rem;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 5rem 2rem 2.5rem;
  }
}

/* Header Styles */
header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
}

@media (min-width: 640px) {
  header {
    flex-direction: row;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
  }
}

@media (min-width: 1280px) {
  header {
    margin-bottom: 5rem;
  }
}

.header-avatar {
  width: 85px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header-avatar {
    width: 150px;
  }
}

.header-avatar img {
  border-radius: 9999px;
  width: 100%;
  height: auto;
}

.logo {
  font-size: 1.5rem;
  font-family: var(--font-jost);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  position: relative;
}

@media (min-width: 640px) {
  .logo {
    font-size: 1.875rem;
    align-items: flex-start;
  }
}

.logo::after {
  content: '';
  width: 100%;
  height: 6px;
  max-width: 1.5rem;
  margin-top: 0.5rem;
  display: inline-block;
  border-radius: 9999px;
  background: var(--accent);
}

@media (min-width: 640px) {
  .logo::after {
    max-width: 15rem;
  }
}

/* Navigation */
nav {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

@media (min-width: 640px) {
  nav {
    margin-top: 1.5rem;
    gap: 2rem;
  }
}

nav a {
  font-size: 0.875rem;
  text-transform: uppercase;
  font-family: var(--font-jost);
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  color: var(--text-light);
  text-decoration: none;
}

@media (min-width: 640px) {
  nav a {
    font-size: 1.125rem;
  }
}

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

/* Main Content */
main {
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
}

.content-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .content-grid {
    gap: 3.5rem;
  }
}

@media (min-width: 1280px) {
  .content-grid {
    gap: 5rem;
  }
}

/* Card Sections */
.card-section {
  padding: 1.5rem;
  border-radius: var(--rounded-3xl);
  box-shadow: var(--shadow-xl);
  background: var(--card-bg);
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
}

@media (min-width: 640px) {
  .card-section {
    padding: 3.5rem;
  }
}

/* Section Headers */
.section-header {
  margin-bottom: 2rem;
  font-family: var(--font-jost);
  font-weight: 300;
  font-size: 1.875rem;
  color: var(--text-dark);
}

@media (min-width: 640px) {
  .section-header {
    font-size: 2.25rem;
    margin-bottom: 3rem;
  }
}

/* Hero Section */
.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}

.hero .subtitle {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text);
}

@media (min-width: 640px) {
  .hero .subtitle {
    font-size: 1.5rem;
  }
}

.hero .description {
  font-size: 1.125rem;
  color: var(--text);
}

@media (min-width: 640px) {
  .hero .description {
    font-size: 1.25rem;
  }
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 475px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.project-card:hover {
  opacity: 0.75;
  transform: scale(1.05);
}

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

.project-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-avatar {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background: var(--border);
  border-radius: 9999px;
}

.project-title {
  font-size: 0.875rem;
  font-weight: 700;
  word-break: break-words;
  align-self: center;
}

.project-description {
  font-size: 0.875rem;
  margin-top: 1rem;
  color: var(--text);
}

.project-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}

.project-tech-bar {
  border-top: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.tech-tag {
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.tech-dot {
  width: 0.75rem;
  height: 0.75rem;
  display: inline-block;
  border-radius: 9999px;
}

.tech-rails { background: #cc0000; }
.tech-javascript { background: #f7df1e; }
.tech-postgresql { background: #336791; }
.tech-css { background: #1572b6; }

/* Blog Grid */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 640px) {
  .blog-grid {
    gap: 3rem;
  }
}

.blog-card {
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.blog-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

@media (min-width: 640px) {
  .blog-card {
    padding-bottom: 3rem;
  }

  .blog-card:last-child {
    padding-bottom: 0;
  }
}

.blog-title {
  margin-bottom: 1rem;
  font-family: var(--font-jost);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--text-dark);
}

@media (min-width: 640px) {
  .blog-title {
    font-size: 1.875rem;
    margin-bottom: 1.25rem;
  }
}

.blog-title a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.blog-title a:hover {
  opacity: 0.5;
}

.blog-meta {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-light);
  line-height: 1.2;
}

@media (min-width: 640px) {
  .blog-meta {
    font-size: 1.125rem;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
  }
}

.blog-excerpt {
  margin-bottom: 1rem;
  color: var(--text);
}

@media (min-width: 640px) {
  .blog-excerpt {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

@media (min-width: 640px) {
  .blog-read-more {
    font-size: 1.125rem;
  }
}

.blog-read-more:hover {
  opacity: 0.5;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.skill-category {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-2px);
}

.skill-category h4 {
  margin: 0 0 1rem 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
}

.skill-category p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.6;
}

/* Contact Links */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.contact-link:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* Footer */
footer {
  margin-top: 2.5rem;
  padding-top: 2rem;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--border);
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
}

@media (min-width: 640px) {
  footer {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    font-size: 1rem;
  }
}

@media (min-width: 1280px) {
  footer {
    margin-top: 5rem;
  }
}

/* Blog Article Styles */
.blog-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--rounded-3xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .blog-content {
    padding: 3rem;
  }
}

.blog-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.2;
}

@media (min-width: 640px) {
  .blog-content h1 {
    font-size: 2.5rem;
  }
}

.blog-content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

@media (min-width: 640px) {
  .blog-content h2 {
    font-size: 1.875rem;
  }
}

.blog-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

@media (min-width: 640px) {
  .blog-content h3 {
    font-size: 1.5rem;
  }
}

.blog-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

@media (min-width: 640px) {
  .blog-content p {
    font-size: 1.125rem;
  }
}

.blog-content pre {
  background: #f8f9fa;
  padding: 1.5em;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.blog-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
}

.blog-content pre code {
  background: none;
  padding: 0;
  border: none;
}

.blog-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #374151;
}

.blog-content ul, .blog-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.blog-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.back-link {
  margin-bottom: 2rem;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.back-link a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.author-info {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-style: italic;
  color: var(--text-light);
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .card-section {
    padding: 1rem;
  }
  
  .blog-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-links {
    flex-direction: column;
  }
}
