/* =============================================
   YASITH DANTHASINGHE — NOC ENGINEER PORTFOLIO
   style.css
   ============================================= */

/* ---- CSS Variables ---- */
:root {
  --green:        #1a6640;
  --green-mid:    #237a4d;
  --green-light:  #e8f5ee;
  --green-xlight: #f2faf5;
  --black:        #0d0d0d;
  --dark:         #1c1c1c;
  --gray-800:     #2e2e2e;
  --gray-600:     #555;
  --gray-400:     #888;
  --gray-200:     #e4e4e4;
  --gray-100:     #f5f5f5;
  --white:        #ffffff;

  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --nav-h:        70px;
  --radius:       10px;
  --radius-lg:    18px;
  --shadow-sm:    0 2px 10px rgba(0,0,0,.06);
  --shadow-md:    0 6px 28px rgba(0,0,0,.10);
  --shadow-lg:    0 16px 48px rgba(0,0,0,.14);
  --transition:   0.25s cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Typography ---- */
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--gray-600); }

/* ---- Layout Helpers ---- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.alt-bg {
  background: var(--gray-100);
}

.section-header {
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}

.section-header h2 {
  color: var(--black);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green);
  letter-spacing: 0.06em;
  transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.7; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  background: var(--green-light);
}

.nav-coming-soon {
  opacity: 0.65;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--green-light);
  color: var(--green);
  letter-spacing: 0.05em;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  background: var(--white);
}

/* Subtle grid texture */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--gray-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-200) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  pointer-events: none;
}

/* Fade the grid at the bottom */
.hero-bg-grid::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(transparent, var(--white));
}

.hero-container {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 72px;
  position: relative;
  z-index: 1;
}

/* Photo */
.hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
  width: 200px;
  height: 200px;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--green-light);
  border: 4px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-photo-placeholder {
  font-size: 5rem;
  color: var(--green);
  opacity: 0.45;
}

.hero-photo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed var(--green);
  opacity: 0.3;
  animation: spin 22s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Content */
.hero-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.hero-name {
  color: var(--black);
  margin-bottom: 14px;
  font-weight: 600;
}

.hero-title {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--green);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
  opacity: 0.85;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
}
.btn-primary:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,102,64,.22);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-outline:hover {
  background: var(--green-light);
  transform: translateY(-2px);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: var(--gray-400);
  animation: scrollBob 2s ease-in-out infinite;
}

@keyframes scrollBob {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%       { transform: scaleY(1.5); opacity: 1; }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 18px;
  color: var(--gray-600);
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong {
  color: var(--green);
  font-weight: 600;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}

.stat-desc {
  font-size: 0.78rem;
  color: var(--gray-400);
  letter-spacing: 0.03em;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-category {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.skill-category:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green);
  transform: translateY(-4px);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gray-200);
}

.skill-category-header i {
  font-size: 1.2rem;
  color: var(--green);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-light);
  border-radius: 8px;
}

.skill-category-header h3 {
  color: var(--black);
  font-size: 1rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--gray-600);
}

.skill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  opacity: 0.7;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.timeline {
  position: relative;
  padding-left: 36px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-marker {
  position: absolute;
  left: -43px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--green);
}

.timeline-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 32px 28px;
  transition: box-shadow var(--transition);
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
}

.timeline-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.job-title {
  font-size: 1.2rem;
  color: var(--black);
  margin-bottom: 4px;
}

.job-company {
  font-size: 0.875rem;
  color: var(--green);
  font-weight: 500;
}

.job-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 20px;
  border: 1px solid rgba(26,102,64,.2);
}

.job-responsibilities {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-responsibilities li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.93rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.job-responsibilities li::before {
  content: '→';
  color: var(--green);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* Internship badge style */
.job-badge.internship {
  background: #f0f4ff;
  color: #3a5bd9;
  border-color: rgba(58,91,217,.2);
}
.job-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--green);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-icon {
  width: 48px;
  height: 48px;
  background: var(--green-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 1.3rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--green-xlight);
  color: var(--green);
  border-radius: 20px;
}

.project-title {
  font-size: 1.05rem;
  color: var(--black);
  line-height: 1.4;
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--gray-600);
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  transition: background var(--transition), color var(--transition);
}

.project-card:hover .tech-tag {
  background: var(--green-light);
  color: var(--green);
  border-color: rgba(26,102,64,.2);
}

/* ============================================
   CERTIFICATIONS SECTION
   ============================================ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 24px;
  display: flex;
  cursor: pointer;
  align-items: flex-start;
  gap: 18px;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.cert-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green);
  transform: translateY(-3px);
}

.cert-icon {
  width: 42px;
  height: 42px;
  background: var(--green-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 1rem;
  flex-shrink: 0;
}

.cert-info h3 {
  font-size: 0.93rem;
  color: var(--black);
  margin-bottom: 4px;
  line-height: 1.4;
  font-weight: 600;
}

.cert-info p {
  font-size: 0.78rem;
  color: var(--gray-400);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green);
  transform: translateY(-3px);
}

.contact-icon {
  width: 46px;
  height: 46px;
  background: var(--green-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background var(--transition);
}

.contact-card:hover .contact-icon {
  background: var(--green);
  color: var(--white);
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.contact-value {
  font-size: 0.88rem;
  color: var(--dark);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-arrow {
  color: var(--gray-400);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: color var(--transition), transform var(--transition);
}

.contact-card:hover .contact-arrow {
  color: var(--green);
  transform: translateX(4px);
}

/* ============================================
   BLOG SECTION
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 0;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--green);
}

.blog-card-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--green-light);
}

.blog-card-cover-placeholder {
  width: 100%;
  height: 180px;
  background: var(--green-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 2rem;
  opacity: 0.4;
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 20px;
}

.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-400);
  letter-spacing: 0.06em;
}

.blog-card-title {
  font-size: 1rem;
  color: var(--black);
  line-height: 1.45;
  font-weight: 600;
}

.blog-card-summary {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  font-size: 0.78rem;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

.blog-card-read {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 500;
  font-size: 0.78rem;
  transition: gap var(--transition);
}

.blog-card:hover .blog-card-read {
  gap: 10px;
}

.blog-linkedin-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gray-400);
}

.blog-linkedin-badge i {
  color: #0077b5;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--black);
  padding: 32px 0;
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,.4);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.footer-socials a:hover {
  background: var(--green);
  color: var(--white);
}

/* ============================================
   ANIMATIONS — Fade-in on scroll
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE — Tablet (≤ 900px)
   ============================================ */
@media (max-width: 900px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding-top: 32px;
  }

  .hero-actions {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    align-items: flex-start;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }
}

/* ============================================
   RESPONSIVE — Mobile (≤ 600px)
   ============================================ */
@media (max-width: 600px) {
  .section { padding: 72px 0; }

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

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-marker {
    left: -32px;
  }

  .timeline-card {
    padding: 24px 20px;
  }

  .timeline-card-header {
    flex-direction: column;
  }

  .hero-photo-wrap {
    width: 160px;
    height: 160px;
  }

  .hero-photo {
    width: 160px;
    height: 160px;
  }

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

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

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

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ============================================
   FOCUS / ACCESSIBILITY
   ============================================ */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Print */
@media print {
  .navbar, .hero-scroll-hint { display: none; }
  .section { padding: 36px 0; }
}

/* ============================================
   BLOG SECTION — LinkedIn Cards
   ============================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.blog-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 0;
  color: var(--gray-400);
  font-size: 0.9rem;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--green);
}
.blog-card-cover-placeholder {
  width: 100%;
  height: 180px;
  background: var(--green-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 2.5rem;
  opacity: 0.4;
}
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.blog-card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 20px;
}
.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-400);
}
.blog-card-title {
  font-size: 1rem;
  color: var(--black);
  line-height: 1.45;
  font-weight: 600;
}
.blog-card-summary {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
  flex: 1;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}
.blog-card-read {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 500;
  transition: gap var(--transition);
}
.blog-card:hover .blog-card-read { gap: 10px; }
.blog-linkedin-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gray-400);
}
.blog-linkedin-badge i { color: #0077b5; }

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */
.dark-toggle {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-right: 8px;
}

.dark-toggle:hover {
  background: var(--green-light);
  color: var(--green);
  border-color: var(--green);
}

/* ============================================
   DARK MODE — Color Overrides
   ============================================ */
body.dark {
  --green:        #2ecc71;
  --green-mid:    #27ae60;
  --green-light:  #1a2e22;
  --green-xlight: #141a17;
  --black:        #f0f0f0;
  --dark:         #e0e0e0;
  --gray-800:     #cccccc;
  --gray-600:     #aaaaaa;
  --gray-400:     #777777;
  --gray-200:     #2a2a2a;
  --gray-100:     #1a1a1a;
  --white:        #121212;
}

body.dark .navbar {
  background: rgba(18, 18, 18, 0.95);
  border-bottom-color: #2a2a2a;
}

body.dark .hero {
  background: #121212;
}

body.dark .hero-bg-grid {
  opacity: 0.12;
}

body.dark .hero-bg-grid::after {
  background: linear-gradient(transparent, #121212);
}

body.dark .footer {
  background: #0a0a0a;
}

body.dark .timeline-marker {
  border-color: #121212;
}

body.dark .btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

body.dark .btn-outline {
  color: var(--green);
  border-color: var(--green);
}

body.dark .btn-outline:hover {
  background: var(--green-light);
}
