/* Component Styles */

/* Hamburger Icon */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 24px;
  height: 24px;
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

[aria-expanded="true"] .hamburger__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

[aria-expanded="true"] .hamburger__line:nth-child(2) {
  opacity: 0;
}

[aria-expanded="true"] .hamburger__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--color-accent);
}

.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
  width: 20px;
  height: 20px;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

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

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* Code blocks */
pre {
  background-color: var(--color-code-bg);
  color: var(--color-code-text);
  padding: var(--space-4);
  border-radius: 4px;
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-5);
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Inline code */
:not(pre) > code {
  background-color: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 0.125em 0.375em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-2);
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--accent {
  background-color: var(--color-accent);
  color: white;
}

/* Cards */
.card {
  padding: var(--space-5);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

/* Article Card (for blog/notes listings) */
.article-card {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}

.article-card:last-child {
  border-bottom: none;
}

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

.article-card__title a {
  color: var(--color-text-primary);
  text-decoration: none;
}

.article-card__title a:hover {
  color: var(--color-accent);
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.article-card__description {
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* Domain Card (for experience page) */
.domain-card {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-border);
}

.domain-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

.domain-card__section {
  margin-bottom: var(--space-5);
}

.domain-card__section:last-child {
  margin-bottom: 0;
}

.domain-card__section-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text-secondary);
}

/* Thesis Section (Home page) */
.thesis {
  margin-bottom: var(--space-10);
  text-align: center;
  padding: var(--space-8) 0;
}

.thesis__title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.thesis__statement {
  font-size: var(--text-2xl);
  line-height: 1.4;
  color: var(--color-text-primary);
  max-width: 50ch;
  margin: 0 auto var(--space-5);
  font-weight: 400;
}

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

.thesis__context {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 55ch;
  margin: 0 auto;
}

/* Domains List (Home page) */
.domains-list {
  display: grid;
  gap: var(--space-5);
  list-style: none;
  padding: 0;
  margin: 0;
}

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

/* Domain card inside domains-list (home page) */
.domains-list .domain-card {
  padding: var(--space-5);
  background-color: var(--color-bg-secondary);
  border-radius: 8px;
  border: none;
  margin: 0;
}

.domains-list .domain-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.domains-list .domain-card__description {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: 0;
  line-height: 1.6;
}

.domain-item {
  padding: var(--space-4);
  background-color: var(--color-bg-secondary);
  border-radius: 8px;
}

.domain-item__name {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.domain-item__description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* Navigation Prompts (Home page) */
.nav-prompts__grid {
  display: grid;
  gap: var(--space-5);
}

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

.nav-prompt {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.nav-prompt:hover {
  border-color: var(--color-accent);
  background-color: var(--color-bg-tertiary);
  transform: translateY(-2px);
}

.nav-prompt__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-accent);
}

.nav-prompt__description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.nav-prompt:hover .nav-prompt__title {
  color: var(--color-accent-hover);
}

.nav-prompt__arrow {
  transition: transform 0.2s ease;
}

.nav-prompt:hover .nav-prompt__arrow {
  transform: translateX(4px);
}

/* Principles List (About page) */
.principles-list {
  display: grid;
  gap: var(--space-8);
  list-style: none;
  padding: 0;
  margin: 0;
}

.principle {
  padding-left: var(--space-5);
  border-left: 3px solid var(--color-accent);
}

.principle__title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.principle__name {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

.principle__description {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.principle__tradeoff {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background-color: var(--color-bg-secondary);
  padding: var(--space-3) var(--space-4);
  border-radius: 4px;
  margin-bottom: 0;
}

/* Contact Methods */
.contact-methods {
  display: grid;
  gap: var(--space-4);
}

.contact-method {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.contact-method__icon {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.contact-method__link {
  font-size: var(--text-lg);
}

.contact-method div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.contact-method strong {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Availability Section */
.availability__content {
  background-color: var(--color-bg-secondary);
  padding: var(--space-5);
  border-radius: 8px;
}

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

.availability__content ul {
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
}

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

.availability__content p:last-child,
.availability__content ul:last-child {
  margin-bottom: 0;
}

/* Dark Mode Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--color-text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
}

/* Hamburger Icon */
.hamburger {
  width: 24px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger__line {
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav__toggle[aria-expanded="true"] .hamburger__line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .hamburger__line:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .hamburger__line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Prose Content (for long-form content) */
.prose {
  max-width: 65ch;
}

.prose h2 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.prose h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.prose h4 {
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

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

.prose ul,
.prose ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

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

.prose blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-bg-secondary);
  font-style: italic;
  color: var(--color-text-secondary);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose img {
  margin: var(--space-6) 0;
  border-radius: 8px;
}

.prose hr {
  margin: var(--space-8) 0;
  border: none;
  border-top: 1px solid var(--color-border);
}

/* Articles List */
.articles-list {
  display: flex;
  flex-direction: column;
}

/* Article Page Styles */
.article {
  max-width: var(--width-content);
  margin: 0 auto;
}

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

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

.article__title {
  font-size: var(--text-3xl);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

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

.article__description {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

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

.article__footer {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color 0.2s ease;
}

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

/* Badge Variants */
.badge--architecture {
  background-color: #e0f2fe;
  color: #0369a1;
}

.badge--distributed-systems {
  background-color: #fce7f3;
  color: #be185d;
}

.badge--platform {
  background-color: #d1fae5;
  color: #047857;
}

.badge--leadership {
  background-color: #fef3c7;
  color: #b45309;
}

.badge--data {
  background-color: #ede9fe;
  color: #6d28d9;
}

[data-theme="dark"] .badge--architecture {
  background-color: #0c4a6e;
  color: #7dd3fc;
}

[data-theme="dark"] .badge--distributed-systems {
  background-color: #831843;
  color: #f9a8d4;
}

[data-theme="dark"] .badge--platform {
  background-color: #064e3b;
  color: #6ee7b7;
}

[data-theme="dark"] .badge--leadership {
  background-color: #78350f;
  color: #fcd34d;
}

[data-theme="dark"] .badge--data {
  background-color: #4c1d95;
  color: #c4b5fd;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge--architecture {
    background-color: #0c4a6e;
    color: #7dd3fc;
  }

  :root:not([data-theme="light"]) .badge--distributed-systems {
    background-color: #831843;
    color: #f9a8d4;
  }

  :root:not([data-theme="light"]) .badge--platform {
    background-color: #064e3b;
    color: #6ee7b7;
  }

  :root:not([data-theme="light"]) .badge--leadership {
    background-color: #78350f;
    color: #fcd34d;
  }

  :root:not([data-theme="light"]) .badge--data {
    background-color: #4c1d95;
    color: #c4b5fd;
  }
}

/* Notes List & Note Cards */
.notes-list {
  display: flex;
  flex-direction: column;
}

.note-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}

.note-card:first-child {
  padding-top: 0;
}

.note-card:last-child {
  border-bottom: none;
}

.note-card__date {
  flex-shrink: 0;
  width: 60px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.note-card__content {
  flex: 1;
}

.note-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.note-card__title a {
  color: var(--color-text-primary);
  text-decoration: none;
}

.note-card__title a:hover {
  color: var(--color-accent);
}

.note-card__excerpt {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Note Page Styles */
.note {
  max-width: var(--width-content);
  margin: 0 auto;
}

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

.note__date {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.note__title {
  font-size: var(--text-2xl);
  line-height: 1.3;
}

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

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

.note__footer {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* Error Page (404) */
.error-page {
  text-align: center;
  padding: var(--space-10) 0;
}

.error-page__code {
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .error-page__code {
    font-size: 12rem;
  }
}

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

.error-page__message {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

.error-page__nav {
  text-align: left;
  max-width: 300px;
  margin: 0 auto;
}

.error-page__nav p {
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.error-page__nav ul {
  list-style: none;
  padding: 0;
}

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

.error-page__nav a {
  color: var(--color-accent);
}
