/* Theme variables */
:root {
  --bg-primary: #111111;
  --bg-surface: #1a1a1a;
  --bg-card: #222222;
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --accent: #d4a017;
  --border: rgba(255, 255, 255, 0.08);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-surface: #f5f5f5;
  --bg-card: #fcfcfc;
  --text-primary: #111111;
  --text-secondary: #666666;
  --accent: #d4a017;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-stack);
  line-height: 1.7;
  font-size: 1rem;
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Base Layout Container */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Bar */
nav {
  height: 60px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: var(--bg-primary);
  z-index: 100;
  padding: 0 2rem;
  transition: var(--transition);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-actions button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.nav-actions button:hover {
  background-color: var(--bg-surface);
  border-color: var(--accent);
}

/* Breadcrumb Navigation */
.breadcrumb {
  padding: 1rem 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

/* Main Content Area */
main {
  flex: 1;
  padding: 2rem 0;
  transition: var(--transition);
}

/* Hero Section */
.hero-container {
  position: relative;
  margin-bottom: 2.5rem;
}

.hero-banner {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  background-color: var(--bg-surface);
}

.hero-avatar-wrapper {
  position: relative;
  margin-top: -60px;
  margin-left: 2rem;
  display: inline-block;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  background-color: var(--bg-card);
  object-fit: cover;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.hero-info {
  margin-top: 1.5rem;
}

.hero-name {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Bio Callout */
.bio-callout {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1rem;
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.bio-callout .emoji {
  font-size: 1.25rem;
  line-height: 1.5;
}

.bio-callout p {
  font-style: italic;
  color: var(--text-primary);
}

/* Navigation Card Grid (Homepage) */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.nav-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.nav-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.15);
}

.nav-card-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  filter: brightness(0.95);
  transition: var(--transition);
}

.nav-card:hover .nav-card-cover {
  filter: brightness(1.05);
}

.nav-card-footer {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-card-footer .emoji {
  font-size: 1.1rem;
}

/* Contact Section */
.contact-section {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.contact-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
}

.contact-item a {
  color: var(--accent);
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Grid Layouts: Projects, Courses, Activities */
.grid-3col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Card generic styling */
.item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.item-card-cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: var(--bg-surface);
}

.item-card-content {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.item-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-card-provider {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.item-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex: 1;
}

.item-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag-pill {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
}

.item-card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  align-self: flex-start;
}

.item-card-link:hover {
  text-decoration: underline;
}

/* Timeline Layout for Experience */
.timeline {
  position: relative;
  margin-top: 1.5rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.timeline-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timeline-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.timeline-right {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.timeline-desc ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-separator {
  grid-column: span 2;
  height: 1px;
  background-color: var(--border);
  margin-bottom: 2rem;
}

.timeline-separator:last-child {
  display: none;
}

/* Blog Page layout */
.blog-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: auto;
}

/* Individual Blog Post styling */
.post-container {
  max-width: 750px;
  margin: 0 auto;
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

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

.post-cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
  background-color: var(--bg-surface);
}

.post-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-content p {
  color: var(--text-primary);
}

.post-content h1, .post-content h2, .post-content h3 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }

.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0.5rem 0;
}

.post-content code {
  font-family: Consolas, Monaco, "Andale Mono", monospace;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.post-content pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.post-content .divider {
  height: 1px;
  background-color: var(--border);
  margin: 1.5rem 0;
}

.post-content .post-image {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Empty State Styling */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.empty-state-emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }
  
  nav {
    padding: 0 1rem;
  }
  
  .breadcrumb {
    padding: 0.75rem 1rem;
  }
  
  .hero-banner {
    height: 140px;
  }
  
  .hero-avatar-wrapper {
    margin-top: -45px;
    margin-left: 1rem;
  }
  
  .hero-avatar {
    width: 90px;
    height: 90px;
  }
  
  .hero-name {
    font-size: 2rem;
  }
  
  .nav-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .grid-3col {
    grid-template-columns: 1fr;
  }
  
  .grid-4col {
    grid-template-columns: 1fr;
  }
  
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .timeline-left {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  
  .timeline-logo {
    width: 30px;
    height: 30px;
    margin-bottom: 0;
  }
}
