:root {
  --primary-color: #1a1a1a;
  --secondary-color: #666;
  --accent-color: #fff;
  --paper-color: #f5f5f5;
}

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

body {
  font-family: 'Space Mono', monospace;
  background-color: var(--paper-color);
  color: var(--primary-color);
  line-height: 1.6;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  min-height: 300vh;
  transition: all 0.5s ease;
}

body.inverted {
  background-color: var(--primary-color);
  color: var(--paper-color);
}

.typewriter {
  border-right: 2px solid var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3.5s steps(40, end);
}

body.inverted .typewriter {
  border-right: 2px solid var(--paper-color);
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

body.inverted .typewriter {
  animation:
    typing 3.5s steps(40, end),
    blink-caret-inverted 0.75s step-end infinite;
}

@keyframes blink-caret-inverted {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--paper-color);
  }
}

header {
  margin-bottom: 4rem;
  position: relative;
}

h1 {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--secondary-color);
  font-style: italic;
}

body.inverted .subtitle {
  color: #999;
}

section {
  margin-bottom: 3rem;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 400;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -5px;
  left: 0;
  background: var(--primary-color);
  transition: all 0.5s ease;
}

body.inverted h2::after {
  background: var(--paper-color);
}

p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
}

.quote {
  font-style: italic;
  color: #000;
  border-left: 3px solid #000;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-size: 1.1em;
}

.links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.links a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  transition: all 0.5s ease;
}

body.inverted .links a {
  color: var(--paper-color);
}

.links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

body.inverted .links a::after {
  background-color: var(--paper-color);
}

.links a:hover::after {
  width: 100%;
}

.equation {
  font-family: 'Space Mono', monospace;
  margin: 1.5rem 0;
  padding: 0.8rem;
  background: #f8f8f8;
  border: 1px solid #000;
  border-radius: 4px;
  display: inline-block;
  font-size: 1.2em;
  letter-spacing: 1px;
}

body.inverted .equation {
  background: rgba(255, 255, 255, 0.05);
}

.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.inspiration-card {
  padding: 1rem;
  border: 1px solid var(--primary-color);
  transition: transform 0.3s ease;
}

.inspiration-card:hover {
  transform: translateY(-2px);
}

.inspiration-card h3 {
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .typewriter {
    white-space: normal;
    overflow: visible;
    animation: typing-mobile 3.5s steps(20, end);
  }

  .inspiration-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes typing-mobile {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.paper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--paper-color);
  z-index: -1;
  transition: all 0.5s ease;
}

body.inverted .paper {
  background: var(--primary-color);
}

.paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  transition: all 0.5s ease;
}

body.inverted .paper::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}

.project {
  margin-bottom: 2rem;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 400;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--primary-color);
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-title::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.project.active .project-title::after {
  transform: rotate(45deg);
}

.project-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s ease;
}

.project.active .project-content {
  max-height: 1000px;
  opacity: 1;
  padding-top: 1rem;
}

.project-date {
  color: var(--secondary-color);
  font-style: italic;
  margin-bottom: 1rem;
}

body.inverted .project-date {
  color: #999;
}

.project-details {
  list-style-type: none;
  padding-left: 1rem;
}

.project-details li {
  position: relative;
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.3s ease;
}

.project.active .project-details li {
  opacity: 1;
  transform: translateX(0);
}

.project-details li::before {
  content: '∗';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  transition: all 0.5s ease;
}

body.inverted .project-details li::before {
  color: var(--paper-color);
}

.project-details li:nth-child(1) {
  transition-delay: 0.1s;
}
.project-details li:nth-child(2) {
  transition-delay: 0.2s;
}
.project-details li:nth-child(3) {
  transition-delay: 0.3s;
}
.project-details li:nth-child(4) {
  transition-delay: 0.4s;
}
.project-details li:nth-child(5) {
  transition-delay: 0.5s;
}
.project-details li:nth-child(6) {
  transition-delay: 0.6s;
}

@media (hover: hover) {
  .project:hover .project-title {
    border-bottom: 1px solid transparent;
  }

  .project:hover .project-content {
    max-height: 1000px;
    opacity: 1;
    padding-top: 1rem;
  }

  .project:hover .project-details li {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-text {
  line-height: 1.8;
  font-size: 1.1em;
  color: #000;
  margin: 20px 0;
  max-width: 800px;
}

.about-text .highlight {
  color: #000;
  font-weight: 600;
}

.about-text em {
  color: #000;
  font-style: italic;
  font-weight: 500;
}

.about-text strong {
  color: #000;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.about-text u {
  text-decoration: none;
  color: #000;
  font-weight: 500;
}

.skills-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #000;
  background: transparent;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #000;
  color: #fff;
}

.filter-btn.active {
  background: #000;
  color: #fff;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  border: 1px solid #000;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.skill-tag.hidden {
  display: none;
  opacity: 0;
  transform: scale(0);
}

@media (max-width: 768px) {
  .skills-filter {
    gap: 0.3rem;
  }

  .filter-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .skill-tag {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* Blog Section Styles */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.blog-post {
  background: var(--paper-color);
  padding: 1.5rem;
  border: 1px solid var(--primary-color);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

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

.blog-post h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.blog-date {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--secondary-color);
}

body.inverted .blog-post {
  background: var(--primary-color);
  border-color: var(--paper-color);
}

body.inverted .blog-post h3,
body.inverted .blog-excerpt {
  color: var(--paper-color);
}

body.inverted .blog-date {
  color: #999;
}

body.inverted .read-more {
  color: var(--paper-color);
}

body.inverted .read-more:hover {
  color: #999;
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-post {
    padding: 1rem;
  }
}

/* Achievements Section Styles */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.achievement-card {
  background: var(--paper-color);
  padding: 1.5rem;
  border: 1px solid var(--primary-color);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

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

.achievement-card:hover::before {
  width: 8px;
}

.achievement-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.achievement-role {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.achievement-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--primary-color);
}

body.inverted .achievement-card {
  background: var(--primary-color);
  border-color: var(--paper-color);
}

body.inverted .achievement-card::before {
  background: var(--paper-color);
}

body.inverted .achievement-card h3,
body.inverted .achievement-desc {
  color: var(--paper-color);
}

body.inverted .achievement-role {
  color: #999;
}

@media (max-width: 600px) {
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .achievement-card {
    padding: 1rem;
  }
}

/* Blog Page Styles */
.blog-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.blog-intro {
  font-size: 1.5rem;
  line-height: 1.6;
  margin: 2rem 0;
  font-style: italic;
  text-align: center;
}

.blog-highlight {
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--paper-color);
  border-left: 4px solid var(--primary-color);
}

.blog-meta {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin: 1rem 0 2rem;
}

.back-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: color 0.3s ease;
}

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

/* Code Block Styles */
.code-block {
  background: #2d2d2d;
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

.code-block code {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ccc;
}

/* Prism.js Theme Overrides */
.token.comment {
  color: #6a9955;
}

.token.function {
  color: #dcdcaa;
}

.token.keyword {
  color: #569cd6;
}

.token.string {
  color: #ce9178;
}

.token.number {
  color: #b5cea8;
}

.token.operator {
  color: #d4d4d4;
}

body.inverted .code-block {
  background: #1a1a1a;
}

body.inverted .code-block code {
  color: #e0e0e0;
}

@media (max-width: 768px) {
  .code-block {
    padding: 1rem;
  }

  .code-block code {
    font-size: 0.8rem;
  }
}

.blog-list {
  list-style-type: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

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

.blog-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.blog-conclusion {
  font-size: 1.2rem;
  line-height: 1.8;
  margin: 2rem 0;
  text-align: center;
  font-style: italic;
}

body.inverted .blog-highlight {
  background: var(--primary-color);
  border-left-color: var(--paper-color);
}

body.inverted .blog-list li::before {
  color: var(--paper-color);
}

@media (max-width: 768px) {
  .blog-content {
    padding: 1rem;
  }

  .blog-intro {
    font-size: 1.3rem;
  }

  .blog-highlight {
    font-size: 1.1rem;
  }

  .code-block {
    font-size: 0.8rem;
    padding: 1rem;
  }
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.blog-card-link .blog-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px) scale(1.01);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  cursor: pointer;
}

.contact-links {
  margin-top: 0.5em;
  font-size: 1.05em;
}
.contact-links a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  margin: 0 0.2em;
  transition: color 0.2s;
}
.contact-links a:hover {
  color: #0072b1; /* LinkedIn blue, or pick your accent color */
}
.contact-links span {
  color: #888;
  margin: 0 0.2em;
}

.my-second-brain {
  margin: 2em 0;
}

.my-second-brain h2 {
  font-size: 1.8em;
  margin-bottom: 0.5em;
}

.resource-list {
  list-style-type: none; /* Remove default list styling */
  padding: 0;
}

.resource-list li {
  margin: 0.5em 0; /* Space between items */
}

.resource-list a {
  text-decoration: none;
  color: #007bff; /* Link color */
  transition: color 0.3s;
}

.resource-list a:hover {
  color: #0056b3; /* Darker shade on hover */
}

.notes-to-self {
  margin-bottom: 1em; /* Space below the button */
}

.notes-button {
  display: inline-block;
  padding: 0.5em 1em;
  background-color: white; /* White background */
  color: black; /* Black text */
  border: 2px solid black; /* Black border */
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition:
    background-color 0.3s,
    color 0.3s;
}

.notes-button:hover {
  background-color: black; /* Black background on hover */
  color: white; /* White text on hover */
}
