/* ================ */
/* ROOT & BASE STYLES */
/* ================ */
:root {
  /* Color Variables */
  --primary: #60A5FA;
  --primary-light: #93C5FD;
  --primary-dark: #1E40AF;
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --bg-color: #0F172A;
  --content-bg: #1E293B;
  --content-border: #334155;
  --code-bg: #334155;
  --accent: #7C3AED;
  --highlight: rgba(96, 165, 250, 0.1);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.8;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

/* ================ */
/* UTILITY CLASSES */
/* ================ */
.gradient-text {
  background: var(--text-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-accent {
  color: #10B981;
}

.bg-gradient-to-br.from-primary.to-accent {
  background-image: linear-gradient(to bottom right, #3B82F6, #10B981);
}

/* ================ */
/* LAYOUT COMPONENTS */
/* ================ */
.essay-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
}

.essay-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px 3px 0 0;
}

.intense-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(45deg, #0f172a 0%, #1e293b 100%);
}

/* ================ */
/* TYPOGRAPHY & CONTENT */
/* ================ */
.essay-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.essay-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.essay-content {
  font-size: 1.125rem;
  line-height: 1.7;
}

.essay-content p {
  margin-bottom: 1.75rem;
}

.essay-content h2 {
  font-size: 1.75rem;
  font-weight: 650;
  margin: 3.5rem 0 1.5rem;
  color: var(--primary-light);
  position: relative;
  padding-bottom: 0.5rem;
}


.essay-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2.5rem 0 1.25rem;
  color: var(--text-primary);
}

/* ================ */
/* INTERACTIVE ELEMENTS */
/* ================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}

.essay-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px dotted var(--primary);
}

.essay-content a:hover {
  color: var(--primary-light);
  border-bottom-style: solid;
}

.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.skill-icon {
  transition: transform 0.3s ease;
}

.skill-box:hover .skill-icon {
  transform: scale(1.1);
}

.further-reading a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--primary-dark);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
  border: none;
}

.further-reading a:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

/* ================ */
/* CONTENT BLOCKS */
/* ================ */
blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background-color: var(--highlight);
  border-radius: 0 6px 6px 0;
  font-style: normal;
}

.key-quote {
  background-color: rgba(124, 58, 237, 0.1);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 2.5rem 0;
}

.key-quote::before {
  content: "🔑";
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--content-border), transparent);
  margin: 3.5rem 0;
}

/* Lists */
ul,
ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.75rem;
  position: relative;
}

ul li::before {
  color: var(--primary);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

ol {
  counter-reset: item;
}

ol li {
  counter-increment: item;
}

ol li::before {
  content: counter(item) ".";
  color: var(--primary);
  font-weight: bold;
  display: inline-block;
  width: 1.5em;
  margin-left: -1.5em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--content-border);
}

th {
  background-color: var(--primary-dark);
  color: white;
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: rgba(30, 64, 175, 0.1);
}

/* Code */
pre {
  background-color: var(--code-bg);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--content-border);
}

code {
  font-family: var(--font-mono);
  background-color: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--content-border);
}

/* Do's and Don'ts */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.dos,
.donts {
  padding: 1.5rem;
  border-radius: 8px;
}

.dos {
  background-color: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10B981;
}

.donts {
  background-color: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #EF4444;
}

.dos h3,
.donts h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dos h3::before {
  content: "✓";
  color: #10B981;
}

.donts h3::before {
  content: "✗";
  color: #EF4444;
}

/* ================ */
/* SPECIAL EFFECTS */
/* ================ */
.liquid-blob {
  position: absolute;
  width: 1vw;
  height: 1vh;
  background: radial-gradient(circle at 50% 50%,
      rgba(59, 130, 246, 0.6) 0%,
      rgba(16, 185, 129, 0.4) 40%,
      transparent 100%);
  animation: blob-morph 25s infinite ease-in-out;
}

@keyframes blob-morph {
  0% {
    border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
  }

  50% {
    border-radius: 60% 40% 40% 60% / 40% 60% 40% 60%;
  }

  100% {
    border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
  }
}

.particle-storm {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(16, 185, 129, 0.8);
  border-radius: 50%;
  filter: blur(2px);
  transition: all 0.5s ease-out;
}

.light-trail {
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle,
      rgba(59, 130, 246, 0.2) 0%,
      transparent 100%);
  filter: blur(30px);
  pointer-events: none;
  opacity: 0;
}

/* ================ */
/* SCROLLBAR */
/* ================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c7c7c7;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.dark ::-webkit-scrollbar-track {
  background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ================ */
/* RESPONSIVE ADJUSTMENTS */
/* ================ */
@media (max-width: 768px) {
  .essay-container {
    padding: 2rem 1.25rem;
  }

  .essay-title {
    font-size: 2rem;
  }

  .essay-content h2 {
    font-size: 1.5rem;
    margin: 3rem 0 1.25rem;
  }

  .dos-donts {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
