/* ================================================================
   Custom styles – Catalin Anghel personal site
   Built on Bootstrap 5.3. Only override what Bootstrap doesn't cover.
   ================================================================ */

/* ----------------------------------------------------------------
   Design tokens
   ---------------------------------------------------------------- */
:root {
  --bg:          #f7f7f4;
  --text:        #1f2933;
  --text-sec:    #5f6b76;
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --card-bg:     #ffffff;
  --border:      #e5e7eb;
  --nav-bg:      rgba(247, 247, 244, 0.96);
}

/* ----------------------------------------------------------------
   Base
   ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ----------------------------------------------------------------
   Navbar
   ---------------------------------------------------------------- */
#mainNav {
  background-color: var(--nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

#mainNav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.07);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--accent) !important;
}

.navbar-toggler {
  border-color: var(--border);
  padding: 0.3rem 0.6rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%235f6b76' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
  color: var(--text-sec) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem !important;
  border-radius: 5px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
  background-color: rgba(37, 99, 235, 0.06);
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0.1rem;
  margin: 0 0.5rem;
}

.lang-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-sec);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.4;
}

.lang-btn:hover {
  color: var(--accent);
  border-color: var(--border);
}

.lang-btn.active {
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.3);
  background-color: rgba(37, 99, 235, 0.07);
}

/* Navbar CTA */
#mainNav .btn-primary {
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
}

@media (max-width: 991.98px) {
  .lang-switcher {
    margin: 0.75rem 0 0.5rem;
  }
  #mainNav .btn-primary {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    align-self: flex-start;
  }
}

/* ----------------------------------------------------------------
   Buttons (global overrides)
   ---------------------------------------------------------------- */
.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-sec);
  border-radius: 6px;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: #f0f1f3;
  border-color: #c5c9d0;
  color: var(--text);
}

/* ----------------------------------------------------------------
   Section base
   ---------------------------------------------------------------- */
section {
  padding: 5.5rem 0;
}

.section-alt {
  background-color: var(--card-bg);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-sec);
  max-width: 560px;
  line-height: 1.65;
}

@media (max-width: 767.98px) {
  section {
    padding: 3.5rem 0;
  }
  .section-title {
    font-size: 1.5rem;
  }
}

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */
#hero {
  padding: 6rem 0 5rem;
  background-color: var(--bg);
}

.hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  user-select: none;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 760px;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-sec);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.hero-tag {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sec);
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-tag .bi-check2 {
  color: var(--accent);
  font-size: 0.85rem;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-ctas .btn {
  font-size: 0.95rem;
  padding: 0.6rem 1.4rem;
}

@media (max-width: 767.98px) {
  #hero {
    padding: 4rem 0 3.5rem;
  }
  .hero-title {
    font-size: 1.875rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
}

/* ----------------------------------------------------------------
   Cards (What I do / Work style)
   ---------------------------------------------------------------- */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.card-icon {
  width: 44px;
  height: 44px;
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.875rem;
  color: var(--text-sec);
  line-height: 1.65;
  margin-bottom: 0;
}

/* Education card */
.edu-card {
  position: sticky;
  top: 90px;
}

/* ----------------------------------------------------------------
   Skills chips
   ---------------------------------------------------------------- */
.skills-group {
  margin-bottom: 2rem;
}

.skills-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 0.65rem;
}

.skill-chip {
  display: inline-block;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.28rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  margin: 0.2rem 0.1rem;
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}

.skill-chip:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--accent);
}

/* ----------------------------------------------------------------
   Problems
   ---------------------------------------------------------------- */
.problem-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.problem-item:first-child {
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .col-md-6 .problem-item:first-child {
    border-top: 1px solid var(--border);
  }
}

.problem-icon {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.problem-text {
  font-size: 0.925rem;
  color: var(--text-sec);
  line-height: 1.55;
}

/* ----------------------------------------------------------------
   Experience timeline
   ---------------------------------------------------------------- */
.exp-item {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 2.5rem;
  border-left: 2px solid var(--border);
}

.exp-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.exp-item--last {
  padding-bottom: 0;
  border-left-color: transparent;
}

.exp-period {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.exp-role {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.exp-company {
  font-size: 0.875rem;
  color: var(--text-sec);
  margin-bottom: 0.6rem;
}

.exp-context {
  font-size: 0.875rem;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.exp-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.exp-tech-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

/* ----------------------------------------------------------------
   Project cards
   ---------------------------------------------------------------- */
.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: box-shadow 0.2s ease;
}

.project-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.project-role {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.project-context {
  font-size: 0.875rem;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-points {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.project-points li {
  font-size: 0.875rem;
  color: var(--text-sec);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
  line-height: 1.55;
}

.project-points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.project-tech {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-sec);
  background-color: var(--bg);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
}

/* ----------------------------------------------------------------
   Work style principles
   ---------------------------------------------------------------- */
.principle-number {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.6rem;
  opacity: 0.7;
}

.principle-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.principle-text {
  font-size: 0.875rem;
  color: var(--text-sec);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ----------------------------------------------------------------
   Contact
   ---------------------------------------------------------------- */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 0.15rem;
}

.contact-info-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  display: block;
}

a.contact-info-value:hover {
  color: var(--accent);
  text-decoration: none;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.contact-actions .btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
footer {
  background-color: var(--text);
  color: rgba(255, 255, 255, 0.55);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: 1rem;
  }
}

.footer-brand {
  font-weight: 700;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-role {
  font-size: 0.8rem;
}

.footer-copy {
  font-size: 0.8rem;
}

/* ----------------------------------------------------------------
   Back to top button
   ---------------------------------------------------------------- */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1040;
  box-shadow: 0 2px 14px rgba(37, 99, 235, 0.35);
  transition: background-color 0.2s, transform 0.2s, opacity 0.3s;
  opacity: 0;
}

#backToTop.visible {
  display: flex;
  opacity: 1;
}

#backToTop:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------------
   Copy toast
   ---------------------------------------------------------------- */
.copy-toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background-color: var(--text);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ----------------------------------------------------------------
   Utility
   ---------------------------------------------------------------- */
.text-accent {
  color: var(--accent) !important;
}
