/* Base styles */
:root {
  --primary-color: #3273dc;
  --primary-color-light: #3291ff;
  --primary-color-dark: #0050b3;
  --text-color: #333;
  --background-color: #000000;
  --background-color-alt: #000000;
  --border-color: #000000;
}

.dark {
  --text-color: #f0f0f0;
  --background-color: #000000;
  --background-color-alt: #000000;
  --border-color: #000000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body {
  color: var(--text-color);
  background-color: var(--background-color);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-color-light);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Import component styles */
/* 

/* Custom CSS for cybersecurity portfolio based on the provided design */

:root {
  --primary-color: #3273dc; /* Using the exact color from globals.css */
  --primary-color-light: #5499df;
  --primary-color-dark: #2366c9;
  --text-color: #ddd;
  --text-color-dark: #ffffff;
  --text-color-light: #9ca3af;
  --background-color: #121212;
  --background-color-alt: #1e1e1e;
  --border-color: #333;
}

/* Always using dark theme now based on screenshots */
html,
body,
.dark {
  --text-color: #ddd;
  --text-color-dark: #ffffff;
  --text-color-light: #9ca3af;
  --background-color: #000000;
  --background-color-alt: #000000;
  --border-color: #000000;
}

/* Main container */
.main {
  max-width: 768px;
  margin: 0 auto;
}

/* Profile section styling */
.profile {
  text-align: center;
}

.profile img {
  border-radius: 50%;
  max-width: 150px;
  margin: 0 auto;
}

.profile h1 {
  margin-top: 1rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.profile .subtitle {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* Button styling */
.button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white !important;
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
  margin: 0.5rem;
}

.button:hover {
  background-color: var(--primary-color-light);
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-color-light);
  text-decoration: underline;
}

/* Cards for projects */
.card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card h3 {
  color: var(--primary-color);
  margin-top: 0;
}

.card img {
  border-radius: 5px;
  margin-bottom: 1rem;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.nav a {
  color: var(--text-color);
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
}

/* Social icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background-color-alt);
  color: var(--primary-color);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Blog posts */
.post-entry {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-entry:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Timeline for education and work experience */
.timeline {
  margin-top: 1rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--primary-color);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.timeline-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-color-light);
}

.timeline-location {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Certifications */
.certifications {
  margin-top: 2rem;
}

.certifications-list {
  list-style-type: none;
  padding-left: 0;
}

.certifications-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.certifications-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Publications */
.publications {
  margin-top: 2rem;
}

.publications-list {
  list-style-type: none;
  padding-left: 0;
}

.publications-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.publications-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* Project cards in grid layout */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  background-color: var(--background-color-alt);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

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

.project-card h3 {
  margin-top: 0;
  color: var(--text-color-dark);
  font-size: 1.5rem;
}

.project-card p {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.tech-tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--background-color);
  border-radius: 20px;
  color: var(--text-color-light);
}

.learn-more {
  color: var(--primary-color);
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}

/* Contact form */
.contact-form {
  margin-top: 2rem;
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--background-color-alt);
  color: var(--text-color);
}

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

.submit-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-button:hover {
  background-color: var(--primary-color-light);
}

.table-of-contents {
  background-color: #1a1a1a;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-left: 4px solid #60a5fa;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #ddd;
}

.table-of-contents h2 {
  margin-top: 0;
  color: #60a5fa;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.table-of-contents ul {
  padding-left: 1.25rem;
  margin: 0;
  list-style: disc;
}

.table-of-contents ul ul {
  padding-left: 1.25rem;
  list-style: circle;
}

.table-of-contents a {
  color: #9bd7ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.table-of-contents a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* Ensure figure align=center is centered properly */
figure.align-center {
    text-align: center;
  }
  
  figure.align-center img {
    display: inline-block;
  }
  
/* Scrollable code blocks */
div.highlight pre {
  overflow-x: auto;
  white-space: pre;
}





/* Styling for blog section and Medium feed */

.medium-feed {
  margin-bottom: 2rem;
}

.medium-feed h2 {
  color: #3273dc;
  margin-bottom: 1.5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

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

.post-entry {
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1.5rem;
  background-color: #1e1e1e;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-entry:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.post-entry h3 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.post-entry h3 a {
  color: #3273dc;
  text-decoration: none;
}

.post-entry h3 a:hover {
  color: #2366c9;
  text-decoration: underline;
}

.post-meta {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.dark .post-meta {
  color: #aaa;
}

.post-entry p {
  margin-bottom: 1rem;
  flex-grow: 1;
  color: #ccc;
}

.read-more {
  display: inline-block;
  color: #3273dc;
  font-weight: 500;
  text-decoration: none;
  margin-top: auto;
}

.read-more:hover {
  color: #2366c9;
  text-decoration: underline;
}

/* Single blog post styling */
.blog-post {
  max-width: 768px;
  margin: 0 auto;
  color: #ccc;
}

.blog-post h1 {
  color: #3273dc;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post .post-meta {
  margin-bottom: 2rem;
  color: #aaa;
}

.blog-post img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 2rem 0;
}

.blog-post pre {
  background-color: #2d2d2d;
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-post code {
  font-family: monospace;
  font-size: 0.9em;
  color: #60a5fa;
}

/* Ensure figure align=center is centered properly */
figure.align-center {
  text-align: center;
}

figure.align-center img {
  display: inline-block;
}

/* Scrollable code blocks */
div.highlight pre {
  overflow-x: auto;
  white-space: pre;
}

strong {
  color: #3273dc; /* dark yellow (Solarized theme color) */
  font-weight: bold;
}


p > strong:only-child {
  display: inline;
}

p:has(> strong:only-child) {
  margin-bottom: 0 !important;
}


 */

/* Responsive design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

.table-of-contents {
  background-color: #1a1a1a;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid #fdfdfd;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #ddd;
}

.table-of-contents h2 {
  margin-top: 0;
  color: #60a5fa;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.table-of-contents ul {
  padding-left: 1.25rem;
  margin: 0;
  list-style: disc;
}

.table-of-contents ul ul {
  padding-left: 1.25rem;
  list-style: circle;
}

.table-of-contents a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.table-of-contents a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.collapsible-toc {
  margin: 2rem 0;
  background-color: #1a1a1a;
  border-radius: 8px;
  border-left: 4px solid #ffffff;
  padding: 1rem;
  overflow: hidden;
}

.toc-toggle {
  background-color: transparent;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: #60a5fa;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.toc-toggle:hover {
  text-decoration: underline;
}

.toc-content {
  display: block; /* default to open — change to 'none' if you want collapsed by default */
}

.toc-content ul {
  list-style: disc;
  margin-left: 1.5rem;
}

.toc-content ul ul {
  list-style: circle;
  margin-left: 1.25rem;
}

.toc-content a {
  color: #ffffff;
  text-decoration: none;
}

.toc-content a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.collapsible-toc {
  margin: 2rem 0;
  background-color: #1a1a1a;
  border-left: 4px solid #ffffff;
  border-radius: 8px;
  padding: 1rem;
  overflow: hidden;
}

.toc-toggle {
  background-color: transparent;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: #60a5fa;
  cursor: pointer;
  margin-bottom: 0.5rem;
  padding-left: 0;
}

.toc-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease-in-out;
}

.toc-content.expanded {
  max-height: 1000px; /* Arbitrary big value */
  transition: max-height 0.4s ease-in-out;
}

.toc-content ul {
  list-style: disc;
  margin-left: 1.5rem;
}

.toc-content ul ul {
  list-style: circle;
  margin-left: 1.25rem;
}

.toc-content a {
  color: #ffffff;
  text-decoration: none;
}

.toc-content a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* Heading color variations within the content */
.content h1 {
  color: #1b71fc; /* Primary blue */
}
.content h2 {
  color: #2a81f3; /* A slightly darker blue */
}
.content h3 {
  color: #4686e6; /* Mid-tone blue */
}
.content h4 {
  color: #5797f8; /* Darker blue */
}
.content h5 {
  color: #79abf7;
}
.content h6 {
  color: #8ab1ec;
}

/* (Optional) Adjust spacing for headings */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.post-entry {
  display: block;
  background-color: #1c1c1c;
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 transparent;
}

.post-entry:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.post-thumbnail {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.post-meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.read-more {
  color: #60a5fa;
  font-weight: 500;
  display: inline-block;
  margin-top: 0.75rem;
}

.kind-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.6rem;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
  border: 1px solid transparent;
}

.kind-product {
  background-color: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

.kind-tool {
  background-color: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.35);
}

.kind-research {
  background-color: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.35);
}

.kind-lab {
  background-color: rgba(161, 161, 170, 0.12);
  color: #d4d4d8;
  border-color: rgba(161, 161, 170, 0.35);
}

.blog-timeline {
  max-width: 800px;
  margin: auto;
  padding: 2rem;
}

.blog-description {
  color: #aaa;
  margin-bottom: 2rem;
}

.timeline {
  position: relative;
  border-left: 2px solid #333;
  padding-left: 1.5rem;
}

.timeline-item {
  margin-bottom: 2rem;
  position: relative;
}

.timeline-date {
  position: absolute;
  left: -10.5rem;
  width: 9rem;
  color: #bbb;
  font-size: 0.9rem;
  text-align: right;
}

.timeline-content h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.read-article {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
}

.read-article:hover {
  text-decoration: underline;
}

.blog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1rem;
  background-color: #000000;
  color: #ffffff;
  font-family: "Arial", sans-serif;
}

.blog-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.blog-description {
  font-size: 1rem;
  color: #9ca3af;
  margin-bottom: 2.5rem;
}

.timeline-wrapper {
  position: relative;
  padding-left: 140px;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100px;
  width: 2px;
  background-color: #374151;
}

.timeline-posts {
  position: relative;
}

.timeline-entry {
  display: flex;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-date {
  width: 100px;
  font-size: 1rem;
  color: #6b7280;
  flex-shrink: 0;
}

.timeline-dot {
  position: absolute;
  left: 94px;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  background-color: #000000;
  border: 4px solid #000000;
  border-radius: 50%;
  z-index: 1;
}

.timeline-content {
  padding-left: 2rem;
}

.timeline-content h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.timeline-content p {
  color: #9ca3af;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.timeline-content a {
  color: #3685e6;
  text-decoration: none;
  font-size: 1rem;
}

.timeline-content a:hover {
  text-decoration: underline;
}

.timeline-content-read a {
  color: #2468bb;
  text-decoration: none;
  font-size: 1rem;
}

/* Ensure figure align=center is centered properly */
figure.align-center {
  text-align: center;
}

figure.align-center img {
  display: inline-block;
}

/* Scrollable code blocks */
div.highlight pre {
  overflow-x: auto;
  white-space: pre;
}

/* Ensure relative container for positioning */
.highlight {
  position: relative;
  overflow: visible; /* fixes clipping */
}

/* Actual copy button styling */
.copy-button {
  position: absolute;
  top: 0rem;
  right: 0rem;
  background-color: #222;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
  cursor: pointer;
  z-index: 10;
  opacity: 0.85;
  transition: all 0.2s ease-in-out;
}

.copy-button:hover {
  opacity: 1;
  background-color: #444;
}

.newsletter-promo {
  margin-bottom: 3rem; /* ensures clear separation from blog posts */
}

.newsletter-promo .blog-description {
  margin-bottom: 0.5em; /* Reduce space below the paragraph */
}

.subscribe-container {
  margin-top: 0rem;
  margin-bottom: 3rem; /* pushes it away from the timeline */
  text-align: center;
}

.subscribe-button {
  display: inline-block;
  color: #fff;
  font-size: 0.95rem;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease;
}

.subscribe-button:hover {
  background-color: #050508; /* Slightly lighter */
  border-color: #4b5563;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.span-for-inline {
  color: #2876d6; /* Matches your primary blue */
  text-decoration: underline;
  font-weight: 500;
}

.markdown-content {
  text-align: justify;
}

.reading-time {
  color: #aaa;
  margin-left: 4px;
}

.inline-code {
  background-color: #252525; /* Dark background */
  color: #6caaf7; /* Tailwind's yellow-400 */
  font-family: "Fira Code", monospace;
  font-size: 0.875rem; /* text-sm */
  padding: 0.15rem 0.4rem;
  border-radius: 0.21rem;
  white-space: nowrap;
}

.link-buttons {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.link-buttons a {
  color: #3b82f6;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.link-buttons a:hover {
  color: #2563eb;
}

.machine-list-clean ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.machine-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #2d2d2d;
}

.machine-name {
  color: #60a5fa;
  font-weight: 500;
  text-decoration: none;
}

.machine-name:hover {
  text-decoration: underline;
}

.machine-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.difficulty {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.easy {
  background-color: #1f3f20;
  color: #4ade80;
}

.medium {
  background-color: #433800;
  color: #facc15;
}

.hard {
  background-color: #451a03;
  color: #fb923c;
}

.insane {
  background-color: #3b0764;
  color: #c084fc;
}

.os {
  background-color: #2a2a2a;
  color: #a5f3fc;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
