:root {
  --primary: #355848;
  --primary-light: #4a6f5d;
  --primary-dark: #20372d;
  --accent: #9a7a45;
  --accent-soft: rgba(154, 122, 69, 0.12);
  --tech: #3f6574;
  --bg-body: #eef1f0;
  --bg-card: #ffffff;
  --bg-sidebar: #111827;
  --bg-soft: #f6f8f7;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #f3f4f6;
  --border-color: #dde3e0;
  --card-shadow: 0 10px 28px -12px rgba(17, 24, 39, 0.18);
  --hover-shadow: 0 18px 34px -16px rgba(32, 55, 45, 0.28);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --transition: 180ms ease;
}

[data-theme="dark"] {
  --bg-body: #0b0f14;
  --bg-card: #121820;
  --bg-sidebar: #0d131a;
  --bg-soft: #0f151c;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-color: #25303a;
  --card-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.75);
  --hover-shadow: 0 18px 34px -16px rgba(74, 111, 93, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 56px;
  transition: background-color .25s ease, color .25s ease;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.top-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 11px 24px;
}

[data-theme="dark"] .top-navbar {
  background: rgba(18, 24, 32, 0.9);
}

.top-navbar-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

[data-theme="dark"] .brand-logo {
  color: #b7c8bf;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: var(--bg-sidebar);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .85rem;
}

.brand-logo small {
  color: var(--text-muted);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

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

.search-box input {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text-main);
  padding: 9px 34px 9px 38px;
  outline: none;
  font-size: .86rem;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74, 111, 93, .13);
}

.search-box .fa-magnifying-glass {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: .8rem;
  pointer-events: none;
}

.clear-btn {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: .8rem;
}

.btn-icon,
.btn-primary-sm {
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-main);
}

.btn-icon:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-primary-sm {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

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

.main-wrapper {
  max-width: 1240px;
  margin: 34px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 345px 1fr;
  gap: 30px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 86px;
  background: var(--bg-sidebar);
  color: var(--text-light);
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, .05);
}

.profile-header {
  text-align: center;
}

.photo-frame {
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #17212b, #0e151c);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02), 0 14px 28px rgba(0, 0, 0, .28);
  position: relative;
  overflow: hidden;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;

}

.photo-frame::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(109, 143, 122, .28);
  border-radius: 14px;
}

.photo-initials {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 2.05rem;
  font-weight: 600;
  color: #c8d5ce;
  letter-spacing: .05em;
  position: relative;
  z-index: 1;
}

.status-dot {
  position: absolute;
  right: 17px;
  bottom: 17px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #6d8f7a;
  box-shadow: 0 0 0 4px #111827;
  z-index: 2;
}

.profile-name {
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
}

.profile-role {
  margin-top: 8px;
  color: #9fb6aa;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .78rem;
  font-weight: 600;
}

.badges-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 15px;
}

.badge-tag {
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .055);
  color: #cbd5e1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge-tag.highlight {
  border-color: rgba(109, 143, 122, .55);
  color: #cfe0d6;
  background: rgba(109, 143, 122, .12);
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  margin: 24px 0;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: #b8c9c0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.sidebar-section-title i {
  color: #7f9c8b;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-item {
  display: flex;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #d1d5db;
  transition: var(--transition);
}

.contact-item:hover {
  background: rgba(255, 255, 255, .06);
  transform: translateX(2px);
}

.contact-item>i {
  width: 19px;
  margin-top: 3px;
  color: #8ea596;
  text-align: center;
}

.contact-info span {
  display: block;
  color: #7f8b98;
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}

.contact-info strong {
  display: block;
  color: #eef2f7;
  font-size: .82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.edu-card,
.side-card {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .045);
  border-radius: 10px;
  padding: 15px;
}

.edu-card {
  margin-bottom: 9px;
}

.edu-degree {
  color: #fff;
  font-weight: 700;
  font-size: .93rem;
}

.edu-institution {
  color: #b8c1cc;
  font-size: .8rem;
  margin-top: 3px;
}

.edu-year {
  display: inline-block;
  margin-top: 8px;
  color: #b8c9c0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .67rem;
}

.language-list,
.compact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.language-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .8rem;
}

.language-row strong {
  font-weight: 600;
  color: #eef2f7;
}

.language-row span {
  color: #92a0ad;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem;
}

.compact-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #cbd5e1;
  font-size: .79rem;
}

.compact-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6d8f7a;
  flex: 0 0 auto;
}

.content-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 29px 30px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 13px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--primary-dark);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.section-subtitle {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--primary-dark);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.section-subtitle i {
  color: var(--accent);
  font-size: 1rem;
}

[data-theme="dark"] .section-title {
  color: #b7c8bf;
}

.section-title i {
  color: var(--accent);
  font-size: 1rem;
}

.section-code {
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem;
}

.career-text {
  border-left: 3px solid var(--primary-light);
  padding-left: 18px;
  color: var(--text-main);
  line-height: 1.8;
  font-size: .98rem;
  text-align: justify;
  word-break: break-word;
  hyphens: auto;
}

.career-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.meta-pill {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text-muted);
  padding: 6px 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem;
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 21px;
}

.filter-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-soft);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 23px;
  margin-bottom: 28px;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary-light);
}

.timeline-item.current::before {
  background: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(74, 111, 93, .10);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.job-title {
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--text-main);
}

.job-company {
  margin-top: 3px;
  color: var(--primary);
  font-size: .85rem;
  font-weight: 700;
}

[data-theme="dark"] .job-company {
  color: #90a99b;
}

.job-date {
  display: inline-block;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .66rem;
  font-weight: 600;
  white-space: nowrap;
}

.job-tag {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .65rem;
}

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
  text-align: justify;
  word-break: break-word;
  hyphens: auto;
}

.job-bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--text-main);
  font-size: .9rem;
  line-height: 1.58;
}

.job-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.skill-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 111, 93, .55);
  background: var(--bg-card);
}

.skill-icon {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--primary);
  background: rgba(74, 111, 93, .10);
  border: 1px solid rgba(74, 111, 93, .14);
}

.skill-name {
  color: var(--text-main);
  font-size: .86rem;
  font-weight: 800;
}

.skill-desc {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: .76rem;
  line-height: 1.45;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.course-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 15px;
}

.course-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.course-title {
  font-size: .9rem;
  font-weight: 800;
}

.course-year {
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .67rem;
}

.course-platform {
  margin-top: 2px;
  color: var(--primary);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .7rem;
  font-weight: 600;
}

.course-desc {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: .78rem;
}

.profile-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profile-point {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-size: .78rem;
}

.profile-point i {
  color: var(--primary-light);
  font-size: .7rem;
}

.scroll-top {
  position: fixed;
  left: 28px;
  bottom: 28px;
  width: 43px;
  height: 43px;
  border-radius: 10px;
  border: none;
  background: var(--primary-dark);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: #111827;
  color: #fff;
  padding: 12px 16px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .25);
  transform: translateY(80px);
  opacity: 0;
  transition: 220ms ease;
  font-size: .8rem;
  font-weight: 600;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast i {
  color: #8eaa9b;
}

.hidden-item {
  display: none !important;
}

@media (max-width: 980px) {
  .top-navbar-container {
    grid-template-columns: 1fr auto auto;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .main-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
  }

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

@media (max-width: 650px) {
  body {
    padding-bottom: 34px;
  }

  .top-navbar {
    padding: 10px 14px;
  }

  .top-navbar-container {
    grid-template-columns: 1fr auto;
  }

  .brand-logo small {
    display: none;
  }

  .btn-primary-sm span {
    display: none;
  }

  .btn-primary-sm {
    width: 40px;
    padding: 0;
  }

  #themeToggle {
    grid-column: 2;
    grid-row: 1;
  }

  .print-btn {
    grid-column: 2;
    grid-row: 2;
    display: none;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .main-wrapper {
    margin: 20px auto;
    padding: 0 14px;
    gap: 20px;
  }

  .sidebar {
    padding: 28px 20px;
  }

  .card-box {
    padding: 22px 18px;
  }

  .section-code {
    display: none;
  }

  .skills-grid,
  .two-column,
  .profile-points {
    grid-template-columns: 1fr;
  }

  .job-header {
    flex-direction: column;
    gap: 6px;
  }

  .photo-frame {
    width: 132px;
    height: 132px;
  }

  .profile-name {
    font-size: 1.4rem;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  .top-navbar,
  .scroll-top,
  .toast,
  .filter-container {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    padding: 0 !important;
    font-size: 10pt;
  }

  .main-wrapper {
    display: grid !important;
    grid-template-columns: 31% 1fr !important;
    gap: 8mm !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .sidebar {
    position: relative !important;
    top: 0 !important;
    background: #f4f6f5 !important;
    color: #111 !important;
    box-shadow: none !important;
    border: 1px solid #d8ddda !important;
    padding: 8mm 6mm !important;
  }

  .photo-frame {
    background: #e9edeb !important;
    box-shadow: none !important;
    border-color: #cfd6d2 !important;
  }

  .photo-initials,
  .profile-name,
  .contact-info strong,
  .edu-degree,
  .language-row strong {
    color: #111 !important;
  }

  .profile-role,
  .sidebar-section-title,
  .edu-year,
  .compact-item,
  .contact-item,
  .edu-institution,
  .language-row span {
    color: #444 !important;
  }

  .badge-tag {
    color: #222 !important;
    background: transparent !important;
    border-color: #bbb !important;
  }

  .status-dot {
    display: none !important;
  }

  .sidebar-divider {
    background: #d8ddda !important;
  }

  .card-box {
    box-shadow: none !important;
    border-color: #d8ddda !important;
    padding: 6mm !important;
    break-inside: avoid;
  }

  .content-area {
    gap: 5mm !important;
  }

  .section-title {
    color: #20372d !important;
  }

  .skill-card,
  .course-card {
    background: #fafafa !important;
    break-inside: avoid;
  }

  .timeline-item {
    break-inside: avoid;
    margin-bottom: 5mm;
  }

  a {
    text-decoration: none;
  }
}