/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050810;
  color: #e5e7eb;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Grid Backdrop */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Geometric Lines - Subtle accent lines */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, transparent 0%, rgba(56, 189, 248, 0.02) 50%, transparent 100%),
    linear-gradient(45deg, transparent 0%, rgba(56, 189, 248, 0.01) 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Layout */
.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  position: relative;
  z-index: 1;
}

/* Header / Nav with Glassmorphism */
.site-header {
  border-bottom: 1px solid rgba(17, 24, 39, 0.8);
  background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #38bdf8;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #e5e7eb;
}

.nav-links a.active {
  color: #38bdf8;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #7dd3fc);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(17, 24, 39, 0.8);
  padding: 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  font-family: 'Inter', sans-serif;
  position: relative;
  z-index: 1;
}

/* Sections */
.section {
  margin-top: 2.5rem;
}

.section:first-child {
  margin-top: 0;
}

.section h1 {
  margin-bottom: 1rem;
  color: #f9fafb;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section h2 {
  margin-bottom: 0.75rem;
  color: #f9fafb;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section h3 {
  margin-bottom: 0.5rem;
  color: #f9fafb;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.4;
}

.section p {
  color: #d1d5db;
  margin-bottom: 1rem;
}

.section ul {
  color: #d1d5db;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.section ul li {
  margin-bottom: 0.5rem;
}

/* Hero Section with Subtle Glow */
.hero-section {
  position: relative;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-content .profile-photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  margin-bottom: 0;
}

.hero-text {
  flex: 1;
  min-width: 280px;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: #f9fafb;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Cards with Thin Borders */
.card-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  border: 1px solid #111827;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(56, 189, 248, 0.1);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-tag {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
}

.article-date {
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.25rem;
}

.card h3 a {
  color: #f9fafb;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card h3 a:hover {
  color: #38bdf8;
}

/* Links */
a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7dd3fc;
}

/* Utility */
.muted {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Profile Section */
.profile-section {
  text-align: left;
  margin-top: 2rem;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 5%;
  border: 2px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.15), 0 0 60px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.03);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.25), 0 0 80px rgba(0, 0, 0, 0.4);
}

/* Blockquotes */
blockquote {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid rgba(56, 189, 248, 0.4);
  color: #d1d5db;
  font-style: italic;
  position: relative;
}

blockquote::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #38bdf8, rgba(56, 189, 248, 0.3));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

/* Images in Articles */
.section img:not(.profile-photo) {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid rgba(17, 24, 39, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Code/Monospace Elements */
code, pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

/* Preview Cards Section */
.preview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.preview-card {
  display: block;
  border: 1px solid rgba(17, 24, 39, 0.8);
  border-radius: 0.75rem;
  padding: 1.75rem;
  background: rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(125, 211, 252, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.preview-card:hover {
  transform: scale(1.03) translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(56, 189, 248, 0.15),
    inset 0 0 20px rgba(56, 189, 248, 0.05);
}

.preview-card:hover::before {
  opacity: 1;
}

.preview-card:hover::after {
  opacity: 1;
}

.preview-card h3 {
  margin-bottom: 0.75rem;
  color: #f9fafb;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.preview-card:hover h3 {
  color: #38bdf8;
}

.preview-card p {
  margin-bottom: 0;
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-inner {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .hero-content .profile-photo {
    width: 160px;
    height: 160px;
  }

  .hero-text {
    width: 100%;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section h1 {
    font-size: 1.75rem;
  }

  .section h2 {
    font-size: 1.35rem;
  }

  main {
    padding: 1.5rem 1rem 2rem;
  }

  .preview-cards {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .preview-card {
    padding: 1.5rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection Color */
::selection {
  background: rgba(56, 189, 248, 0.3);
  color: #f9fafb;
}

::-moz-selection {
  background: rgba(56, 189, 248, 0.3);
  color: #f9fafb;
}
