/* ===== OPTIMIZED READING-FRIENDLY BLOG STYLES ===== */

:root {
  /* Colors */
  --primary: #667eea;
  --primary-light: #8b9df0;
  --primary-dark: #5a6fd8;
  --secondary: #764ba2;
  --accent: #f093fb;
  --text: #2d3748;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --bg: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: "Fira Code", "Monaco", "Consolas", monospace;
  --font-size: 1rem;
  --line-height: 1.7;
  --line-height-heading: 1.3;

  /* Spacing */
  --xs: 0.25rem;
  --sm: 0.5rem;
  --md: 1rem;
  --lg: 1.5rem;
  --xl: 2rem;
  --2xl: 3rem;
  --3xl: 4rem;

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition: 0.2s ease-in-out;
  --transition-fast: 0.15s ease-in-out;
}

/* Dark theme */
[data-theme="dark"] {
  --text: #f7fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #a0aec0;
  --bg: #1a202c;
  --bg-secondary: #2d3748;
  --bg-tertiary: #4a5568;
  --border: #4a5568;
  --border-light: #2d3748;
}

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: var(--line-height-heading);
  color: var(--text);
  margin: var(--xl) 0 var(--md) 0;
  letter-spacing: -0.025em;
  padding-left: 1.5em;
  scroll-margin-top: 80px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

/* Header anchors */
.header-anchor {
  color: inherit;
  text-decoration: none;
  position: relative;
  display: inline-block;
}

.header-anchor::before {
  content: "";
  position: absolute;
  left: -1.2em;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  width: 0.8em;
  height: 0.8em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity var(--transition-fast);
}

h1:hover .header-anchor::before,
h2:hover .header-anchor::before,
h3:hover .header-anchor::before,
h4:hover .header-anchor::before,
h5:hover .header-anchor::before,
h6:hover .header-anchor::before {
  opacity: 1;
}

.header-anchor:hover {
  color: var(--primary);
}

/* Hero headers */
.hero h1,
.about-header h1 {
  padding-left: 0;
}

.hero h1 .header-anchor::before,
.about-header h1 .header-anchor::before {
  display: none;
}

p {
  margin: 0 0 var(--md) 0;
  color: var(--text-secondary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  /* border-bottom: 1px solid transparent; */
}

a:hover {
  color: var(--primary-dark);
  /* border-bottom-color: var(--primary); */
}

/* ===== LAYOUT ===== */
.container {
  max-width: 80ch;
  margin: 0 auto;
  padding: 0 var(--md);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  padding: var(--xl) 0;
}

.main h1,
.main h2,
.main h3,
.main h4,
.main h5,
.main h6,
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  padding-left: 0;
  margin-left: 0;
  text-indent: 0;
}

.content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.content > *:first-child {
  margin-top: 0;
}
.content > *:last-child {
  margin-bottom: 0;
}

/* ===== NAVIGATION ===== */
.navbar {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  transform: translateZ(0);
}

.navbar-container {
  max-width: 80vw;
  margin: 0 auto;
  padding: 0 var(--md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--md);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-brand-text {
  margin-left: 0.5rem;
}

.navbar-brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

/* Ensure Astrodon and About me are always the last two (in this order) */
.navbar-nav > li:has(> a[href="/astrodon"]),
.navbar-nav > li:has(.nav-dropdown-content > a[href="/astrodon"]) {
  order: 103;
}
.navbar-nav > li:has(> a[href="/about_me"]),
.navbar-nav > li:has(.nav-dropdown-content > a[href="/about_me"]) {
  order: 104;
}

/* Ensure Blogs are at the left of the navbar */
.navbar-nav > li:has(> a[href="/blogs"]),
.navbar-nav > li:has(.nav-dropdown-content > a[href="/blogs"]) {
  order: 100;
}
/* Ensure Projects come after Blogs */
.navbar-nav > li:has(> a[href="/projects"]),
.navbar-nav > li:has(.nav-dropdown-content > a[href="/projects"]) {
  order: 101;
}
/* Ensure Tools come after Projects */
.navbar-nav > li:has(> a[href="/tools"]),
.navbar-nav > li:has(.nav-dropdown-content > a[href="/tools"]) {
  order: 102;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  transition: all var(--transition);
  position: relative;
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: fit-content;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(118, 75, 162, 0.05) 100%
  );
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
  letter-spacing: 0.025em;
}

.nav-link:hover,
.nav-link:focus {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.15) 0%,
    rgba(118, 75, 162, 0.15) 100%
  );
  color: var(--primary);
  text-decoration: none;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25),
    0 4px 10px rgba(102, 126, 234, 0.1);
  outline: none;
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-link.active,
.nav-item.active .nav-link {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4),
    0 4px 15px rgba(102, 126, 234, 0.2);
  border-color: var(--primary);
  transform: translateY(-2px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-link.active:hover,
.nav-item.active .nav-link:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #6b46c1 100%);
  color: white;
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5),
    0 6px 20px rgba(102, 126, 234, 0.3);
  transform: translateY(-3px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 1.5px 4px rgba(0, 0, 0, 0.08);
  min-width: 200px;
  z-index: 2000;
  background: var(--bg);
  border: 1px solid var(--border);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

.mobile-menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform var(--transition);
}

.mobile-menu-toggle.active svg {
  transform: rotate(90deg);
}

.nav-dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  background: var(--bg);
  border: none;
}

.nav-dropdown-item:first-child {
  border-start-start-radius: var(--radius);
  border-start-end-radius: var(--radius);
}

.nav-dropdown-item:last-child {
  border-end-end-radius: var(--radius);
  border-end-start-radius: var(--radius);
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus {
  background: var(--bg-secondary);
  color: var(--primary);
  outline: none;
  font-weight: 600;
}

.nav-dropdown-item.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.nav-dropdown-item.active:hover {
  background: var(--primary-dark);
  color: white;
}

.nav-dropdown-separator {
  height: 1px;
  background-color: var(--border);
  margin: var(--xs) 0;
  opacity: 0.6;
}

.nav-dropdown-toggle::after {
  content: "▼";
  transform: rotate(90deg);
  margin-left: 0.5rem;
  font-size: 0.75rem;
  transition: transform var(--transition);
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
  transform: rotate(0deg);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--border);
  padding: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xl) !important;
  z-index: 100;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
  transition: fill var(--transition-fast);
  display: block;
  margin: 0 auto;
  padding: 0;
}

.theme-toggle:hover svg {
  fill: var(--primary);
}

/* ===== HERO SECTIONS ===== */
.hero,
.about-header {
  color: white;
  padding: var(--3xl) var(--md);
  text-align: center;
  margin: calc(-1 * var(--md)) calc(-1 * var(--md)) var(--xl)
    calc(-1 * var(--md));
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.about-header {
  background: linear-gradient(135deg, var(--accent) 0%, #f5576c 100%);
}

.hero h1,
.about-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
  margin: var(--md) 0 0 0;
  opacity: 0.95;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
}

.about-header h1 {
  font-size: 2rem;
  font-weight: 700;
}

/* ===== CONTENT ELEMENTS ===== */
blockquote {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
  border-left: 4px solid var(--primary);
  margin: var(--xl) 0;
  padding: var(--xl);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  position: relative;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.7;
  box-shadow: var(--shadow);
  font-family: var(--font-serif);
}

blockquote cite {
  display: block;
  margin-top: var(--md);
  font-style: normal;
  font-weight: 600;
  color: var(--primary);
  text-align: right;
  font-size: 0.9rem;
  font-family: var(--font);
}

blockquote blockquote {
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, #e6f9f0 0%, #d1fae5 100%);
}

/* Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--lg);
  margin: var(--xl) 0;
}

.feature-card {
  background: var(--bg);
  padding: var(--lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.feature-card h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.25rem;
}

/* Tags - only for metadata and specific tag elements, not for HTML tags in code */
.metadata .tag,
.blog-card-tag,
.content-card-tag,
.tech-tag {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: var(--xs) var(--sm);
  border-radius: var(--radius);
  font-size: 0.8rem;
  margin: var(--xs);
  font-weight: 500;
  transition: background-color var(--transition-fast);
}

.metadata .tag:hover,
.blog-card-tag:hover,
.content-card-tag:hover,
.tech-tag:hover {
  background: var(--primary-dark);
  color: white;
}

/* ===== CODE BLOCKS ===== */
pre {
  background: var(--bg-tertiary);
  padding: var(--lg);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--lg) 0;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  background: var(--bg-tertiary);
  padding: var(--xs) var(--sm);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
  border: 1px solid var(--border-light);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

pre code {
  background: none;
  padding: 0;
  margin: 0;
  border: none;
  color: inherit;
}

.code-block-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--lg) 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
}

.code-block-container pre {
  margin: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--bg-tertiary);
}

.code-block-container code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
}

.code-block-header {
  background: var(--bg-secondary);
  padding: var(--sm) var(--md);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.code-block-header .language-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--primary);
  font-weight: 600;
}

.code-block-header .copy-button {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--xs) var(--sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font);
}

.code-block-header .copy-button:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.code-block-header .copy-button.copied {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

/* ===== LISTS ===== */
ul,
ol {
  margin: var(--sm) 0;
  padding-left: var(--xl);
}

li {
  margin: var(--xs) 0;
  color: var(--text-secondary);
}

/* Definition lists */
dl {
  margin: var(--md) 0;
  padding: 0 var(--md);
  background-color: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

dt {
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--xs);
  font-size: 1.05em;
}

dd {
  margin: 0 0 var(--md) var(--md);
  color: var(--text-secondary);
  line-height: var(--line-height);
}

dd:last-child {
  margin-bottom: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--lg) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 480px) {
  .table-responsive {
    max-width: 100vw;
  }
  .table-responsive table {
    width: 100%;
    min-width: unset;
  }
}

th,
td {
  padding: var(--md);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text);
}

tr:hover {
  background: var(--bg-secondary);
}

/* Images */
img {
  max-width: 100%;
  max-height: 50vh;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin: var(--lg) 0;
  object-fit: contain;
}

/* Horizontal rule */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: var(--2xl) 0;
  border-radius: var(--radius-sm);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  padding: var(--xl) var(--md);
  margin-top: var(--3xl);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
}

/* ===== BLOG CARDS ===== */
.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--lg);
  margin-bottom: var(--lg);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.blog-card:hover::before {
  transform: scaleX(1);
}

.blog-card-header {
  margin-bottom: var(--md);
}

.blog-card-title {
  margin: 0 0 var(--sm) 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.blog-card-link {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-card-link:hover {
  color: var(--primary);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--md);
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.blog-card-date {
  font-weight: 500;
}

.blog-card-author {
  font-style: italic;
}

.blog-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: var(--md) 0;
  font-size: 0.95rem;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sm);
  margin-top: var(--md);
}

.blog-card-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: var(--xs) var(--sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: all var(--transition-fast);
}

.blog-card-tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* ===== CONTENT CARDS ===== */
.content-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--lg);
  margin-bottom: var(--lg);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary);
}

.content-card:hover::before {
  transform: scaleX(1);
}

.content-card-header {
  margin-bottom: var(--md);
}

.content-card-title {
  margin: 0 0 var(--sm) 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.content-card-link-wrapper {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: block;
}

.content-card-link-wrapper:hover {
  color: var(--secondary);
}

.content-card-meta {
  display: flex;
  align-items: center;
  gap: var(--md);
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.content-card-date {
  font-weight: 500;
}

.content-card-author {
  font-style: italic;
}

.content-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: var(--md) 0;
  font-size: 0.95rem;
}

.content-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sm);
  margin-top: var(--md);
}

.content-card-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: var(--xs) var(--sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: all var(--transition-fast);
}

.content-card-tag:hover {
  background: var(--secondary);
  color: white;
  transform: translateY(-1px);
}

/* ===== METADATA ===== */
.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 2rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.metadata .author {
  color: var(--primary);
  font-weight: 500;
}

.metadata .date {
  color: var(--text-muted);
}

.metadata .tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.navbar-logo {
  height: 1.5rem;
  width: 1.5rem;
  vertical-align: middle;
  margin-right: 0.5rem;
  display: inline-block;
}

/* ===== TASK LISTS ===== */
.task-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
  position: relative;
}

.task-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 0.375rem;
  background: var(--bg);
  cursor: not-allowed;
  position: relative;
  flex-shrink: 0;
  margin-top: 0.125rem;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-list-item input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.task-list-item input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.875rem;
  font-weight: bold;
  line-height: 1;
}

/* Dark theme overrides for task lists */
[data-theme="dark"] .task-list-item input[type="checkbox"] {
  background: var(--bg-secondary);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .task-list-item input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(139, 157, 240, 0.4);
}

/* ===== MATH ===== */
.math-inline {
  font-family: var(--font-mono);
  background: #f3f4f6;
  padding: 0.1em 0.3em;
  border-radius: 0.25em;
  font-size: 1em;
  color: #2d3748;
}

.math-block {
  font-family: var(--font-mono);
  background: #f3f4f6;
  padding: 1em;
  border-radius: 0.5em;
  font-size: 1.1em;
  color: #2d3748;
  margin: 1.5em 0;
  text-align: center;
  overflow-x: auto;
}

/* ===== FOOTNOTES ===== */
.footnotes {
  font-size: 0.95em;
  color: var(--text-muted);
  margin-top: 2em;
  border-top: 1px solid var(--border);
  padding-top: 1em;
}

.footnotes ol {
  padding-left: 1.5em;
}

.footnote-ref {
  font-size: 0.85em;
  vertical-align: super;
}

.footnote-backref {
  text-decoration: none;
  margin-left: 0.5em;
  font-size: 0.9em;
}

.footnotes li[id^="footnote-"] {
  scroll-margin-top: 90px;
}

/* ===== ABBREVIATIONS ===== */
abbr {
  text-decoration: underline dotted;
  text-decoration-color: var(--primary);
  cursor: help;
  border-bottom: 1px dotted var(--primary);
  text-decoration-skip-ink: none;
  position: relative;
}

abbr::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 0.5em 0.75em;
  border-radius: var(--radius);
  font-size: 0.85em;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  pointer-events: none;
  margin-bottom: 0.5em;
}

abbr::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  margin-bottom: -0.5em;
}

abbr:hover::after,
abbr:hover::before {
  opacity: 1;
  visibility: visible;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  z-index: 1000;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* Dark theme support for back to top button */
[data-theme="dark"] .back-to-top {
  background: var(--primary);
  color: white;
}

[data-theme="dark"] .back-to-top:hover {
  background: var(--primary-dark);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  :root {
    --xl: 1.5rem;
    --2xl: 2rem;
    --3xl: 2.5rem;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }

  .back-to-top svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 var(--sm);
  }
  blockquote {
    padding: var(--md);
    font-size: 1rem;
  }

  /* Mobile Navigation */
  .navbar-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 var(--sm);
    min-height: 3rem;
    gap: var(--sm);
  }

  .navbar-brand {
    flex: 0 0 auto;
    font-size: 1.25rem;
  }

  .navbar-brand-text {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0.4rem;
  }

  .navbar-nav {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 999;
    max-height: calc(100vh - 100%);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    backdrop-filter: blur(8px);
  }

  .navbar-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Prevent body scroll when mobile menu is open */
  body.mobile-menu-open {
    overflow: hidden;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    width: 100%;
    padding: 1rem var(--md);
    font-size: 1rem;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    justify-content: flex-start;
    height: auto;
    min-height: 3rem;
    display: flex;
    align-items: center;
  }

  .nav-link:hover,
  .nav-link:focus {
    background: var(--bg-secondary);
    transform: none;
    box-shadow: none;
  }

  .nav-link.active,
  .nav-item.active .nav-link {
    background: var(--primary);
    color: white;
    transform: none;
    box-shadow: none;
  }

  /* Mobile Dropdown */
  .nav-dropdown {
    width: 100%;
  }

  /* Disable hover behavior on mobile */
  .nav-dropdown:hover .nav-dropdown-content {
    display: none !important;
  }

  .nav-dropdown-content {
    position: static;
    display: none !important;
    box-shadow: none;
    border: none;
    background: var(--bg-secondary);
    transform: none;
    opacity: 1;
    min-width: 100%;
    border-radius: 0;
    transition: none;
  }

  .nav-dropdown.active .nav-dropdown-content {
    display: block !important;
  }

  .nav-dropdown-item {
    padding: 0.75rem var(--xl);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
  }

  .nav-dropdown-item:last-child {
    border-bottom: none;
  }

  .nav-dropdown-toggle::after {
    transform: rotate(0deg);
    margin-left: auto;
    transition: transform var(--transition);
  }

  .nav-dropdown.active .nav-dropdown-toggle::after {
    transform: rotate(180deg);
  }

  /* Ensure proper spacing for mobile nav items */
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    flex: 0 0 auto;
    position: static;
    margin-left: var(--sm);
    margin-right: 0;
    transform: none;
    width: 36px;
    height: 36px;
    padding: 0.4rem;
  }

  .blog-card {
    padding: var(--md);
    margin-bottom: var(--md);
  }

  .blog-card-title {
    font-size: 1.1rem;
  }
  .blog-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sm);
  }

  .blog-card-tags {
    gap: var(--xs);
  }
  .blog-card-tag {
    font-size: 0.7rem;
    padding: 0.125rem var(--xs);
  }

  .content-card {
    padding: var(--md);
    margin-bottom: var(--md);
  }

  .content-card-title {
    font-size: 1.1rem;
  }

  .content-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sm);
  }

  .content-card-tags {
    gap: var(--xs);
  }

  .content-card-tag {
    font-size: 0.7rem;
    padding: 0.125rem var(--xs);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .hero,
  .about-header {
    padding: var(--2xl) var(--sm);
  }

  .navbar-container {
    padding: 0 var(--xs);
    gap: var(--xs);
    min-height: 2.5rem;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  .mobile-menu-toggle {
    width: 32px;
    height: 32px;
    padding: 0.3rem;
  }

  .nav-link {
    padding: 0.875rem var(--md);
    font-size: 0.95rem;
  }

  .nav-dropdown-item {
    padding: 0.75rem var(--lg);
  }

  .header-anchor::before {
    left: -1em;
    font-size: 0.7em;
  }

  h1:hover .header-anchor::before,
  h2:hover .header-anchor::before,
  h3:hover .header-anchor::before,
  h4:hover .header-anchor::before,
  h5:hover .header-anchor::before,
  h6:hover .header-anchor::before {
    opacity: 0.8;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    padding: 0.3rem;
  }
}

@media (max-width: 320px) {
  .navbar {
    padding: 0.4rem 0;
  }

  .navbar-container {
    padding: 0 0.5rem;
    gap: 0.5rem;
    min-height: 2.2rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .mobile-menu-toggle {
    width: 28px;
    height: 28px;
    padding: 0.25rem;
  }

  .nav-link {
    padding: 0.75rem var(--md);
    font-size: 0.9rem;
  }

  .nav-dropdown-item {
    padding: 0.75rem var(--md);
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
    padding: 0.25rem;
  }

  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0.5rem;
  border-radius: 0.25rem;
}

@media (prefers-contrast: high) {
  :root {
    --text: #000000;
    --text-secondary: #333333;
    --border: #000000;
  }
}

/* ===== THEME TRANSITIONS ===== */
* {
  transition: background-color var(--transition), color var(--transition-fast),
    border-color var(--transition);
}

/* ===== DARK THEME OVERRIDES ===== */
[data-theme="dark"] .nav-link {
  color: var(--text);
  background: linear-gradient(
    135deg,
    rgba(139, 157, 240, 0.08) 0%,
    rgba(210, 168, 255, 0.08) 100%
  );
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link:focus {
  background: linear-gradient(
    135deg,
    rgba(139, 157, 240, 0.2) 0%,
    rgba(210, 168, 255, 0.2) 100%
  );
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 157, 240, 0.3),
    0 4px 10px rgba(139, 157, 240, 0.15);
  outline: none;
}

[data-theme="dark"] .nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .nav-item.active .nav-link {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(139, 157, 240, 0.5),
    0 4px 15px rgba(139, 157, 240, 0.3);
  transform: translateY(-2px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-link.active:hover,
[data-theme="dark"] .nav-item.active .nav-link:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #6b46c1 100%);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(139, 157, 240, 0.6),
    0 6px 20px rgba(139, 157, 240, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .nav-dropdown-content {
  background: var(--bg);
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 1.5px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .nav-dropdown-item {
  color: var(--text);
  background: var(--bg);
}

[data-theme="dark"] .nav-dropdown-item:hover,
[data-theme="dark"] .nav-dropdown-item:focus {
  background: var(--bg-secondary);
  color: var(--primary);
  outline: none;
  font-weight: 600;
}

[data-theme="dark"] .nav-dropdown-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

[data-theme="dark"] .nav-dropdown-item.active {
  background: var(--primary);
  color: white;
}

[data-theme="dark"] .nav-dropdown-item.active:hover {
  background: var(--primary-dark);
  color: white;
}

[data-theme="dark"] .nav-dropdown-separator {
  background-color: var(--border);
  opacity: 0.4;
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] dl {
  background-color: var(--bg-tertiary);
  border-left-color: var(--primary-light);
}

[data-theme="dark"] dt {
  color: var(--text);
}

[data-theme="dark"] dd {
  color: var(--text-secondary);
}

[data-theme="dark"] .blog-card {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .blog-card:hover {
  border-color: var(--primary-light);
  background: var(--bg-tertiary);
}

[data-theme="dark"] .blog-card-tag {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

[data-theme="dark"] .blog-card-tag:hover {
  background: var(--primary);
  color: white;
}

[data-theme="dark"] .content-card {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .content-card:hover {
  border-color: var(--secondary);
  background: var(--bg-tertiary);
}

[data-theme="dark"] .content-card-tag {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

[data-theme="dark"] .content-card-tag:hover {
  background: var(--secondary);
  color: white;
}

[data-theme="dark"] abbr::after {
  background: var(--bg-secondary);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] abbr::before {
  border-top-color: var(--bg-secondary);
}

/* ===== DARK THEME CODE BLOCKS ===== */
[data-theme="dark"] pre {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] code {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

[data-theme="dark"] .code-block-container {
  border-color: #334155;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .code-block-container pre {
  background: #1e293b;
  color: #e2e8f0;
}

[data-theme="dark"] .code-block-header {
  background: #334155;
  border-bottom-color: #475569;
  color: #94a3b8;
}

[data-theme="dark"] .code-block-header .copy-button {
  background: #475569;
  border-color: #64748b;
  color: #cbd5e1;
}

[data-theme="dark"] .code-block-header .copy-button:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

[data-theme="dark"] .code-block-header .copy-button.copied {
  background: #059669;
  color: white;
  border-color: #059669;
}

/* ===== PRINT STYLES ===== */
@media print {
  .hero,
  .about-header {
    background: none !important;
    color: var(--text) !important;
    box-shadow: none;
  }

  .hero h1,
  .about-header h1 {
    color: var(--text) !important;
  }

  .feature-card {
    box-shadow: none;
    border: 1px solid var(--border);
  }

  blockquote {
    box-shadow: none;
    border: 1px solid var(--border);
  }

  .footer {
    display: none;
  }
}

/* PrismJS overrides */
pre[class*="language-"] {
  margin: 0 !important;
}
code[class*="language-"],
pre[class*="language-"] {
  text-shadow: none !important;
}
.language-css .token.string,
.style .token.string,
.token.entity,
.token.operator,
.token.url {
  background: unset !important;
}

/* Dark theme PrismJS overrides */
[data-theme="dark"] pre[class*="language-"] {
  color: #e2e8f0 !important;
}
[data-theme="dark"] code[class*="language-"] {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .token.comment,
[data-theme="dark"] .token.prolog,
[data-theme="dark"] .token.doctype,
[data-theme="dark"] .token.cdata {
  color: #94a3b8 !important;
}
[data-theme="dark"] .token.punctuation {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .token.namespace {
  opacity: 0.7;
}
[data-theme="dark"] .token.property,
[data-theme="dark"] .token.tag,
[data-theme="dark"] .token.boolean,
[data-theme="dark"] .token.number,
[data-theme="dark"] .token.constant,
[data-theme="dark"] .token.symbol,
[data-theme="dark"] .token.deleted {
  color: #fbbf24 !important;
}
[data-theme="dark"] .token.selector,
[data-theme="dark"] .token.attr-name,
[data-theme="dark"] .token.string,
[data-theme="dark"] .token.char,
[data-theme="dark"] .token.builtin,
[data-theme="dark"] .token.inserted {
  color: #34d399 !important;
}
[data-theme="dark"] .token.operator,
[data-theme="dark"] .token.entity,
[data-theme="dark"] .token.url,
[data-theme="dark"] .language-css .token.string,
[data-theme="dark"] .style .token.string {
  color: #60a5fa !important;
  background: unset !important;
}
[data-theme="dark"] .token.atrule,
[data-theme="dark"] .token.attr-value,
[data-theme="dark"] .token.keyword {
  color: #a78bfa !important;
}
[data-theme="dark"] .token.function,
[data-theme="dark"] .token.class-name {
  color: #f87171 !important;
}
[data-theme="dark"] .token.regex,
[data-theme="dark"] .token.important,
[data-theme="dark"] .token.variable {
  color: #fbbf24 !important;
}
[data-theme="dark"] .token.important,
[data-theme="dark"] .token.bold {
  font-weight: bold;
}
[data-theme="dark"] .token.italic {
  font-style: italic;
}
[data-theme="dark"] .token.entity {
  cursor: help;
}

/* ===== PORTFOLIO SPECIFIC STYLES ===== */

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: var(--3xl);
  margin: calc(-1 * var(--xl)) calc(-1 * var(--xl)) var(--3xl)
    calc(-1 * var(--xl));
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--xl);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: var(--lg);
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: var(--2xl);
  opacity: 0.95;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: var(--lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* CTA Buttons */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--lg) var(--2xl);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  min-width: 160px;
}

.cta-button.primary {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.cta-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: var(--primary-dark);
}

.cta-button.secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Project Cards */
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--2xl);
  margin: var(--xl) 0;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card.featured {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.project-card.featured::before {
  transform: scaleX(1);
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: var(--md);
  color: var(--text);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: var(--lg);
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sm);
  margin-bottom: var(--lg);
}

.tech-tag {
  background: var(--primary);
  color: white;
  padding: var(--xs) var(--md);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: var(--md);
  flex-wrap: wrap;
}

.project-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  padding: var(--sm) var(--md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.project-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Tech Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--xl);
  margin: var(--2xl) 0;
}

.tech-category {
  background: var(--bg-secondary);
  padding: var(--xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.tech-category h4 {
  color: var(--text);
  margin-bottom: var(--lg);
  font-size: 1.25rem;
  font-weight: 700;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sm);
}

.tech-item {
  background: var(--bg);
  color: var(--text-secondary);
  padding: var(--xs) var(--md);
  border-radius: var(--radius);
  font-size: 0.875rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.tech-item:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
  padding: var(--3xl);
  border-radius: var(--radius-xl);
  text-align: center;
  margin: var(--3xl) 0;
  border: 1px solid var(--border);
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: var(--lg);
  color: var(--text);
}

.cta-section p {
  font-size: 1.125rem;
  margin-bottom: var(--2xl);
  color: var(--text-secondary);
}

.cta-buttons {
  display: flex;
  gap: var(--lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer Links */
.footer-links {
  text-align: center;
  margin-top: var(--3xl);
  padding: var(--xl);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.footer-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin: 0 var(--sm);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary-dark);
}

/* Dark theme adjustments for portfolio */
[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

[data-theme="dark"] .project-card {
  background: var(--bg);
  border-color: var(--border);
}

[data-theme="dark"] .project-card.featured {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .tech-category {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .tech-item {
  background: var(--bg);
  border-color: var(--border);
}

[data-theme="dark"] .cta-section {
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
  border-color: var(--border);
}

[data-theme="dark"] .footer-links {
  background: var(--bg-secondary);
  border-color: var(--border);
}

/* Mobile responsiveness for portfolio */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .cta-button {
    width: 100%;
    max-width: 280px;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-section {
    padding: var(--2xl);
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .project-card {
    padding: var(--xl);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-section {
    padding: var(--2xl) 0;
    margin: calc(-1 * var(--md)) calc(-1 * var(--md)) var(--2xl)
      calc(-1 * var(--md));
  }

  .hero-content {
    padding: 0 var(--md);
  }

  .project-card {
    padding: var(--lg);
  }

  .tech-category {
    padding: var(--lg);
  }

  .cta-section {
    padding: var(--xl);
  }
}

.tech-icon {
  width: 48px;
  height: 48px;
  vertical-align: middle;
  margin-right: 8px;
  background-color: transparent;
}

img.tech-icon {
  box-shadow: none;
  border-radius: 0;
}

.bg-black {
  background-color: black;
}

.bg-white {
  background-color: white;
}
