:root {
  /* -- Color Palette (Light Default) -- */
  --bg-color: #ffffff;
  --surface-color: #f8f9fa;
  --surface-hover: #e9ecef;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent-primary: #2563eb;

  /* Slightly darker blue for white bg contrast */
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  /* subtle left accent bar on hover for a professional accent */
  .card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.18s ease;
  }

  .card:hover::before {
    background: var(--accent-primary);
  }

  --font-main: 'Inter',
  sans-serif;
  --font-heading: 'Lato',
  sans-serif;

  /* -- Spacing -- */
  --container-width: 920px;
  --section-spacing: 80px;

  /* Principal page background (used by light and dark themes) */
  --bg-principal: var(--bg-color);
}

[data-theme="dark"] {
  /* -- Color Palette (Dark Override) -- */
  --bg-color: #0a0a0a;
  --surface-color: #111111;
  --surface-hover: #161616;
  --text-primary: #ededed;
  --text-secondary: #a1a1a1;
  --text-muted: #525252;
  --accent-primary: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-secondary: #f97316;
  --border-color: #262626;

  /* Dark variant of the principal background (subtle glow + deep base) */
  --bg-principal: radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.06), transparent 20%), linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
}

/* Utility: force a section (or element) to use the light theme variables
   even when the page/theme is dark. Useful for embedding light blocks
   such as projects cards inside a dark homepage. */
.light-section {
  --bg-color: #ffffff;
  --surface-color: #ffffff;
  --surface-hover: #f8f9fa;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent-primary: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --accent-secondary: #ea580c;
  --border-color: #e5e7eb;
  /* ensure the section itself uses the background variable */
  background-color: var(--bg-color);
}

/* ensure inner surfaces (cards) still use surface color correctly */
.light-section .card {
  /* Force cards in light sections to remain light even when the page
     root has data-theme="dark". Use explicit light values with
     higher priority to avoid dark overrides. */
  background: #ffffff !important;
  border-color: #e6e6e6 !important;
  color: #111827 !important;
}

.light-section .card .tag.dark {
  background: #111111;
  color: #fff;
}

/* Projects section: use principal page background but keep cards light
   (keeps portfolio appearance like the attached screenshot in both
    light and dark themes — body/section background changes, cards stay white) */
.projects-section {
  background: var(--bg-principal, var(--bg-color));
}

.projects-section .container {
  background: transparent;
}

.projects-section .cards-grid {
  background: transparent;
}

.projects-section .card {
  background: var(--surface-color);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.05);
  padding: 14px;
  /* reduced padding for more compact layout */
  min-height: 200px;
  /* slightly shorter cards */
}

.projects-section .ref-ribbon.personal {
  background: #14b8a6;
}

/* Compact card typography and tag sizing for professional, multinational look */
.projects-section .ref-title {
  font-size: 1.02rem;
  line-height: 1.15;
  margin-bottom: 6px;
}

.projects-section .ref-description p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.projects-section .ref-tags {
  gap: 8px;
}

.projects-section .ref-tag {
  display: inline-block;
  padding: 6px 8px;
  font-size: 0.78rem;
  border-radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-principal, var(--bg-color));
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

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

ul {
  list-style: none;
}

/* -- Utility -- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-spacing) 0;
  position: relative;
}

.text-muted {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent-primary);
}

/* -- Header -- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  backdrop-filter: none;
  z-index: 1000;
  border-bottom: 0;
  padding: 12px 0;
}

/* Dark header override when using dark theme */
[data-theme="dark"] .site-header {
  background: transparent;
  backdrop-filter: none;
}

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Wider header container for a professional multinational look */
.site-header .container {
  max-width: 100%;
  padding: 0 16px;
}

/* Theme toggle button in header */
.theme-toggle {
  margin-left: 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.15s, transform 0.12s;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
}

[data-theme="dark"] .theme-toggle {
  border-color: #2b2b2b;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.theme-toggle[data-theme="dark"] {
  background: rgba(255, 255, 255, 0.02);
}

.theme-toggle:focus {
  outline: 2px solid var(--accent-glow, rgba(59, 130, 246, 0.2));
  outline-offset: 2px;
}

/* Fallback fixed toggle styles when header isn't present */
body>.theme-toggle {
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.12);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* Controls (theme + language) */
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Root wrapper that we create dynamically for header controls */
#controlsRoot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.controls-language {
  display: inline-flex;
  align-items: center;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  padding: 0;
}

.control-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
  transform: translateY(-1px);
}

.control-btn:active {
  transform: translateY(1px);
}

/* Specific adjustment for dark mode to ensure they look good */
[data-theme="dark"] .control-btn {
  color: #a1a1a1;
}

[data-theme="dark"] .control-btn:hover {
  color: #ededed;
  background: rgba(255, 255, 255, 0.1);
}

.control-label {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.control-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Polished control visuals for multinational site - merged with above */

.control-btn .svg-icon {
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 8px;
  min-width: 0;
  gap: 8px;
}

/* Compact pill for language code */
.lang-btn .control-label {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}

/* Active appearance (when toggled) — uses accent for visibility */
.lang-btn .control-label.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}


.lang-btn .flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 22px;
  border-radius: 4px;
  padding: 0;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  margin-left: 6px;
  transition: all 0.2s ease;
}

.lang-btn .flag .flag-icon {
  width: 14px;
  height: 9px;
  display: inline-block;
  pointer-events: none;
}

.lang-btn .flag:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.lang-btn .flag.active {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Dark mode tweaks: ensure flags remain visible */
[data-theme="dark"] .lang-btn .flag {
  border-color: #222;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.02);
}

/* Redundant hover removed */

[data-theme="dark"] .control-btn .svg-icon {
  color: #cbd5e1;
}

[data-theme="dark"] .lang-btn .control-label {
  color: #e6e6e6;
}



/* When header isn't present, fallback fixed controls */
body>.controls.fixed {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2200;
}

.nav {
  display: flex;
  gap: 32px;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.nav a {
  opacity: 0.8;
}

.nav a:hover,
.nav a.active {
  opacity: 1;
  color: var(--accent-primary);
}

/* -- Hero -- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 80px;
  background: var(--bg-principal, var(--bg-color));
  background-image: none;
  /* Removed gradient to match flat dark look of screenshot */
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  max-width: 820px;
  padding: 0;
}

.hero-avatar {
  margin-bottom: 16px;
  /* Circle container to hold the profile image cleanly */
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
}

.hero-profile-img {
  /* Fill the circular container while preserving aspect ratio */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* .avatar-placeholder removed as now unused */

/* Hero typography adjustments for a professional first page */
.hero-title {
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.05;
  margin: 0 0 6px;
  letter-spacing: 0.25px;
  color: var(--text-primary);
  font-weight: 700;
}

.hero-role {
  display: inline-flex;
  color: var(--text-secondary);
  margin: 0 0 18px;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.4px;
}

/* Typography matching screenshot */
.card-title {
  font-size: 1.05rem;
  /* tightened to match screenshot spacing */
  margin-bottom: 8px;
  font-weight: 700;
}

/* Visually hidden helper for accessibility labels inside flag buttons */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.card-desc {
  font-size: 0.92rem;
  /* slightly smaller body copy */
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
  flex: 1;
}



/* Revert previous role styles */

.hero-sub {
  display: none;
}

/* Removing description paragraph to match minimal screenshot */

/* Removing description paragraph to match minimal screenshot */

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 0;
}

/* Specific Buttons */
.btn-linkedin {
  background-color: #0077b5;
  color: #fff;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  justify-content: center;
  box-shadow: none;
}

.btn-linkedin:hover {
  background-color: #006097;
  transform: translateY(-2px);
}

.btn-cv {
  background-color: #f97316;
  color: #fff;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  justify-content: center;
  box-shadow: none;
}

.btn-cv:hover {
  background-color: #ea580c;
  transform: translateY(-2px);
}

/* CV dropdown (3 resume options) */
.cv-dropdown {
  position: relative;
  display: inline-flex;
}

.cv-menu {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  right: auto;
  transform: translateY(-50%);
  min-width: 280px;
  max-width: calc(100vw - 24px);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.14);
  z-index: 50;
}

.cv-menu-item {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.cv-menu-item:hover,
.cv-menu-item:focus-visible {
  background: var(--surface-hover);
  outline: none;
}

@media (max-width: 520px) {
  .cv-menu {
    top: calc(100% + 10px);
    left: auto;
    right: 0;
    transform: none;
    min-width: 260px;
  }
}

/* Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: 16px;
  /* Lower positioning */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 10px;
  opacity: 0.8;
  gap: 6px;
  white-space: nowrap;
  line-height: 1;
  animation: scroll-nudge 0.9s ease-in-out 1;
  animation-fill-mode: both;
}

.hero-scroll-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  font-size: inherit;
  font-family: inherit;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
  transform: translateY(-1.5px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll {
    animation: none;
  }
}

.scroll-arrow {
  font-size: 1.2rem;
}

@keyframes scroll-nudge {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  60% {
    transform: translateX(-50%) translateY(6px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

/* -- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

/* Icon inside buttons */
.btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 28px;
}

.btn .btn-icon svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

.btn .btn-label {
  display: inline-block;
  padding-left: 6px;
}

/* Adjust colors so icon area is slightly contrasted */
.btn-linkedin .btn-icon {
  background: #0b66a3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-cv .btn-icon {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.btn-cv .btn-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-cv .btn-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.btn-linkedin .btn-icon svg {
  fill: #fff;
}

/* Larger visual spacing and subtle hover */
.hero-cta .btn:hover {
  transform: none;
  box-shadow: none;
}

/* Icon label spacing */
.btn .btn-label {
  font-size: 0.95rem;
  color: inherit;
}

/* Make buttons match attached sizes */
.hero-cta .btn {
  height: 44px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 6px;
  font-size: 0.92rem;
  gap: 8px;
  min-width: auto;
  box-shadow: none;
}

.hero-cta .btn .btn-label {
  font-size: 0.92rem;
  font-weight: 700;
  padding-left: 0;
}

.hero-cta .btn .btn-icon svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 520px) {
  .hero-cta {
    flex-wrap: wrap;
  }

  .hero-cta .btn {
    min-width: 168px;
  }
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
}


/* -- About Section Strict Replica -- */
.about-section {
  padding: 80px 0;
}

.about-title {
  font-family: 'Lato', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.about-text {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.about-text p {
  margin-bottom: 1em;
}

@media (min-width: 900px) {
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 40px;
    align-items: start;
  }

  .about-image {
    margin-top: 56px;
  }
}

.about-image {
  width: 100%;
  max-width: 240px;
  border-radius: 4px;
  overflow: hidden;
  justify-self: center;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Social Icons Strict Replica */
.about-socials {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity 0.2s;
}

.social-btn:hover {
  opacity: 0.85;
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-btn.github {
  background-color: #1b1c1d;
}

.social-btn.linkedin {
  background-color: #0077b5;
}

.social-btn.youtube {
  background-color: #ff0000;
}

.social-btn.twitter {
  background-color: #55acee;
}

.social-btn.stackoverflow {
  background-color: #f2711c;
}


/* -- Cards (Projects - Premium Design) -- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Search bar and tag suggestions inside projects */
.projects-search {
  max-width: 1100px;
  margin: 18px auto 26px;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input input[type="search"] {
  width: 100%;
  padding: 12px 44px 12px 14px;
  border-radius: 6px;
  border: 1px solid #e6e6e6;
  font-size: 0.98rem;
}

.search-input button {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #9aa3ad;
}

.tag-suggestions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-suggestions .suggest {
  background: #f3f4f6;
  color: #111827;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid #e6e6e6;
}

.tag-suggestions .suggest.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* At wide viewports prefer a fixed three-column layout to match screenshot */
@media (min-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(3, 320px);
    max-width: 1060px;
    /* 3 * 320 + gaps ~= 1060 */
  }
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-color);
  color: var(--text-primary);
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.06);
  transition: transform 260ms cubic-bezier(.2, .9, .2, 1), box-shadow 260ms ease;
  cursor: default;
  min-height: 240px;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.12);
}

.card.clickable {
  cursor: pointer;
}

.card-image {
  width: 100%;
  height: 220px;
  display: block;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms cubic-bezier(.2, .9, .2, 1);
}

.card:hover .card-image img {
  transform: scale(1.06);
}

/* overlay that appears on hover similar to reference */
.card-overlay {
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 40%, rgba(0, 0, 0, 0.55) 100%);
  transition: background 320ms ease, opacity 320ms ease;
  pointer-events: none;
}

/* overlay inner layout */
.card-overlay .overlay-top,
.card-overlay .overlay-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.card-overlay .overlay-top {
  gap: 10px;
}

.card-overlay .overlay-bottom {
  margin-top: auto;
  padding-bottom: 18px;
}

.overlay-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* icons appear on hover */
.overlay-icons .circle-icon {
  opacity: 0;
  transform: translateY(-6px);
  transition: all 260ms ease;
  pointer-events: auto;
}

.card:hover .overlay-icons .circle-icon {
  opacity: 1;
  transform: translateY(0);
}

/* ribbon inside overlay should be compact */
.card-image>.ribbon {
  position: absolute;
  left: 12px;
  top: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  font-size: 0.84rem;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 40;
}

/* ensure overlay content is readable */
.card .card-title {
  color: #fff;
}

.card .card-date {
  color: rgba(255, 255, 255, 0.85);
}

/* placeholder when no image */
.card-placeholder {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, #f0f2f5, #ffffff);
}

.card-footer {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
}

.card-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Card header with ribbon and small icon */
.card-header {
  position: relative;
  padding: 16px 18px;
  /* header padding tuned to screenshot */
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eef0f2;
  /* very light separator */
  background: transparent;
}

.card-header-left {
  flex: 1 1 auto;
}

.card-title {
  font-size: 1.05rem;
  margin: 0 0 4px 0;
}

.card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

.card-icons {
  flex: 0 0 auto;
}

.card-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.circle-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.circle-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* image badge variant: blue background with white icon */
.circle-icon.image {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.circle-icon.link {
  background: #efefef;
  color: #6b7280;
}

/* github variant: white background with blue outline and blue icon */
.circle-icon.github {
  background: #fff;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

/* slightly smaller ribbon to keep visual hierarchy */
.ribbon {
  font-size: 0.72rem;
  padding: 5px 8px;
}

.ribbon {
  position: absolute;
  left: 14px;
  top: 12px;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
  white-space: nowrap;
  z-index: 8;
  line-height: 1;
}

/* decorative small outlined square anchor under the ribbon (matches screenshot) */
.ribbon::after {
  content: '';
  position: absolute;
  /* place anchor left of the ribbon and a bit lower so it doesn't overlap the date */
  left: -12px;
  top: calc(100% + 6px);
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 3px solid rgba(37, 99, 235, 1);
  background: transparent;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.06);
  transform: rotate(90deg);
}

/* Keep a single ribbon style; color variants removed to restore earlier look */

/* Ribbon color variants: Personal = green, Work = blue */
.ribbon.ribbon-personal {
  background: #10b981;
  /* emerald/green */
  color: #fff;
}

.ribbon.ribbon-personal::after {
  border-color: #10b981;
  left: -12px;
  top: calc(100% + 6px);
  transform: rotate(90deg);
}

.ribbon.ribbon-work {
  background: var(--accent-primary);
  color: #fff;
}

.ribbon.ribbon-work::after {
  border-color: var(--accent-primary);
  left: -12px;
  top: calc(100% + 6px);
  transform: rotate(90deg);
}

.card-title {
  font-size: 1rem;
  /* smaller and compact */
  margin: 0;
  /* remove extra spacing so it fits one line */
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 120px);
  /* leave space for icons on the right */
}

.card-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.card-desc {
  font-size: 0.88rem;
  /* slightly smaller body */
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* Dark styled tags at card bottom (like attached design) */
.tag.dark {
  background: #111111;
  color: #fff;
  border: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  padding: 6px 10px;
  border-radius: 6px;
}

.card-tags-bottom {
  margin-top: 18px;
  margin-bottom: 12px;
}

.card-links {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.link-arrow {
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.link-arrow:hover {
  gap: 10px;
}

/* -- Timeline (Experience/Education) -- */
.timeline {
  border-left: 2px solid var(--border-color);
  padding-left: 40px;
  position: relative;
}

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -49px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 0 4px var(--bg-color);
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.timeline-title {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 1.1rem;
  color: var(--accent-primary);
  margin-bottom: 16px;
  display: inline-block;
}

.timeline-desc {
  color: var(--text-secondary);
}

.timeline-desc ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-top: 12px;
}

.timeline-desc li {
  margin-bottom: 6px;
}

/* --- Clean list style for Education & Experience (centered header + separators) --- */
#education .section-header,
#experience .section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: nowrap;
}

/* Centered header for Projects to match design */
#projects .section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: nowrap;
}

#projects .section-header::before,
#projects .section-header::after {
  content: '';
  flex: 1 1 20%;
  height: 1px;
  background: var(--border-color);
  opacity: 0.9;
}

#projects .section-header .section-title {
  margin: 0 18px;
  background: transparent;
  padding: 6px 12px;
  font-size: 1.4rem;
}

#education .section-header::before,
#education .section-header::after,
#experience .section-header::before,
#experience .section-header::after {
  content: '';
  flex: 1 1 20%;
  height: 1px;
  background: var(--border-color);
  opacity: 0.9;
}

#education .section-header .section-title,
#experience .section-header .section-title {
  margin: 0 18px;
  background: transparent;
  padding: 6px 12px;
  font-size: 1.4rem;
}

#education .timeline,
#experience .timeline {
  border-left: none;
  padding-left: 0;
}

#education .timeline-item,
#experience .timeline-item {
  border-top: 1px solid var(--border-color);
  padding: 26px 0;
  margin: 0;
}

#education .timeline-item:first-child,
#experience .timeline-item:first-child {
  border-top: none;
  padding-top: 0;
}

#education .timeline-date,
#experience .timeline-date {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 8px;
}

#education .timeline-title,
#experience .timeline-title {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

#education .timeline-desc,
#experience .timeline-desc {
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Increase spacing inside the education container for a cleaner feel */
#education .container,
#experience .container {
  max-width: 1100px;
}

/* -- Skills Grid -- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.skill-category {
  background: var(--surface-color);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.skill-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* -- Contact -- */
/* -- Contact Section Revamp for Multinational Style -- */
.contact-section {
  padding: 100px 0;
  position: relative;
  text-align: left;
  /* Reset alignment */
}

/* ensure links and buttons in contact have pointer */
.contact-detail-card,
.submit-btn,
.social-mini-btn {
  cursor: pointer;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;
    align-items: start;
  }
}

/* Left Col */
.contact-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.contact-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 440px;
  line-height: 1.6;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
}

.contact-cards-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.contact-detail-card:hover {
  background: var(--surface-hover);
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.detail-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  border-radius: 12px;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.contact-detail-card:hover .detail-icon {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.detail-content {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-socials-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.social-mini-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.social-mini-btn:hover {
  background: var(--surface-hover);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Right Col: Form */
.clean-form {
  background: var(--surface-color);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .clean-form {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: linear-gradient(145deg, #111, #0f0f0f);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .form-row {
    flex-direction: row;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.form-group.half {
  flex: 1;
  margin-bottom: 0;
}

.clean-form label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-left: 2px;
  letter-spacing: 0.3px;
}

.clean-form input,
.clean-form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .clean-form input,
[data-theme="dark"] .clean-form textarea {
  background: #050505;
}

.clean-form input:focus,
.clean-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.submit-btn {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  gap: 10px;
  padding: 16px;
  font-size: 1.05rem;
  border-radius: 10px;
}

/* Success State */
.form-success {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.5s ease-out;
}

.success-icon {
  width: 64px;
  height: 64px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  padding: 12px;
  margin-bottom: 8px;
}

.form-success h3 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--text-primary);
}

.form-success p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Email Card Copy Feedback */
.email-card .copy-feedback {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-top: 4px;
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -- Footer -- */
.site-footer {
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 100px;
}

/* -- Mobile -- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 2rem;
  }

  .timeline {
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
  }

  .timeline-marker {
    left: -25.5px;
    width: 12px;
    height: 12px;
  }

  .header-inner {
    flex-direction: column;
    gap: 16px;
  }
}

/* -- Animations -- */
/* -- Animations -- */
.reveal {
  /* Default to visible so content shows if JS is blocked */
  opacity: 1;
  transform: none;
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

/* JS will add this class to enable the reveal effect */
.reveal.hero-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.card-header-left {
  flex: 1 1 auto;
}

.card-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto;
}

.circle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: var(--accent-primary);
  cursor: default;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}

.circle-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.circle-icon.github {
  background: #fff;
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.circle-icon.image {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.16);
}

.card.has-img {
  padding-bottom: 12px;
}

.card {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
}

/* Lightbox / modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  max-width: 1100px;
  width: 100%;
  background: transparent;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
  position: relative;
  padding: 18px 24px;
  /* small padding to separate controls */
}

.modal-content img {
  max-width: 50%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 8px;
  transform-origin: center center;
  margin: 0 auto;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  transition: transform 320ms cubic-bezier(.2, .9, .2, 1), opacity 220ms ease;
  transform: scale(0.98);
  opacity: 0;
}

.modal-content {
  transform: scale(0.94);
  opacity: 0;
  transition: transform 240ms cubic-bezier(.2, .9, .2, 1), opacity 180ms ease;
}

.modal-overlay.open .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  right: -6px;
  top: -26px;
  background: #111;
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
  transform: scale(1.05);
}

/* Modal footer: caption + download */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.modal-caption {
  color: #fff;
  font-size: 0.98rem;
  opacity: 0.95;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-download,
.modal-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.modal-download:hover,
.modal-open:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
}

.modal-download::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 8px;
  vertical-align: middle;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M12 16l4-5h-3V4h-2v7H8l4 5z'/></svg>");
}

.modal-open::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 8px;
  vertical-align: middle;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3z'/></svg>");
}

/* animate image into view when modal opens */
.modal-overlay.open .modal-content img {
  transform: scale(1);
  opacity: 1;
}

/* Prev/Next nav buttons */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2100;
}

.modal-nav.prev {
  left: 10px;
}

.modal-nav.next {
  right: 10px;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.65);
  transform: translateY(-50%) scale(1.05);
}

/* When image is set to smaller width (e.g., 50%), center it */
.modal-content .small-img {
  display: block;
  margin: 0 auto;
}

/* Larger screens: limit grid to 3 columns centered */
@media (min-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* See all button under projects */
.projects-footer {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.btn-see-all {
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 700;
}

.btn-see-all:hover {
  background: var(--surface-hover);
}

/* -- Premium Card Design Overrides -- */

.card {
  background: var(--surface-color) !important;
  border-radius: 16px !important;
  border: 1px solid var(--border-color) !important;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease !important;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
  min-height: auto !important;
  padding: 0 !important;
}

.card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
}

/* Image Wrapper */
.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #f0f0f0;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-hover), var(--bg-color));
  color: var(--text-muted);
  font-size: 3rem;
  font-weight: 800;
  opacity: 0.3;
}

/* Badge */
.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  border: none !important;
}

.badge-work {
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.1) !important;
}

.badge-personal {
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.1) !important;
}

[data-theme="dark"] .badge {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Overlay & Actions */
.card-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.4) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  pointer-events: none;
  height: auto !important;
  padding: 0 !important;
}

.card-overlay * {
  pointer-events: auto;
}

.card:hover .card-overlay {
  opacity: 1 !important;
}

.card-actions {
  display: flex;
  gap: 16px;
  transform: translateY(10px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .card-actions {
  transform: translateY(0);
}

.action-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:hover {
  transform: scale(1.1);
  background: var(--accent-primary);
  color: #fff;
}

.action-btn svg {
  width: 20px;
  height: 20px;
}

/* Content Area Override */
.card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header-row {
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  color: var(--text-primary) !important;
}

.card-desc {
  font-size: 0.95rem !important;
  color: var(--text-secondary) !important;
  line-height: 1.6 !important;
  margin-bottom: 24px !important;
  flex: 1;
}

.card-footer-row {
  margin-top: auto;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.tech-tag:hover {
  background: var(--bg-color);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.tech-tag.more {
  background: transparent;
  border: 1px dashed var(--border-color);
}

/* -- Reference Style Cards -- */
.card.reference-style {
  background: #fff !important;
  border-radius: 6px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  min-height: 480px;
  /* Force tall cards */
  position: relative;
  overflow: visible !important;
  /* Allow ribbon to hang */
}

.card.reference-style:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
  border-color: #d1d5db !important;
}

/* Dark theme for reference style cards */
[data-theme="dark"] .card.reference-style {
  background: var(--surface-color) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .projects-section .card.reference-style {
  background: var(--surface-color) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Header */
.ref-card-header {
  padding: 24px 24px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.ref-header-content {
  flex: 1;
}

.ref-icons {
  display: flex;
  gap: 8px;
  margin-left: 16px;
}

.ref-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.2;
}

.ref-date {
  font-size: 0.9rem;
  color: #9ca3af;
  /* Light gray text for date */
  font-weight: 400;
  display: block;
  margin-bottom: 20px;
}

/* Ribbon Container */
.ref-ribbon-container {
  display: block;
  margin-top: 6px;
  margin-bottom: 12px;
}

/* The Ribbon itself */
.ref-ribbon {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.75rem;
  /* tiny caps */
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  border-radius: 0 4px 4px 0;
  /* flat left, round right? No, folded let's look at ref */
  /* Ref is a flag on the left. Let's make it a tag under title */
  position: relative;
  background: #2563eb;
  letter-spacing: 0.05em;

  /* To match the 'folded' look on the left edge if desired */
  margin-left: -28px;
  /* Pull it out of the padding */
  padding-left: 24px;
  /* compensate text */
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.ref-ribbon::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  border-top: 6px solid #1e40af;
  /* Darker shade */
  border-left: 6px solid transparent;
}

.ref-ribbon.work {
  background: #2563eb;
}

.ref-ribbon.work::after {
  border-top-color: #1e3a8a;
}

.ref-ribbon.personal {
  background: #ef4444;
}

.ref-ribbon.personal::after {
  border-top-color: #991b1b;
}


/* Body */
.ref-body {
  padding: 0 24px;
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ref-description p {
  margin-bottom: 16px;
}

.ref-long-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */
.ref-footer {
  padding: 24px;
  border-top: 1px solid transparent;
  margin-top: auto;
}

.ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ref-tag {
  background: #1f2937;
  color: #fff;
  font-size: 0.55rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Icons Buttons */
.ref-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #9ca3af;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.ref-icon-btn:disabled,
.ref-icon-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.ref-icon-btn:disabled:hover,
.ref-icon-btn.is-disabled:hover {
  background: inherit;
  transform: none;
}

.ref-icon-btn:hover {
  background: var(--accent-primary);
  transform: scale(1.1);
}

.ref-icon-btn.primary {
  background: var(--accent-primary);
}

[data-theme="dark"] .ref-tag {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #e5e7eb;
}

[data-theme="dark"] .ref-icon-btn {
  background: #4b5563;
}

[data-theme="dark"] .ref-icon-btn.primary {
  background: var(--accent-primary);
}

/* -- Redesigned Education Section (Multinational/Professional) -- */
section#education .timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0;
  border: none;
  /* remove old vertical line if any */
  margin-top: 40px;
}

@media (min-width: 768px) {
  section#education .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

.edu-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  /* subtle glass effect if supported/desired, but sticking to solid clean for now */
}

.edu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  /* Soft professional shadow */
  border-color: var(--accent-primary);
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.edu-card:hover::before {
  opacity: 1;
}

[data-theme="dark"] .edu-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .edu-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.edu-icon {
  font-size: 2.5rem;
  line-height: 1;
  background: var(--bg-color);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.edu-content {
  display: flex;
  flex-direction: column;
}

.edu-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.edu-degree {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.edu-school {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* -- Contact Success Message -- */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 300px;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  /* light green bg */
  color: #10b981;
  /* green */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 3;
}

.form-success h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.form-success p {
  color: var(--text-secondary);
  max-width: 300px;
  margin: 0 auto;
}

/* --- Senior Engineering Review Panel --- */
/* --- Senior Engineering Review Panel (STRICT DIMENSIONS) --- */
.brief-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brief-modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

.brief-modal-window {
  width: 65vw;
  height: 60vh;
  min-width: 920px;
  min-height: 540px;
  background: rgba(var(--bg-color-rgb, 255, 255, 255), 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  color: var(--text-primary);
  border-radius: 12px;
  border: 1px solid rgba(var(--text-primary-rgb, 0, 0, 0), 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.02);
  transform: translateY(12px) scale(0.99);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
  position: relative;
}

[data-theme="dark"] .brief-modal-window {
  background: rgba(13, 13, 13, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.brief-modal-overlay.active .brief-modal-window {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.brief-header {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

.brief-project-title {
  font-size: 17px;
  /* 16-18px */
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: visible;
  /* Fully visible, no truncation */
  margin: 0;
}

.brief-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brief-action-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-primary);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.brief-action-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
  opacity: 1;
}

.brief-action-link svg {
  width: 14px;
  height: 14px;
}

.brief-close-btn {
  width: 32px;
  height: 32px;
  background: var(--surface-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.brief-close-btn:hover,
.brief-close-btn:focus {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--accent-red);
  outline: none;
}

.brief-close-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-red);
}

.brief-action-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* CONTENT GRID (EXACT 2x2 LAYOUT - NO SCROLL) */
.brief-grid {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr 1.6fr;
  grid-template-columns: 1fr 1.7fr;
  gap: 1rem;
  padding: 18px 22px;
  background: transparent;
  box-sizing: border-box;
  overflow: hidden;
}

.brief-section {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.2, 0, 0.2, 1),
    border-color 0.2s ease;
}

.brief-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  border-color: var(--accent-primary);
  z-index: 2;
}

[data-theme="dark"] .brief-section:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  background: var(--surface-hover);
}

/* Specific alignments for 2x2 */
.section-problem {
  grid-row: 1;
  grid-column: 1;
}

.section-impact {
  grid-row: 1;
  grid-column: 2;
}

.section-solution {
  grid-row: 2;
  grid-column: 1;
}

.section-archi {
  grid-row: 2;
  grid-column: 2;
  border: 1px solid var(--border-color);
  position: relative;
}

.brief-section-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 1;
  /* Full visibility in both modes */
}

.brief-content-list,
.brief-content-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-family: var(--font-main);
  letter-spacing: -0.01em;
  overflow: hidden;
}

.kpi-mode li {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13.5px;
  margin-bottom: 6px !important;
}

.kpi-mode li strong {
  color: var(--accent-primary);
  font-size: 16px;
  margin-right: 4px;
}

.brief-content-list ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.brief-content-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 6px;
}

.brief-content-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* Tech Badges Wrap */
.brief-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.brief-badge {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
}

/* Architecture Image Cell */
.brief-section.section-archi {
  padding: 12px 0 0 0;
  /* Space for the title at top */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.section-archi .brief-section-label {
  width: 100%;
  padding-left: 16px;
  margin-bottom: 4px;
}

.brief-archi-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 16px;
  background: linear-gradient(0deg, var(--bg-color) 60%, transparent 100%);
  z-index: 5;
  margin: 0;
  line-height: 1.4;
  pointer-events: none;
}

[data-theme="dark"] .brief-archi-caption {
  background: linear-gradient(0deg, #111 60%, transparent 100%);
}

[data-theme="dark"] .brief-section.section-archi {
  background: #1a1a1a;
  /* Explicit dark gray */
}

[data-theme="light"] .brief-section.section-archi {
  background: #f0f0f0;
  /* Explicit light gray */
}

.brief-archi-preview {
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #fdfdfd;
  /* Neutral light */
}

[data-theme="dark"] .brief-archi-preview {
  background: #1e1e1e;
  /* Neutral dark - clearly different from modal bg */
}

/* Ensure image is clearly readable and fits perfectly */
#briefModalArchiImg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 1 !important;
  filter: none !important;
  display: block;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brief-archi-preview:hover #briefModalArchiImg {
  transform: scale(1.03);
}

.btn-archi-download,
.btn-archi-expand {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.75;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-archi-expand {
  top: 12px;
  right: 12px;
}

.btn-archi-download {
  bottom: 12px;
  right: 12px;
}

.btn-archi-download:hover,
.btn-archi-expand:hover,
.btn-archi-download:focus,
.btn-archi-expand:focus {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  transform: scale(1.08);
  opacity: 1;
  outline: none;
}

.btn-archi-download svg,
.btn-archi-expand svg {
  width: 16px;
  height: 16px;
}

.archi-zoom-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brief-archi-preview:hover .archi-zoom-hint {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.toolbar-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff !important;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.toolbar-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

/* --- Advanced Engineering Lightbox (FUNCTIONAL REQUIREMENTS) --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  /* Dark backdrop but clear center */
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* 90vw x 90vh Lightbox Container */
.lightbox-wrapper {
  width: 90vw;
  height: 90vh;
  display: flex;
  flex-direction: column;
  background: #000;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
}

.lightbox-toolbar {
  height: 52px;
  background: rgba(10, 10, 10, 0.85);
  /* Proper dark background for contrast */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.toolbar-left .toolbar-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.toolbar-right {
  display: flex;
  gap: 12px;
}

.toolbar-btn {
  background: transparent;
  border: none;
  color: #fff !important;
  /* High-contrast */
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.toolbar-btn svg {
  width: 20px;
  /* Minimum size 20x20px */
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
}

.lightbox-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: transparent;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-viewport:active {
  cursor: grabbing;
}

.lightbox-container {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

#lightboxImage {
  max-width: 95vw;
  max-height: 95vh;
  display: block;
  user-select: none;
  pointer-events: none;
  opacity: 1 !important;
  filter: none !important;
}

@media (prefers-reduced-motion: reduce) {

  .brief-modal-window,
  .brief-section,
  #briefModalArchiImg,
  .lightbox-container {
    transition: none !important;
    transform: none !important;
  }
}

/* Theme Support for Panel */
[data-theme="dark"] .brief-modal-window {
  background: #111;
  border-color: #222;
}

[data-theme="dark"] .brief-section {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

[data-theme="light"] .brief-modal-window {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #111;
}

[data-theme="light"] .brief-section {
  background: #fff;
  border-color: #e9ecef;
}

[data-theme="light"] .brief-project-title {
  color: #111;
}

[data-theme="light"] .brief-content-text {
  color: #333;
}

[data-theme="light"] .brief-content-list {
  color: #444;
}

/* Responsive Grid for Mobile */
@media (max-width: 1024px) {
  .brief-modal-window {
    width: 95vw;
    height: 90vh;
  }

  .brief-grid {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    overflow-y: auto;
  }

  .brief-modal-window {
    overflow-y: visible;
  }
}