/* Base styles */
:root {
  /* ThingsAI brand colors */
  --thingsai-cyan: #00CED1;
  --thingsai-dark: #1a1a1a;
  --thingsai-white: #ffffff;
  --thingsai-gray: #333333;
  --thingsai-light-gray: #f9f9f9;
  
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9f9;
  --bg-tertiary: #f5f5f5;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border-color: #e8e8e8;
  --border-light: #f0f0f0;
  --shadow-sm: rgba(0, 0, 0, 0.05);
  --shadow-md: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
}

/* Dark mode colors */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;
  --text-primary: #e8e8e8;
  --text-secondary: #b8b8b8;
  --text-tertiary: #888888;
  --border-color: #404040;
  --border-light: #505050;
  --shadow-sm: rgba(0, 0, 0, 0.3);
  --shadow-md: rgba(0, 0, 0, 0.4);
  --shadow-lg: rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  background-color: var(--bg-primary) !important;
  position: relative;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  transition: color 0.3s ease;
}

.site-title .ai-accent {
  color: var(--thingsai-cyan);
  font-weight: 700;
}

.site-nav {
  float: right;
  line-height: 54px;
}

.site-nav .page-link {
  color: var(--text-primary);
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s ease;
}

.site-nav .page-link:hover {
  color: var(--thingsai-cyan);
}

/* Theme switcher */
.theme-switcher {
  display: inline-block;
  margin-left: 15px;
  vertical-align: middle;
}

.theme-toggle {
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
}

.theme-toggle:hover {
  border-color: var(--thingsai-cyan);
  background-color: rgba(0, 206, 209, 0.1);
  transform: rotate(20deg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Language switcher */
.language-switcher {
  display: inline-block;
  margin-left: 20px;
}

.language-switcher .language-link {
  padding: 6px 12px;
  background-color: var(--bg-secondary);
  border-radius: 4px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.language-switcher .language-link:hover {
  background-color: var(--thingsai-cyan);
  color: #fff;
}

/* Mobile menu */
.nav-trigger {
  display: none;
}

.menu-icon {
  display: none;
}

@media screen and (max-width: 600px) {
  .site-nav {
    position: absolute;
    top: 9px;
    right: 10px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: right;
    box-shadow: 0 4px 12px var(--shadow-md);
  }

  .site-nav label[for="nav-trigger"] {
    display: block;
    float: right;
    width: 36px;
    height: 36px;
    z-index: 2;
    cursor: pointer;
  }

  .site-nav .menu-icon {
    display: block;
    float: right;
    width: 36px;
    height: 26px;
    line-height: 0;
    padding-top: 10px;
    text-align: center;
    color: var(--text-primary);
  }

  .site-nav input ~ .trigger {
    clear: both;
    display: none;
  }

  .site-nav input:checked ~ .trigger {
    display: block;
    padding: 10px 0 5px 0;
    background-color: var(--bg-primary);
    border-radius: 0 0 8px 8px;
  }

  .site-nav .page-link {
    display: block;
    padding: 10px 20px;
    margin-left: 0;
    border-top: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
  }
  
  .site-nav .page-link:hover {
    background-color: var(--bg-secondary);
  }
  
  .site-nav .page-link:first-child {
    border-top: none;
  }

  .language-switcher {
    display: block;
    margin-left: 0;
    padding: 10px 20px;
    border-top: 1px solid var(--border-light);
  }

  .language-switcher .language-link {
    display: inline-block;
    text-align: center;
    margin: 0 5px;
  }
  
  .theme-switcher {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
  }
}

/* Easter egg collapsible component */
.easter-egg {
  margin: 20px 0;
  padding: 15px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f4f5 100%);
  border-left: 4px solid var(--thingsai-cyan);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.easter-egg:hover {
  box-shadow: 0 2px 8px var(--shadow-sm);
}

.easter-egg summary {
  cursor: pointer;
  font-style: italic;
  color: var(--text-secondary);
  list-style: none;
  user-select: none;
  transition: color 0.2s ease;
}

.easter-egg summary::-webkit-details-marker {
  display: none;
}

.easter-egg summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 8px;
  font-size: 12px;
  transition: transform 0.3s ease;
  color: var(--thingsai-cyan);
}

.easter-egg[open] summary::before {
  transform: rotate(90deg);
}

.easter-egg summary:hover {
  color: var(--text-primary);
}

.easter-egg summary strong {
  color: var(--text-primary);
}

.easter-egg p {
  margin: 15px 0 5px 0;
  padding-left: 20px;
  line-height: 1.7;
  color: var(--text-primary);
}

.easter-egg p em {
  font-style: italic;
}

[data-theme="dark"] .easter-egg {
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
}

/* Content images with float right on desktop */
.content-image-right {
  height: auto;
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
  .content-image-right {
    float: none;
    display: block;
    margin: 15px auto;
    width: 100% !important;
    max-width: 300px;
  }
}

/* Main content */
.page-content {
  padding: 40px 0;
  flex: 1;
}

/* About page hero banner */
.about-hero {
  margin: 0 0 40px 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-hero img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  display: block;
}

.profile-photo {
  float: right;
  margin: 0 0 20px 30px;
  max-width: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-photo img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .profile-photo {
    float: none;
    margin: 20px auto;
    max-width: 250px;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  background-color: var(--bg-secondary);
  margin-top: 40px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-col-wrapper {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
  margin-bottom: 15px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.contact-list,
.social-media-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li,
.social-media-list li {
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.social-media-list a {
  color: var(--thingsai-cyan);
  text-decoration: none;
  transition: opacity 0.2s ease;
  border-bottom: 1px solid transparent;
}

.social-media-list a:hover {
  opacity: 0.9;
  border-bottom-color: var(--thingsai-cyan);
}

.footer-copyright {
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-copyright a {
  color: var(--thingsai-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease;
}

.footer-copyright a:hover {
  opacity: 0.9;
  border-bottom-color: var(--thingsai-cyan);
}

/* Home page styles */
.home-hero {
  text-align: center;
  padding: 60px 40px;
  background: transparent;
  color: var(--text-primary);
  margin: 0 auto 40px;
  max-width: 900px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow-light);
  transition: all 0.3s ease;
}

.home-hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.home-hero h1 .ai-accent {
  color: var(--thingsai-cyan);
}

.home-hero .tagline {
  font-size: 20px;
  color: var(--text-secondary);
  margin: 0 0 30px;
  font-weight: 300;
}

.home-hero .author-link {
  font-size: 16px;
  color: var(--text-tertiary);
  margin: 0;
}

.home-hero .author-link a {
  color: var(--thingsai-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
  border-bottom: 1px solid transparent;
}

.home-hero .author-link a:hover {
  opacity: 0.9;
  border-bottom-color: var(--thingsai-cyan);
}

.feed-intro {
  max-width: 800px;
  margin: 40px auto 30px;
}

.feed-intro .intro-heading {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0 0 15px 0;
  font-weight: 400;
}

.feed-intro ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.feed-intro ul li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.feed-intro ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--thingsai-cyan);
  font-weight: bold;
}

.feed-intro .intro-tagline {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-tertiary);
  margin: 0;
  font-style: italic;
}

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

.pinned-content {
  margin-top: 40px;
}

.pinned-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 12px;
}

.pinned-content h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--thingsai-cyan);
  border-radius: 2px;
}

/* Post styles */
.post-header,
.essay-header,
.project-header,
.idea-header {
  margin-bottom: 30px;
}

.post-title,
.essay-title,
.project-title,
.idea-title {
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 10px 0;
}

.post-meta,
.essay-meta,
.project-date,
.idea-date {
  color: #666;
  font-size: 14px;
}

.post-content,
.essay-content,
.project-content,
.idea-content {
  margin-bottom: 30px;
}

.post-content h1,
.essay-content h1,
.project-content h1,
.idea-content h1 {
  font-size: 32px;
  margin-top: 40px;
}

.post-content h2,
.essay-content h2,
.project-content h2,
.idea-content h2 {
  font-size: 26px;
  margin-top: 30px;
}

.post-content h3,
.essay-content h3,
.project-content h3,
.idea-content h3 {
  font-size: 22px;
  margin-top: 25px;
}

.post-categories,
.essay-categories,
.project-technologies,
.idea-tags {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
}

.category,
.technology,
.tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: #f0f0f0;
  border-radius: 3px;
  margin-right: 5px;
  font-size: 14px;
}

/* Idea metadata */
.idea-metadata {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
}

.idea-stage,
.idea-priority {
  display: inline-block;
  margin-right: 20px;
}

.stage-raw,
.stage-elaborated,
.stage-refined,
.priority-high,
.priority-medium,
.priority-low {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 13px;
}

.stage-raw {
  background-color: #ffe4e1;
  color: #d32f2f;
}

.stage-elaborated {
  background-color: #fff4e6;
  color: #f57c00;
}

.stage-refined {
  background-color: #e8f5e9;
  color: #388e3c;
}

.priority-high {
  background-color: #ffebee;
  color: #c62828;
}

.priority-medium {
  background-color: #fff3e0;
  color: #ef6c00;
}

.priority-low {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

/* Responsive */
@media screen and (max-width: 600px) {
  .post-title,
  .essay-title,
  .project-title,
  .idea-title {
    font-size: 28px;
  }

  .footer-col-wrapper {
    flex-direction: column;
  }
}

/* Home page styles */
.home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  text-align: center;
  padding: 60px 20px;
  background-color: transparent;
  color: #333;
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  font-weight: 800;
  color: #333;
}

.hero-tagline {
  font-size: 1.3rem;
  margin: 0 0 1rem 0;
  font-weight: 500;
  color: #666;
}

.hero-description {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  color: #666;
}

/* Recent content section */
.recent-content,
.featured-projects {
  margin-bottom: 60px;
}

.recent-content h2,
.featured-projects h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.section-intro {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
}

.content-list,
.content-grid {
  display: grid;
  gap: 30px;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 2rem;
}

.project-item {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.project-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: #0066cc;
}

.project-item h3 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
}

.project-item h3 a {
  color: #1a1a1a;
  text-decoration: none;
}

.project-item h3 a:hover {
  color: #0066cc;
}

.technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
}

.tech-tag {
  padding: 4px 12px;
  background-color: #f0f0f0;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.view-all {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
}

.view-all a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.view-all a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* CTA section */
.cta {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  margin-bottom: 40px;
}

.cta h2 {
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  color: #0066cc;
}

.social-link .icon {
  width: 20px;
  height: 20px;
}

.explore-more {
  margin-top: 1.5rem;
  font-size: 1rem;
}

.explore-more a {
  color: #0066cc;
  font-weight: 600;
  text-decoration: none;
}

.explore-more a:hover {
  text-decoration: underline;
}

.language-note {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  color: #888;
}

/* Responsive home page */
@media screen and (max-width: 768px) {
  .hero {
    padding: 40px 20px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .social-links {
    flex-direction: column;
    align-items: center;
  }
  
  .social-link {
    width: 100%;
    max-width: 300px;
  }
}
