/* ==========================================================================
   DG Tech - Main Stylesheet
   Dark mode tech theme inspired by Vercel, Linear
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Colors - Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --bg-card-hover: #22222e;

  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #6366f1, #22d3ee);

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Borders */
  --border-color: #2a2a3a;
  --border-color-hover: #3a3a4a;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

/* Cursor blink animation */
.nav__logo-cursor {
  animation: blink 1s linear infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); color: var(--text-secondary); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-2xl); }
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

strong {
  font-weight: 600;
  color: var(--text-primary);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--bg-card);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   4. Layout & Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }
}

.section {
  padding: var(--space-16) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-24) 0;
  }
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   5. Skip Link (Accessibility)
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: var(--text-primary);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   6. Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-4);
  height: 64px;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.nav__logo:hover {
  color: var(--text-primary);
}

.nav__logo-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 60;
}

.nav__toggle-icon {
  position: relative;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-base);
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-base);
}

.nav__toggle-icon::before {
  top: -8px;
}

.nav__toggle-icon::after {
  bottom: -8px;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon {
  background-color: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::after {
  bottom: 0;
  transform: rotate(-45deg);
}

.nav__menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  list-style: none;
}

.nav__menu.is-open {
  display: flex;
}

.nav__link {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    gap: var(--space-6);
  }

  .nav__link {
    font-size: var(--text-sm);
  }
}

/* ==========================================================================
   7. Footer
   ========================================================================== */

.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-12) 0 var(--space-8);
}

.footer__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.footer__main {
  display: grid;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .footer__main {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.footer__logo:hover {
  color: var(--text-primary);
}

.footer__logo-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__tagline {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

.footer__nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__nav a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.footer__nav a:hover {
  color: var(--text-primary);
}

.footer__social-title {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.footer__social-links {
  list-style: none;
  display: flex;
  gap: var(--space-4);
}

.footer__social-links a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer__social-links .icon {
  width: 24px;
  height: 24px;
}

.footer__bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer__copyright {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   8. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  background: var(--accent-gradient);
  color: var(--text-primary);
}

.btn--primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: var(--text-primary);
}

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

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

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ==========================================================================
   9. Cards
   ========================================================================== */

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

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

.card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card__content {
  padding: var(--space-6);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.card__description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.card__tag {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   10. Forms
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

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

.form-error {
  font-size: var(--text-sm);
  color: #ef4444;
  margin-top: var(--space-1);
}

.form-input.is-invalid,
.form-textarea.is-invalid {
  border-color: #ef4444;
}

/* Honeypot field */
.form-hidden {
  position: absolute;
  left: -9999px;
}

/* ==========================================================================
   11. Hero Section
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-4);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(34, 211, 238, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.hero__content {
  max-width: var(--container-narrow);
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.hero__title-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__title-line {
  display: block;
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    var(--accent-primary) 25%,
    var(--accent-secondary) 50%,
    var(--accent-primary) 75%,
    var(--text-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s linear infinite;
}

.hero__title-line:nth-child(1) {
  animation-delay: 0s;
}

.hero__title-line:nth-child(2) {
  animation-delay: 0.3s;
}

.hero__title-line:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes gradientFlow {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .hero__title {
    font-size: var(--text-5xl);
  }

  .hero__subtitle {
    font-size: var(--text-2xl);
  }
}

/* ==========================================================================
   12. About Section
   ========================================================================== */

.about {
  background-color: var(--bg-secondary);
}

.about__content {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 768px) {
  .about__content {
    grid-template-columns: 1fr 1.5fr;
  }
}

.about__image {
  position: relative;
}

.about__photo {
  width: auto;
  height: auto;
  max-width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.about__text h3 {
  margin-bottom: var(--space-4);
}

.about__text p {
  margin-bottom: var(--space-6);
}

.about__skills {
  display: grid;
  gap: var(--space-4);
}

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

.skill-category {
  padding: var(--space-4);
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.skill-category__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: var(--space-2);
}

.skill-category__items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.skill-category__items li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   13. Portfolio Section
   ========================================================================== */

.portfolio__grid {
  display: grid;
  gap: var(--space-6);
}

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

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

/* ==========================================================================
   14. Contact Section
   ========================================================================== */

.contact__content {
  display: grid;
  gap: var(--space-12);
}

@media (min-width: 768px) {
  .contact__content {
    grid-template-columns: 1fr 1fr;
  }
}

.contact__info h3 {
  margin-bottom: var(--space-4);
}

.contact__social {
  margin-top: var(--space-6);
}

.contact__social-links {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.contact__social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.contact__social-links a:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.contact__social-links .icon {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   15. Blog Styles
   ========================================================================== */

.blog-list {
  padding-top: calc(64px + var(--space-16));
}

/* Blog Articles List */
.blog-list__articles {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: var(--container-narrow);
  margin: 0 auto;
}

/* Article Teaser - Inline Style */
.article-teaser {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.article-teaser:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateX(4px);
}

.article-teaser__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  text-decoration: none;
  color: inherit;
}

@media (min-width: 640px) {
  .article-teaser__link {
    flex-direction: row;
    gap: var(--space-6);
    align-items: flex-start;
  }
}

.article-teaser__meta {
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
  align-items: center;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .article-teaser__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    min-width: 120px;
  }
}

.article-teaser__date {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.article-teaser__category {
  display: inline-block;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.article-teaser__content {
  flex: 1;
}

.article-teaser__title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
  line-height: 1.3;
  color: var(--text-primary);
}

.article-teaser__description {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.article-teaser__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.article-teaser__tag {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-2);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.article-teaser:hover .article-teaser__tag {
  background: var(--bg-card);
  color: var(--text-secondary);
}

/* Latest Posts Section (Home) */
.latest-posts__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.latest-posts__more {
  text-align: center;
  margin-top: var(--space-8);
}

/* Compact variant for homepage */
.article-teaser--compact {
  padding: var(--space-4) var(--space-5);
}

.article-teaser--compact .article-teaser__description {
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Single Article */
.article {
  padding-top: calc(64px + var(--space-16));
  padding-bottom: var(--space-16);
}

.article__header {
  max-width: var(--container-narrow);
  margin: 0 auto var(--space-12);
  text-align: center;
}

.article__meta {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.article__content {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.article__content h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
}

.article__content h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.article__content h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-muted);
}

.article__content p {
  margin-bottom: var(--space-6);
}

.article__content ul,
.article__content ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
  color: var(--text-secondary);
}

.article__content li {
  margin-bottom: var(--space-2);
}

.article__content img {
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
}

.article__content pre {
  background-color: var(--bg-card);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
}

.article__content pre code {
  background: transparent;
  padding: 0;
}

/* ==========================================================================
   Syntax Highlighting (Prism.js)
   ========================================================================== */

code[class*="language-"],
pre[class*="language-"] {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.6;
  tab-size: 2;
  hyphens: none;
}

pre[class*="language-"] {
  padding: var(--space-4);
  margin: var(--space-6) 0;
  overflow: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

:not(pre) > code[class*="language-"] {
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

/* Tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--text-muted);
  font-style: italic;
}

.token.punctuation {
  color: var(--text-secondary);
}

.token.namespace {
  opacity: 0.7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #f472b6;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #a5f3fc;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: var(--text-secondary);
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: var(--accent-primary);
}

.token.function,
.token.class-name {
  color: var(--accent-secondary);
}

.token.regex,
.token.important,
.token.variable {
  color: #fbbf24;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* Line numbers */
pre[class*="language-"].line-numbers {
  position: relative;
  padding-left: 3.8em;
  counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
  position: relative;
  white-space: inherit;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -3.8em;
  width: 3em;
  letter-spacing: -1px;
  border-right: 1px solid var(--border-color);
  user-select: none;
}

.line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: var(--text-muted);
  display: block;
  padding-right: 0.8em;
  text-align: right;
}

.article__content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ==========================================================================
   16. Project Detail Page
   ========================================================================== */

.project-detail {
  padding-top: calc(64px + var(--space-16));
  padding-bottom: var(--space-16);
}

.project-detail__header {
  max-width: var(--container-max);
  margin: 0 auto var(--space-8);
}

.project-detail__image {
  width: 100%;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
}

.project-detail__content {
  display: grid;
  gap: var(--space-8);
}

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

.project-detail__main {
  max-width: var(--container-narrow);
}

.project-detail__main h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
}

.project-detail__main h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.project-detail__main p {
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.project-detail__main ul,
.project-detail__main ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
  color: var(--text-secondary);
}

.project-detail__main li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.project-detail__main img {
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
}

.project-detail__main blockquote {
  border-left: 3px solid var(--accent-primary);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.project-detail__sidebar {
  padding: var(--space-6);
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  height: fit-content;
}

.project-detail__sidebar h3 {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.project-detail__sidebar p,
.project-detail__sidebar ul {
  margin-bottom: var(--space-4);
}

.project-detail__technologies {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.project-detail__technologies li {
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-3);
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   17. Success Page
   ========================================================================== */

.success {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
}

.success__content {
  max-width: 500px;
}

.success__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success__icon svg {
  width: 40px;
  height: 40px;
  color: var(--text-primary);
}

.success__title {
  margin-bottom: var(--space-4);
}

.success__text {
  margin-bottom: var(--space-8);
}

/* ==========================================================================
   18. Utilities
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-primary); }

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Grid background effect */
.grid-bg {
  position: relative;
}

.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  pointer-events: none;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

.breadcrumb__separator {
  color: var(--text-muted);
}

/* ==========================================================================
   19. Scroll Animations
   ========================================================================== */

/* Fade in from bottom */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left */
.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-left,
  .fade-in-right,
  .scale-in,
  .stagger-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__title-line {
    animation: none;
    background: var(--accent-gradient);
  }
}

/* ==========================================================================
   20. Enhanced Hover Effects
   ========================================================================== */


/* Button pulse effect */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn--primary:hover::before {
  opacity: 1;
}

.btn--primary:hover {
  box-shadow:
    var(--shadow-glow),
    0 0 30px rgba(99, 102, 241, 0.4),
    0 0 60px rgba(34, 211, 238, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.btn--primary:active {
  transform: translateY(0) scale(0.98);
}

/* Secondary button hover */
.btn--secondary:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

/* Navigation link underline effect */
.nav__link {
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav__link:hover::after,
.nav__link--active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Social link hover */
.contact__social-links a:hover,
.footer__social-links a:hover {
  transform: translateY(-4px) rotate(-5deg);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.footer__social-links a {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer__social-links a:hover {
  color: var(--accent-secondary);
  transform: translateY(-3px) scale(1.1);
}

/* Skill category hover */
.skill-category {
  transition: all 0.3s ease;
}

.skill-category:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(99, 102, 241, 0.1);
}

.skill-category:hover .skill-category__title {
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Form input focus glow */
.form-input:focus,
.form-textarea:focus {
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.2),
    0 0 20px rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   21. Hero Enhancements
   ========================================================================== */

/* Animated gradient background */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroGlow {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) rotate(10deg);
    opacity: 1;
  }
}

/* Hero title animation */
.hero__title {
  animation: fadeInUp 0.8s ease-out;
}

.hero__subtitle {
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero__description {
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero__cta {
  animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient text shimmer effect */
.hero__title-accent {
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Floating animation for profile photo */
.about__photo {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.about__image::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: var(--accent-gradient);
  border-radius: var(--radius-xl);
  opacity: 0.2;
  filter: blur(40px);
  z-index: -1;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(1.05);
  }
}

/* ==========================================================================
   22. Interactive Elements
   ========================================================================== */

/* Magnetic effect on hover (for buttons) */
.btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* Project detail sidebar */
.project-detail__sidebar {
  transition: all 0.3s ease;
}

.project-detail__sidebar:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
}

/* Technology tags hover */
.project-detail__technologies li {
  transition: all 0.2s ease;
  cursor: default;
}

.project-detail__technologies li:hover {
  background-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Success icon animation */
.success__icon {
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.success__icon svg {
  animation: checkDraw 0.5s ease-out 0.3s backwards;
}

@keyframes checkDraw {
  from {
    stroke-dashoffset: 50;
    stroke-dasharray: 50;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ==========================================================================
   23. Cursor & Selection Effects
   ========================================================================== */

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

/* Link hover glow */
a:not(.btn):not(.nav__link):not(.card):hover {
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

/* Blockquote enhancement */
.article__content blockquote {
  position: relative;
  transition: all 0.3s ease;
}

.article__content blockquote:hover {
  border-left-color: var(--accent-secondary);
  transform: translateX(5px);
}

.article__content blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: -10px;
  font-size: 4rem;
  color: var(--accent-primary);
  opacity: 0.2;
  font-family: Georgia, serif;
}

/* ==========================================================================
   24. AI/Neural Network Background Decorations
   ========================================================================== */

/* Neural network nodes container */
.neural-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Floating nodes */
.neural-bg::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 8%),
    radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.06) 0%, transparent 8%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 12%),
    radial-gradient(circle at 20% 70%, rgba(34, 211, 238, 0.05) 0%, transparent 6%),
    radial-gradient(circle at 80% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 6%),
    radial-gradient(circle at 30% 40%, rgba(34, 211, 238, 0.03) 0%, transparent 4%),
    radial-gradient(circle at 70% 60%, rgba(99, 102, 241, 0.03) 0%, transparent 4%);
  animation: neuralFloat 20s ease-in-out infinite;
}

@keyframes neuralFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(2%, -1%) scale(1.02);
  }
  50% {
    transform: translate(-1%, 2%) scale(0.98);
  }
  75% {
    transform: translate(-2%, -1%) scale(1.01);
  }
}

/* Hero neural network decoration */
.hero {
  position: relative;
}

.hero .neural-nodes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* SVG-based neural network pattern for hero */
.hero::before {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(34, 211, 238, 0.1) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%236366f1' opacity='0.15'/%3E%3Ccircle cx='10' cy='10' r='1' fill='%2322d3ee' opacity='0.1'/%3E%3Ccircle cx='50' cy='50' r='1' fill='%2322d3ee' opacity='0.1'/%3E%3Ccircle cx='50' cy='10' r='0.8' fill='%236366f1' opacity='0.08'/%3E%3Ccircle cx='10' cy='50' r='0.8' fill='%236366f1' opacity='0.08'/%3E%3C/svg%3E");
}

/* Connection lines pattern */
.connections-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.connections-bg::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='0' y1='50' x2='50' y2='0' stroke='%236366f1' stroke-width='0.3' opacity='0.3'/%3E%3Cline x1='50' y1='100' x2='100' y2='50' stroke='%2322d3ee' stroke-width='0.3' opacity='0.2'/%3E%3Cline x1='25' y1='75' x2='75' y2='25' stroke='%236366f1' stroke-width='0.2' opacity='0.15'/%3E%3Ccircle cx='50' cy='50' r='2' fill='%236366f1' opacity='0.2'/%3E%3Ccircle cx='0' cy='50' r='1.5' fill='%2322d3ee' opacity='0.15'/%3E%3Ccircle cx='100' cy='50' r='1.5' fill='%2322d3ee' opacity='0.15'/%3E%3Ccircle cx='50' cy='0' r='1.5' fill='%236366f1' opacity='0.15'/%3E%3Ccircle cx='50' cy='100' r='1.5' fill='%236366f1' opacity='0.15'/%3E%3C/svg%3E");
  animation: connectionsDrift 30s linear infinite;
}

@keyframes connectionsDrift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(-25%, -25%) rotate(5deg);
  }
}

/* About section neural decoration */
.about {
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='grad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236366f1;stop-opacity:0.1' /%3E%3Cstop offset='100%25' style='stop-color:%2322d3ee;stop-opacity:0.05' /%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='350' cy='100' r='3' fill='%236366f1' opacity='0.2'/%3E%3Ccircle cx='300' cy='150' r='2' fill='%2322d3ee' opacity='0.15'/%3E%3Ccircle cx='380' cy='200' r='2.5' fill='%236366f1' opacity='0.15'/%3E%3Ccircle cx='320' cy='80' r='1.5' fill='%2322d3ee' opacity='0.1'/%3E%3Ccircle cx='360' cy='250' r='2' fill='%236366f1' opacity='0.12'/%3E%3Ccircle cx='280' cy='120' r='1.8' fill='%2322d3ee' opacity='0.1'/%3E%3Cline x1='350' y1='100' x2='300' y2='150' stroke='url(%23grad)' stroke-width='1' opacity='0.3'/%3E%3Cline x1='300' y1='150' x2='380' y2='200' stroke='url(%23grad)' stroke-width='1' opacity='0.25'/%3E%3Cline x1='350' y1='100' x2='320' y2='80' stroke='url(%23grad)' stroke-width='0.8' opacity='0.2'/%3E%3Cline x1='380' y1='200' x2='360' y2='250' stroke='url(%23grad)' stroke-width='0.8' opacity='0.2'/%3E%3Cline x1='320' y1='80' x2='280' y2='120' stroke='url(%23grad)' stroke-width='0.6' opacity='0.15'/%3E%3Cline x1='280' y1='120' x2='300' y2='150' stroke='url(%23grad)' stroke-width='0.6' opacity='0.15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 400px;
  opacity: 0.6;
  pointer-events: none;
  animation: neuralPulse 8s ease-in-out infinite;
}

@keyframes neuralPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.02);
  }
}

/* Portfolio section circuit pattern */
.portfolio {
  position: relative;
}

.portfolio::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.8), transparent),
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 10 L60 50 M60 70 L60 110 M10 60 L50 60 M70 60 L110 60' stroke='%236366f1' stroke-width='0.5' opacity='0.15' fill='none'/%3E%3Ccircle cx='60' cy='60' r='4' fill='none' stroke='%2322d3ee' stroke-width='0.5' opacity='0.2'/%3E%3Ccircle cx='60' cy='60' r='8' fill='none' stroke='%236366f1' stroke-width='0.3' opacity='0.1'/%3E%3Ccircle cx='60' cy='10' r='2' fill='%2322d3ee' opacity='0.15'/%3E%3Ccircle cx='60' cy='110' r='2' fill='%2322d3ee' opacity='0.15'/%3E%3Ccircle cx='10' cy='60' r='2' fill='%236366f1' opacity='0.15'/%3E%3Ccircle cx='110' cy='60' r='2' fill='%236366f1' opacity='0.15'/%3E%3C/svg%3E");
  background-size: auto, 120px 120px;
  pointer-events: none;
  z-index: 0;
}

/* Contact section data flow decoration */
.contact {
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10%;
  width: 40%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='400' viewBox='0 0 200 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='dataFlow' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236366f1;stop-opacity:0' /%3E%3Cstop offset='50%25' style='stop-color:%2322d3ee;stop-opacity:0.3' /%3E%3Cstop offset='100%25' style='stop-color:%236366f1;stop-opacity:0' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M100 0 Q120 100 100 200 Q80 300 100 400' stroke='url(%23dataFlow)' stroke-width='2' fill='none' opacity='0.3'/%3E%3Cpath d='M50 0 Q70 100 50 200 Q30 300 50 400' stroke='url(%23dataFlow)' stroke-width='1' fill='none' opacity='0.2'/%3E%3Cpath d='M150 0 Q170 100 150 200 Q130 300 150 400' stroke='url(%23dataFlow)' stroke-width='1' fill='none' opacity='0.2'/%3E%3Ccircle cx='100' cy='100' r='3' fill='%2322d3ee' opacity='0.3'%3E%3Canimate attributeName='cy' values='0;400' dur='4s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='50' cy='200' r='2' fill='%236366f1' opacity='0.25'%3E%3Canimate attributeName='cy' values='0;400' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='150' cy='300' r='2' fill='%2322d3ee' opacity='0.25'%3E%3Canimate attributeName='cy' values='0;400' dur='5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  opacity: 0.5;
}

/* Blog list page decoration */
.blog-list {
  position: relative;
}

.blog-list::before {
  content: '';
  position: absolute;
  top: 100px;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: blobFloat 10s ease-in-out infinite;
}

.blog-list::after {
  content: '';
  position: absolute;
  bottom: 100px;
  left: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: blobFloat 12s ease-in-out infinite reverse;
}

@keyframes blobFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(20px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-10px, 20px) scale(0.95);
  }
}

/* Hexagon grid for tech feel */
.hex-grid-bg {
  position: relative;
}

.hex-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='50' height='43.4' viewBox='0 0 50 43.4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='25,0 50,14.4 50,43.4 25,28.9 0,43.4 0,14.4' fill='none' stroke='%236366f1' stroke-width='0.3' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 50px 43.4px;
  opacity: 0.5;
  pointer-events: none;
}

/* Animated dot matrix for footer */
.site-footer {
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image:
    radial-gradient(circle at 2px 2px, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.3;
}

/* Glowing orbs for accent */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.glow-orb--primary {
  background: var(--accent-primary);
  opacity: 0.15;
}

.glow-orb--secondary {
  background: var(--accent-secondary);
  opacity: 0.1;
}

/* Binary rain effect (very subtle) */
.binary-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.03;
}

.binary-rain::before {
  content: '10110100101101001011010010110100101101001011010010110100';
  position: absolute;
  top: -100%;
  left: 10%;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-primary);
  writing-mode: vertical-rl;
  animation: binaryFall 20s linear infinite;
}

.binary-rain::after {
  content: '01001011010010110100101101001011010010110100101101001011';
  position: absolute;
  top: -100%;
  right: 15%;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-secondary);
  writing-mode: vertical-rl;
  animation: binaryFall 25s linear infinite 5s;
}

@keyframes binaryFall {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(calc(100vh + 100%));
  }
}

/* Hero Neural Network SVG */
.hero__neural-network {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.neural-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .neural-svg {
    opacity: 0.4;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .neural-svg animate,
  .neural-svg animateMotion {
    animation: none;
  }

  .neural-bg::before,
  .connections-bg::before,
  .about::before,
  .binary-rain::before,
  .binary-rain::after {
    animation: none;
  }
}
