/* Dark theme tokens and overrides */
:root {
  --bg-1: #0f1115;
  --bg-2: #151922;
  --surface: #1d2330;
  --text: #e6e9ef;
  --muted: #aab1c6;
  --border: #2a3140;
  --accent: #41d1a5;
  --accent-2: #2dbb90;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 40px;
}

html { color-scheme: dark; }

body, html { color: var(--text); background: var(--bg-1); }

h1, h2, h3 { font-family: 'Montserrat', sans-serif; letter-spacing: .2px; }
h1 { font-weight: 800; line-height: 1.15; font-size: clamp(28px, 3.2vw, 40px); }
h2 { font-weight: 700; line-height: 1.20; font-size: clamp(22px, 2.2vw, 28px); }
p, li { line-height: 1.65; font-size: clamp(15px, 1.2vw, 17px); color: var(--text); }
.muted { color: var(--muted); }

.left-column { background: var(--bg-2) !important; border-right: 1px solid var(--border); display: block !important; }
.right-column { background: var(--bg-1) !important; padding: var(--space-xl) var(--space-l); display: flex !important; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; opacity: 1 !important; animation: none !important; }
.logo h1, .logo .logo-title { font-size: 24px; font-weight: 900; margin: 0 0 32px 10px; letter-spacing: 2px; }
.sidebar { display: grid; grid-template-rows: 1fr auto 1fr; height: 100vh; }
.sidebar-sticky { grid-row: 2; display: flex; flex-direction: column; justify-content: center; }
.sidebar .footer { grid-row: 3; align-self: end; }
.sidebar .logo { margin: 0 0 var(--space-m) 0; padding-left: 10px; }
.nav-link { color: var(--muted) !important; font-weight: 500; transition: color .2s ease, padding-left .2s ease; opacity: 1; }
.nav-link:hover { color: #e0f7ef !important; }
.nav-link.active { color: #fff !important; border-left: 3px solid var(--accent); padding-left: calc(16px - 3px); }

.profile img { width: 220px !important; border: 2px solid var(--border) !important; box-shadow: 0 0 0 6px rgba(65,209,165,.12); }
.profile-text-container p { color: var(--muted); }
.social-icons a { color: var(--muted); }
.social-icons a:hover { color: var(--accent); }
.footer { color: var(--muted); }

.container-narrow { width: 100%; max-width: 760px; margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: 6px 10px; background: var(--accent); color: #0d1318; border-radius: 6px; }
:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important;} }

@media (min-width: 992px){
  .left-column { position: fixed; width: 240px; top:0; left:0; bottom:0; overflow: hidden; height: 100vh; }
  .right-column { margin-left: 240px; overflow-y: auto; }
  .collapse.navbar-collapse { display: block !important; }
}
@media (max-width: 991.98px){
  .left-column { position: static; width: 100%; height: auto; }
  .sidebar { display: block; height: auto; }
  .sidebar-sticky { display: block; }
  .right-column { padding: var(--space-l) var(--space-m); margin-left: 0; }
  .collapse.navbar-collapse { display: none; }
  .collapse.navbar-collapse.show { display: block; }
}

/* Buttons & links */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
.btn-primary { background: var(--accent); border: none; color: #0d1318; border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-2); }

/* Blog grid/cards */
.blog-profile-container { max-width: 1100px; margin: 0 auto; padding: var(--space-xl) var(--space-l); }
.blog-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-l); }
@media (min-width: 992px){
  .blog-grid { grid-template-columns: 2fr 1fr 1fr; }
  .blog-grid > :first-child { grid-column: 1 / -1; }
}
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.blog-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card .content { padding: var(--space-m); }
.blog-card h5 { margin: 0 0 var(--space-s); font-weight: 700; }

/* Blog post detail */
.blogpost .content { max-width: 760px; margin: 0 auto; }
.blogpost img { border-radius: var(--radius); margin: var(--space-m) auto; }
.blogpost .content p { line-height: 1.75; font-size: 18px; }
.blogpost pre, .blogpost code { background: #0b0e13; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }

/* Contact map card */
#map-consent, #map-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-m); }

/* Collapse behavior handled in media queries */
.nav.flex-column { gap: 8px; }

/* Footer sizes */
.sidebar .footer p { font-size: 0.8rem; }
.right-column .footer p { font-size: 0.8rem; }
