:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --border: #191919;
  --text: #1a1a1a;
  --muted: #595757;
  --accent: #f4efe9;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 2px solid var(--border);
  background: var(--card);
  gap: 1rem;
  flex-wrap: wrap;
}

.cv-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--accent);
  transition: all 150ms ease;
}

.cv-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portfolio-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--accent);
  transition: all 150ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.portfolio-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portfolio-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-link {
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  transition: transform 150ms ease, box-shadow 150ms ease;
  color: inherit;
}

.icon-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.icon-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.item-cta-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.item-cta-button {
  background: #22c55e;
  color: white;
  border: 2px solid #16a34a;
  border-radius: 16px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 150ms ease;
  animation: flash 1.5s ease-in-out infinite;
  font-family: inherit;
}

.item-cta-button:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

@keyframes flash {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 0 20px 8px rgba(34, 197, 94, 0.4);
  }
}

.profile-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
  justify-content: flex-start;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  flex-shrink: 0;
  width: 200px;
  align-self: flex-start;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-bio {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem;
  background: transparent;
  align-self: flex-start;
  margin-top: 0;
}

.profile-bio h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.profile-bio .role {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.1rem;
}

.profile-bio p {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.profile-bio .bio-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
}

.profile-bio .bio-text ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.profile-bio .bio-text li {
  margin-bottom: 1.25rem;
  padding-left: 0;
  position: relative;
  list-style: none;
}

.profile-bio .bio-text li:before {
  display: none;
}

.profile-bio .bio-text li:last-child {
  margin-bottom: 0;
}

.ascii-name {
  margin: 0 0 1.5rem;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: clamp(0.65rem, 1.5vw, 0.9rem);
  line-height: 1.3;
  letter-spacing: 0.08em;
  white-space: pre;
  overflow-x: auto;
  color: var(--text);
  font-weight: 600;
}

.ascii-name::-webkit-scrollbar {
  height: 4px;
}

.ascii-name::-webkit-scrollbar-thumb {
  background: var(--border);
}

/* New bio sections structure */
.bio-sections {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.bio-section {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.bio-section-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 0.25rem;
  opacity: 0.7;
  color: var(--text);
  transition: opacity 200ms ease, transform 200ms ease;
}

.bio-section:hover .bio-section-icon {
  opacity: 1;
  transform: scale(1.05);
}

.bio-section-content {
  flex: 1;
  min-width: 0;
}

.bio-section-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.bio-inner-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bio-inner-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.7;
  font-size: 0.95rem;
  color: var(--text);
}

.ascii-bullet {
  font-family: "Courier New", monospace;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.8;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-weight: 600;
}

/* Retro-inspired bio enhancements */
.bio-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.bio-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  opacity: 0.7;
  color: var(--text);
  transition: opacity 150ms ease;
}

.bio-item:hover .bio-icon {
  opacity: 1;
}

.retro-divider {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.4;
  text-align: center;
  margin: 1.5rem 0;
  letter-spacing: 0.1em;
  overflow: hidden;
}

.bio-text-with-border {
  position: relative;
  padding: 1.5rem 0;
}

.bio-border-top,
.bio-border-bottom {
  width: 100%;
  height: 10px;
  opacity: 0.3;
  margin: 1rem 0;
}

.bio-text-retro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Legacy bio-section - keeping for backward compatibility */
.bio-text-retro .bio-section {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.retro-label {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.bio-content {
  flex: 1;
  line-height: 1.75;
}

/* ASCII art divider alternative */
.ascii-divider {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.3;
  text-align: center;
  margin: 1.5rem 0;
  white-space: pre;
  overflow: hidden;
}

/* Retro terminal-style frame */

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cta-label {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

.cta-button {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--accent);
  text-align: center;
  transition: all 150ms ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.cta-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-button-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.cta-button-compact {
  flex: 1;
  padding: 0.75rem 0.5rem;
  font-size: 0.85rem;
  gap: 0.4rem;
}

.cta-button-compact .cta-icon {
  width: 16px;
  height: 16px;
}

.cac-seal {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cac-seal-link {
  display: inline-block;
  transition: transform 150ms ease;
  text-decoration: none;
}

.cac-seal-link:hover {
  transform: translateY(-2px);
}

.cac-logo {
  max-width: 120px;
  height: auto;
  display: block;
}

.cac-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
  text-align: center;
}

.cac-credential-link {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.cac-credential-link:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

@media (max-width: 768px) {
  .page {
    padding: 3rem 1.5rem 4rem;
  }

  .profile-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .profile-sidebar {
    width: 100%;
    align-items: center;
  }

  .profile-bio {
    max-width: 100%;
    width: 100%;
    padding: 1.75rem 2rem;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }

  .cta-stack {
    width: 100%;
    max-width: 300px;
  }
}

/* Blog Styles */
.blog-index {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.blog-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin: 0 0 3rem;
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 150ms ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.blog-card-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--accent);
}

.blog-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.blog-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.blog-card-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 1rem;
}

.blog-card-date {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.blog-card-reads {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-empty {
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 4rem 2rem;
}

/* Blog Post Header */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
}

.blog-header-left,
.blog-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-header-center {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: center;
}

.blog-nav-icon {
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  transition: transform 150ms ease, box-shadow 150ms ease;
  color: inherit;
  text-decoration: none;
}

.blog-nav-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.blog-nav-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Blog Post Layout */
.blog-post-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 80px);
}

.blog-sidebar {
  width: 280px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  padding: 1.5rem;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.blog-sidebar-title {
  margin: 0 0 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.blog-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-nav-year {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 1rem;
  color: var(--text);
}

.blog-nav-year:first-child {
  margin-top: 0;
}

.blog-nav-month-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-nav-month {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-nav-month-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.5rem;
}

.blog-nav-posts {
  list-style: none;
  padding: 0;
  margin: 0 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.blog-nav-post {
  margin: 0;
}

.blog-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  border-radius: 8px;
  transition: all 150ms ease;
}

.blog-nav-link:hover {
  background: var(--accent);
}

.blog-nav-link.active {
  background: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--border);
  padding-left: calc(0.75rem - 3px);
}

.blog-post-content {
  flex: 1;
  min-width: 0;
}

.blog-article {
  border: 2px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  padding: 3rem;
  line-height: 1.8;
}

.blog-article h1,
.blog-article h2,
.blog-article h3,
.blog-article h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.blog-article h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

.blog-article h2 {
  font-size: 2rem;
}

.blog-article h3 {
  font-size: 1.5rem;
}

.blog-article p {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

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

.blog-article a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  transition: text-decoration-color 150ms ease;
}

.blog-article a:hover {
  text-decoration-color: var(--text);
}

.blog-article code {
  background: var(--accent);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.blog-article pre {
  background: var(--accent);
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
}

.blog-article pre code {
  background: none;
  padding: 0;
}

@media (max-width: 1024px) {
  .blog-post-layout {
    flex-direction: column;
  }

  .blog-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }

  .blog-header-center {
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
  }

  .blog-header {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-header-left,
  .blog-header-right {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .blog-index {
    padding: 3rem 1.5rem 4rem;
  }

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

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

  .blog-article {
    padding: 2rem 1.5rem;
  }

  .blog-article h1 {
    font-size: 2rem;
  }

  .blog-article h2 {
    font-size: 1.75rem;
  }

  .blog-article h3 {
    font-size: 1.5rem;
  }
}

