/* ============================================
   Responsive Design System (Fluid & Utilities)
   ============================================ */
:root {
  /* Container widths */
  --container-max: clamp(720px, 92vw, 1200px);
  --content-max: clamp(600px, 90vw, 1000px);

  /* Spacing and radii */
  --gutter: clamp(12px, 2.2vw, 28px);
  --radius: 12px;

  /* Fluid type scale */
  --fs-body: clamp(0.95rem, 0.28rem + 0.9vw, 1.125rem);
  --fs-small: clamp(0.85rem, 0.2rem + 0.6vw, 1rem);
  --fs-h1: clamp(1.9rem, 1.2rem + 2.4vw, 3.1rem);
  --fs-h2: clamp(1.4rem, 0.9rem + 1.4vw, 2.1rem);
  --fs-h3: clamp(1.1rem, 0.7rem + 0.9vw, 1.5rem);
}

html { font-size: 100%; }

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Cards and chips */
.card {
  border-radius: var(--radius);
}
.chip { font-size: var(--fs-small); }

/* Media elements */
img, video { max-width: 100%; height: auto; }
picture, .section__pic-container { display: block; }

/* Blog layout helpers (non-destructive) */
.blog-container { gap: var(--gutter); }
.blog-sidebar { min-width: 0; }
.post-grid { row-gap: var(--gutter); column-gap: var(--gutter); grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Clamp overly wide text blocks safely */
.post-content p, .section__text__p2, #home-summary p {
  max-width: var(--content-max);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Catppuccin Mocha (dark) defaults */
:root {
    --nav-height: 70px;
    --bg-primary: #1e1e2e; /* base */
    --bg-secondary: #181825; /* mantle */
    --bg-tertiary: #11111b; /* crust */
    --text-primary: #cdd6f4; /* text */
    --text-secondary: #a6adc8; /* subtext0 */
    --accent-primary: #89b4fa; /* blue */
    --accent-secondary: #f38ba8; /* red/rose */
    --border-color: #313244; /* surface0 border */
    --shadow: rgba(137, 180, 250, 0.12);
}

/* Catppuccin Latte (light) */
[data-theme="light"] {
    --bg-primary: #eff1f5; /* base */
    --bg-secondary: #e6e9ef; /* mantle */
    --bg-tertiary: #dce0e8; /* crust */
    --text-primary: #4c4f69; /* text */
    --text-secondary: #6c6f85; /* subtext0 */
    --accent-primary: #1e66f5; /* blue */
    --accent-secondary: #d20f39; /* red */
    --border-color: #ccd0da; /* surface0 border */
    --shadow: rgba(30, 102, 245, 0.12);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
    padding: 0 20px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: saturate(120%) blur(6px);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Ensure breadcrumb areas start below fixed nav */
.breadcrumb-wrapper { display: none; }

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    font-size: 1.1rem;
}

.nav-links a {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-color);
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary);
}

/* Hamburger Navigation */
#hamburger-nav {
    display: none;
}

.hamburger-menu {
    position: relative;
    display: inline-block;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

.menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-secondary);
    width: fit-content;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.menu-links a {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.menu-links li {
    list-style: none;
}

.menu-links.open {
    max-height: 300px;
}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Profile Section */
#profile {
    display: flex;
    justify-content: center;
    gap: 5rem;
    height: 80vh;
    margin-top: var(--nav-height);
    padding: 0 2rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0) 60%);
}

.section__pic-container {
    display: flex;
    height: 350px; /* desktop default */
    width: 350px;
    margin: auto 0;
    border-radius: 50%;
    overflow: clip; /* ensure no overflow artifacts on some browsers */
    border: 3px solid var(--accent-primary);
    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease;
    aspect-ratio: 1 / 1; /* enforce perfect circle */
}

/* Subtle depth and refined crop for the avatar */
.section__pic-container img {
    object-position: center center; /* perfectly centered for a balanced crop */
    filter: none; /* keep it simple and clean */
    border-radius: 50%; /* force image mask to circle */
}

.section__pic-container:hover {
    transform: scale(1.05);
    box-shadow:
      0 10px 30px var(--shadow),
      0 0 0 4px rgba(137, 180, 250, 0.18), /* outer glow ring */
      0 0 22px rgba(137, 180, 250, 0.22);   /* soft ambient glow */
}

.section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    aspect-ratio: 1 / 1; /* avoid oval rendering from flex context */
}

/* Layered hover glow for interactive rows and cards (About and site-wide) */
.interactive-row:hover,
.card:hover,
.details-container:hover,
.post-content a:hover,
#certifications .interactive-row:hover,
#social-networks .interactive-row:hover {
    box-shadow:
      0 6px 18px var(--shadow),
      0 0 0 3px rgba(137, 180, 250, 0.14),
      0 0 18px rgba(137, 180, 250, 0.18);
}

.section__text {
    align-self: center;
    text-align: center;
}

.section__text__p1 {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.title {
    font-size: 3rem;
    text-align: center;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Hero size tweaks */
.hero-title { font-size: 2.5rem; }
.hero-sub { font-size: 1.28rem; max-width: clamp(1000px, 95vw, 1300px); margin-left: auto; margin-right: auto; }

.section__text__p2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    font-weight: 600;
    transition: all 300ms ease;
    padding: 1rem;
    width: 8rem;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-color-1,
.btn-color-2 {
    border: var(--accent-primary) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

.btn-color-1,
.btn-color-2:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-color-2:hover {
    border: var(--accent-primary) 0.1rem solid;
    background: var(--bg-primary);
    color: var(--accent-primary);
}

.btn-color-2 {
    background: none;
    color: var(--accent-primary);
}

/* Social Icons */
#socials-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

.icon {
    cursor: pointer;
    height: 2rem;
    transition: transform 0.3s ease;
}

.icon:hover {
    transform: scale(1.2);
}

/* Theme toggle alignment */
.nav-links .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    transform: translateY(2px);
    height: 2.2rem;
    width: 2.2rem;
}

.nav-links .icon:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-color);
    transform: translateY(2px) scale(1.1);
}

/* Chips / tags */
.chip, .tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 8px 12px;
    margin: 1px 2px;
    font-size: .85rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chip hover effect similar to the "My Resume" button (btn-color-2)
   Keep the chip's shape; adjust colors/border on hover without extra movement
   to preserve a single motion effect at the entry level. */
.chip {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.chip:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    color: var(--accent-primary);
}

/* ============================================
   BLOG CARD SIMPLIFICATION & RESPONSIVE GRID
   ============================================ */
/* Remove background images from blog cards; keep clean card look */
.blog-post {
  background-image: none !important;
  background-color: var(--bg-primary);
}

/* Light theme default readability for blog cards (no hover) */
[data-theme="light"] .blog-post {
  color: var(--text-primary) !important;
  text-shadow: none;
}
[data-theme="light"] .blog-post .post-title a {
  color: var(--text-primary) !important;
  text-shadow: none;
}
[data-theme="light"] .blog-post .post-excerpt {
  color: var(--text-secondary) !important;
  text-shadow: none;
}
[data-theme="light"] .blog-post .chip {
  background: rgba(0,0,0,0.06) !important;
  color: #1a1a1a !important;
  text-shadow: none;
}

/* Hide post tags inside cards to reduce visual noise; keeps sidebar tags intact */
.blog-post .post-tags { display: none !important; }

/* Make post grids responsive (overrides inline cols on small screens) */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 900px){
  .post-grid { grid-template-columns: 1fr !important; }
}

/* ============================================
   RESPONSIVE TWEAKS FOR SMALL DEVICES
   ============================================ */
/* Tablet tweaks */
@media (max-width: 1024px){
  .blog-post.card { padding: .85rem !important; }
  .post-title a { font-size: 1.05rem; }
  .post-excerpt { font-size: .95rem; }
}

/* Mobile tweaks */
@media (max-width: 768px){
  /* Stack sidebar below posts */
  .blog-container { display: block; }
  .blog-sidebar { margin-top: 1rem; width: 100%; }

  .blog-post.card { padding: .9rem !important; }
  .post-title a { font-size: 1rem; }
  .post-excerpt {
    font-size: .95rem;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .post-meta .chip { padding: 6px 10px; font-size: .8rem; }

  /* Home: Whoami + Blog Posts responsive stacking */
  #home-summary { padding: 1rem .8rem !important; }
  #home-summary .card { padding: .85rem !important; }
  #home-summary .chip.interactive-row { gap: 8px; }
  #home-summary .chip.interactive-row span:nth-child(2) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Very small phones */
@media (max-width: 420px){
  .post-title a { font-size: .95rem; }
  .post-meta { gap: 6px !important; }
  .post-meta .chip { padding: 5px 8px; font-size: .78rem; }
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 6px 18px var(--shadow);
}

/* About Section */
#about {
    position: relative;
    padding: 5rem 2rem;
    background-color: var(--bg-secondary);
}

.section-container {
    gap: 4rem;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-details-container {
    justify-content: center;
    flex-direction: column;
    display: flex;
}

.about-containers {
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
    display: flex;
}

.details-container {
    padding: 1.5rem;
    flex: 1;
    background: var(--bg-tertiary);
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.details-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.details-container h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.details-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.about-pic {
    border-radius: 2rem;
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 10px 30px var(--shadow);
}

.text-container {
    text-align: justify;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: var(--content-max);
    margin: 0 auto;
}

/* Experience Section */
#experience {
    position: relative;
    padding: 5rem 2rem;
}

.experience-details-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
}

.experience-sub-title {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.article-container {
    display: flex;
    text-align: initial;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 2.5rem;
    justify-content: space-around;
}

.article-container article {
    display: flex;
    width: 10rem;
    justify-content: space-around;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-container article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.article-container article div {
    text-align: center;
}

.article-container article h3 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.article-container article p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.4;
}

/* Projects Section (Blog) */
#projects {
    position: relative;
    padding: 5rem 2rem;
    background-color: var(--bg-secondary);
}

/* Blog post layout with Table of Contents */
.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-wide { grid-template-columns: 1fr; max-width: 1200px; }
/* Constrain About content width and keep text justified */
.about-wide .post-content { max-width: var(--content-max); margin-left: auto; margin-right: auto; }
/* Harmonize About typography with blog */
.about-wide .post-content p,
.about-wide .post-content li { text-align: justify; line-height: 1.75; }
.about-wide .post-content h2 { margin-top: 1.6rem; margin-bottom: .8rem; }
/* Slightly reduce About header intro paragraph on desktop */
.about-wide .post-content header p { font-size: 1.05rem; }

/* Make certification and social images more rounded */
#certifications .interactive-row img,
#social-networks .interactive-row img { border-radius: 12px; }

.post-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

/* Blog content justification and typography */
.post-content p,
.post-content li,
.post-content div,
.blog-post .post-excerpt,
.blog-post .post-title a,
.category-description {
    text-align: justify;
    line-height: 1.7;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child {
    margin-top: 0;
}

/* Blog post content spacing and readability */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

.post-content code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9em;
}

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

/* Prevent long strings from causing overflow */
.post-content code, .post-content pre, .post-content p, .post-content li {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-toc {
    position: sticky;
    top: calc(var(--nav-height) + 6px);
    align-self: start;
    height: max-content;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.post-toc h3 {
    margin-bottom: .5rem;
    font-size: .95rem;
    color: var(--text-secondary);
}

.post-toc nav a {
    display: block;
    padding: .35rem 0;
    margin-left: 0;
    font-size: .9rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.post-toc nav a.toc-depth-2 { margin-left: .25rem; }
.post-toc nav a.toc-depth-3 { margin-left: 1rem; }

.post-toc nav a.active {
    color: var(--accent-primary);
    text-decoration: underline;
}

.post-toc .toc-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}
.post-toc .toc-toggle{background:none;border:1px solid var(--border-color);color:var(--text-secondary);border-radius:8px;padding:4px 8px;cursor:pointer}
.post-toc.collapsed nav{display:none}

/* Ensure anchored headings are visible below sticky nav */
.post-content h2, .post-content h3 { scroll-margin-top: var(--nav-height); }

/* Post meta row under cover */
.post-meta-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;color:var(--text-secondary);margin:0 0 1rem 0}
.post-meta-row .meta{display:inline-flex;align-items:center;gap:6px}
.post-meta-row .hash{opacity:.7}
.post-tags-inline{display:inline-flex;flex-wrap:wrap;gap:6px}
.post-tags-inline .tag{padding:4px 8px;font-size:.8rem}

/* Reusable interactive row effect */
.interactive-row{border-radius:12px;padding:.5rem;transition:transform .25s ease, box-shadow .25s ease, background .25s ease}
.interactive-row:hover{transform:translateY(-2px);box-shadow:0 6px 18px var(--shadow);background:rgba(255,255,255,0.03)}
.interactive-row:focus{outline:2px solid var(--accent-primary);outline-offset:2px}

/* Match chip-like blue hover for Certifications and Social Networks links */
#certifications .interactive-row,
#social-networks .interactive-row {
    border: 1px solid transparent;
}

#certifications .interactive-row:hover,
#social-networks .interactive-row:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    color: var(--accent-primary);
}

/* Blog list styling for consistent indentation */
.blog-list {
    margin-left: 2rem;
    padding-left: 1rem;
}

.blog-list li {
    margin-bottom: 0.5rem;
}

/* Blog link styling - use text colors instead of accent colors */
.blog-post a,
.post-title a,
.blog-container a,
.toc-list a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.blog-post a:hover,
.post-title a:hover,
.blog-container a:hover,
.toc-list a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* General hyperlink styling for all content links */
.content a,
.post-content a,
article a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.content a:hover,
.post-content a:hover,
article a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Home navigation link styling */
.home-nav-link:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-color);
    color: var(--accent-primary);
}

/* Theme-specific light effects */
[data-theme="light"] .home-nav-link:hover { box-shadow: none; transform: none; }

[data-theme="dark"] .home-nav-link:hover { box-shadow: none; transform: none; }

/* Blog post background image styling */
.blog-post {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    transition: all 0.4s ease;
    transform: translateY(0);
}

/* Blog card image hover effects only on desktop */
@media (min-width: 901px){
  .blog-post:hover {
      transform: translateY(-8px) scale(1.02);
      box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 0 25px rgba(255,255,255,0.05);
      background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), var(--bg-image) !important;
  }
  [data-theme="light"] .blog-post:hover {
      background-image: linear-gradient(rgba(255,255,255,0.85), rgba(240,240,240,0.85)), var(--bg-image) !important;
      box-shadow: 0 15px 35px rgba(0,0,0,0.2), 0 0 25px rgba(0,0,0,0.1);
  }
  [data-theme="light"] .blog-post:hover .post-title a { color: #1a1a1a !important; text-shadow: 0 1px 3px rgba(255,255,255,0.8); }
  [data-theme="light"] .blog-post:hover .post-excerpt { color: #2d2d2d !important; text-shadow: 0 1px 2px rgba(255,255,255,0.6); }
  [data-theme="light"] .blog-post:hover .chip { background: rgba(0,0,0,0.1) !important; color: #1a1a1a !important; text-shadow: 0 1px 2px rgba(255,255,255,0.8); }
  [data-theme="light"] .blog-post:hover .tag { background: rgba(0,0,0,0.08) !important; color: #1a1a1a !important; text-shadow: 0 1px 2px rgba(255,255,255,0.8); }
  [data-theme="dark"] .blog-post:hover { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), var(--bg-image) !important; box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 0 25px rgba(255,255,255,0.05); }
  .blog-post .post-title a { color: white !important; text-shadow: 0 1px 3px rgba(0,0,0,0.8); transition: color 0.3s ease; }
  .blog-post:hover .post-title a { color: var(--accent-primary) !important; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
  .blog-post .post-excerpt { color: rgba(255,255,255,0.9) !important; text-shadow: 0 1px 2px rgba(0,0,0,0.8); transition: color 0.3s ease; }
  .blog-post:hover .post-excerpt { color: rgba(255,255,255,1) !important; }
  .blog-post .chip { background: rgba(255,255,255,0.2) !important; color: white !important; text-shadow: 0 1px 2px rgba(0,0,0,0.8); transition: all 0.3s ease; }
  .blog-post:hover .chip { background: rgba(255,255,255,0.2) !important; transform: scale(1.05); }
  .blog-post .tag { background: rgba(255,255,255,0.15) !important; color: white !important; text-shadow: 0 1px 2px rgba(0,0,0,0.8); transition: all 0.3s ease; }
  .blog-post:hover .tag { background: rgba(255,255,255,0.18) !important; transform: scale(1.05); }
}

@media (max-width: 900px){
  .post-layout{ grid-template-columns: 1fr; }
  .post-toc{ position: relative; top: 0; }
}

.project-title {
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.project-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-details-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-details-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.project-details-container .article-container {
    flex-direction: column;
    gap: 1.5rem;
}

.project-details-container article {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.project-details-container article:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px var(--shadow);
}

.project-details-container article h3 {
    color: var(--accent-primary);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.project-details-container article p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-details-container article a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-details-container article a:hover {
    color: var(--accent-primary);
}

/* Blog categories spacing */
.blog-category { margin-bottom: 24px; }
#blog { padding: 0 16px; }
.blog-container { max-width: 1200px; margin: 0 auto; }

/* Contact Section */
#contact {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 70vh;
    padding: 5rem 2rem;
}

.contact-info-upper-container {
    display: flex;
    justify-content: center;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    margin: 2rem auto;
    padding: 2rem;
    max-width: 600px;
    gap: 2rem;
}

.contact-info-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem;
}

.contact-info-container p {
    font-size: larger;
}

.contact-icon {
    cursor: default;
}

.email-icon {
    height: 2.5rem;
}

.contact-info-container a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info-container a:hover {
    color: var(--accent-secondary);
}

/* Footer */
footer {
    margin: 0;
    padding: 10px 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

footer nav {
    position: static;
    background: none;
    border: none;
    height: auto;
}

footer p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Arrow */
.arrow {
    position: absolute;
    right: -5rem;
    bottom: 2.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.arrow:hover {
    transform: scale(1.2);
}

/* Section titles */
.section__text__p1 {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    /* Keep desktop navigation on mobile; hide hamburger */
    #desktop-nav {
        display: flex;
    }
    #hamburger-nav {
        display: none;
    }
    #experience,
    .experience-details-container {
        margin-top: 2rem;
    }
    #profile,
    .section-container {
        display: block;
    }
    .arrow {
        display: none;
    }
    section,
    .section-container {
        height: fit-content;
    }
    section {
        margin: 0 5%;
    }
    .section__pic-container {
        width: 275px;
        height: 275px;
        margin: 0 auto 2rem;
    }
}

@media screen and (max-width: 600px) {
    /* keep nav consistent on small screens */
    :root { --nav-height: 56px; }
    /* smaller cover images on phones */
    .post-cover img { max-height: 320px; }
    #contact,
    footer {
        height: auto;
    }
    #profile {
        height: 83vh;
        margin-bottom: 0;
    }
    article {
        font-size: 1rem;
    }
    footer nav {
        height: fit-content;
        margin-bottom: 2rem;
    }
    .about-containers,
    .contact-info-upper-container {
        flex-wrap: wrap;
    }
    .contact-info-container {
        margin: 0.5rem;
    }
    .contact-info-container p {
        font-size: 1rem;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px var(--shadow);
}

.theme-toggle img {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

[data-theme="light"] .theme-toggle img {
    filter: invert(0);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-container,
.about-containers,
.article-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ============================================
   COMPARISON TABLE STYLES - Arch vs Pop!_OS
   ============================================ */
.comparison-table-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comparison-table thead tr {
    background: var(--bg-secondary);
}

.comparison-table th {
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.comparison-table th:nth-child(2),
.comparison-table th:nth-child(3) {
    text-align: center;
}

.comparison-table td {
    padding: 1rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.comparison-table td:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3) {
    text-align: center;
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background: var(--bg-secondary);
    transition: background-color 0.2s ease;
}

/* Responsive design for comparison table */
@media (max-width: 768px) {
    .comparison-table-container {
        overflow-x: auto;
    }
    
    .comparison-table {
        min-width: 600px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}
