@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e2e8f0;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body.dark-theme {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --border: #334155;
  --nav-bg: rgba(30, 41, 59, 0.8);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* Navbar */
.navbar {
  background: var(--nav-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-family: 'Outfit', sans-serif;
  color: var(--text) !important;
}

.nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

/* Cards */
.card {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Accordion */
.accordion-item {
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  border-radius: 0.75rem !important;
  overflow: hidden;
}

.accordion-button {
  background: var(--card);
  color: var(--text);
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--accent);
}

.accordion-body {
  background: var(--card);
  color: var(--text);
}

.dark-theme .accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* Theme Toggle */
.theme-toggle {
  width: 64px;
  height: 32px;
  background: var(--border);
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  transition: background 0.3s;
}

.theme-toggle .toggle-knob {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  left: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark-theme .theme-toggle .toggle-knob {
  transform: translateX(32px);
  background: #1e293b;
}

/* Profile Square */
.profile-square {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--card);
}

/* Footer */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--accent);
}

/* Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
  width: 50%;
  padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 0;
  width: 1rem;
  height: 1rem;
  background: var(--accent);
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:nth-child(odd)::after {
  right: -0.5rem;
}

.timeline-item:nth-child(even)::after {
  left: -0.5rem;
}

/* Contact */
.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-info-item i {
  width: 3rem;
  height: 3rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 1rem;
}

/* Forms */
.form-control {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.form-control:focus {
  background: var(--bg);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Dark Mode Color Overrides for Bootstrap Utilities */
.dark-theme .text-muted,
.dark-theme .small.text-muted {
  color: var(--muted) !important;
}

.dark-theme .bg-light {
  background-color: var(--card) !important;
}

.dark-theme .border {
  border-color: var(--border) !important;
}

.dark-theme .btn-outline-dark {
  color: var(--text);
  border-color: var(--border);
}

.dark-theme .btn-outline-dark:hover {
  background-color: var(--text);
  color: var(--bg);
}

.dark-theme .list-group-item {
  background-color: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.dark-theme .dropdown-menu {
  background-color: var(--card);
  border-color: var(--border);
}

.dark-theme .dropdown-item {
  color: var(--text);
}

.dark-theme .dropdown-item:hover {
  background-color: var(--bg);
}

@media (max-width: 768px) {
  .timeline::before {
    left: 1rem;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 3rem;
  }

  .timeline-item::after {
    left: 0.5rem !important;
  }
}