:root {
  --primary: #4338ca;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --accent: #0ea5e9;
  --accent-secondary: #8b5cf6;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow: 0 4px 12px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-hover: all 0.2s cubic-bezier(0.33, 1, 0.68, 1);
}

[data-theme="dark"] {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #38bdf8;
  --accent-secondary: #a78bfa;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --border-light: #475569;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.2);
  --shadow: 0 4px 12px -1px rgb(0 0 0 / 0.15), 0 2px 4px -2px rgb(0 0 0 / 0.15);
  --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.25), 0 8px 10px -6px rgb(0 0 0 / 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-secondary);
  min-height: 100vh;
  transition: var(--transition);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(67, 56, 202, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 20%);
}

/* Top Navigation Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  padding: 16px 28px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  z-index: 100;
  transition: var(--transition);
}

.top-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition-hover);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 90px 24px 60px;
}

/* Hero Header */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  transform: rotate(15deg);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.1) 0%, transparent 20%),
              radial-gradient(circle at 90% 80%, rgba(255,255,255,0.05) 0%, transparent 20%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero .tagline {
  font-size: clamp(18px, 2.5vw, 22px);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}

.hero .mission {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 400px;
  line-height: 1.7;
  font-weight: 400;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  text-decoration: none;
  transition: var(--transition-hover);
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-item.contact-hidden {
  cursor: pointer;
  opacity: 0.9;
}

.contact-item.contact-hidden span:not(.contact-icon) {
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
}

.contact-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.headshot {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.headshot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2;
}

.headshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.33, 1, 0.68, 1);
  position: relative;
  z-index: 1;
}

.headshot:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.headshot:hover img {
  transform: scale(1.08);
}

/* Sections */
.section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition-hover);
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.section:hover::before {
  transform: scaleX(1);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
}

.section-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.2);
}

/* Experience Cards */
.experience-item {
  position: relative;
  padding: 0 0 0 36px;
  margin-bottom: 32px;
  transition: var(--transition);
}

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

.experience-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--border-light);
  transition: var(--transition);
  z-index: 1;
}

.experience-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 24px;
  bottom: -42px;
  width: 2px;
  background: var(--border-light);
  transition: var(--transition);
  z-index: 0;
}

.experience-item:last-child::after {
  display: none;
}

.experience-item:hover::after {
  background: var(--primary-light);
}

.experience-item:hover::before {
  background: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--primary-light);
}

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

.experience-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.experience-company {
  color: var(--primary);
  font-weight: 700;
}

.experience-date {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 500;
  border: 1px solid var(--border-light);
}

.experience-list {
  list-style: none;
  margin: 0;
}

.experience-list li {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  line-height: 1.6;
}

.experience-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transition: var(--transition);
}

.experience-list li:hover::before {
  background: var(--primary);
  transform: scale(1.2);
}

.experience-list li:hover {
  color: var(--text-primary);
}

/* Skills */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-hover);
  cursor: default;
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.skill-tag:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(67, 56, 202, 0.3);
}

.skill-tag.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skill-tag.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: linear-gradient(to right, rgba(67, 56, 202, 0.05), rgba(67, 56, 202, 0.1));
  box-shadow: 0 6px 16px rgba(67, 56, 202, 0.15);
}

/* Simple Info */
.info-text {
  font-size: 16px;
  color: var(--text-secondary);
  padding: 8px 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: inline-block;
  border: 1px solid var(--border-light);
  font-weight: 500;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border-light);
  margin-top: 20px;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 80px 20px 40px;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 36px 28px;
    gap: 28px;
  }

  .hero .mission {
    max-width: 100%;
  }

  .contact-info {
    justify-content: center;
    gap: 12px;
  }

  .contact-item {
    padding: 6px 14px;
  }

  .headshot {
    width: 130px;
    height: 130px;
  }

  .section {
    padding: 28px 24px;
    margin-bottom: 24px;
  }

  .experience-header {
    flex-direction: column;
    gap: 8px;
  }

  .experience-date {
    align-self: center;
  }

  .top-bar {
    padding: 12px 20px;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
  }

/* Adjust timeline for mobile */
.experience-item {
  padding: 0 0 0 28px;
  margin-bottom: 28px;
}

.experience-item::before {
  left: -7px;
  top: 0;
}
}

@media (max-width: 480px) {
  .hero {
    padding: 28px 20px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .contact-item {
    width: 100%;
    justify-content: center;
  }

  .experience-item {
    padding: 0 0 0 24px;
  }

  .section-title {
    font-size: 20px;
  }

  .container {
    padding: 70px 16px 40px;
  }

  .section {
    padding: 24px 16px;
  }

/* Further adjust timeline for small mobile */
.experience-item {
  padding: 0 0 0 24px;
  margin-bottom: 24px;
}

.experience-item::before {
  left: -7px;
  top: 0;
  width: 10px;
  height: 10px;
}

.experience-item::after {
  top: 18px;
  bottom: -60px;
}
}

/* Print Styles */
@media print {
  .top-bar {
    display: none;
  }

  .container {
    padding: 0;
    max-width: 100%;
  }

  .hero {
    background: none;
    color: black;
    box-shadow: none;
    border: 2px solid #333;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .hero h1, .hero .tagline, .hero .mission, .contact-item {
    color: black !important;
  }

  .section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

.experience-item {
  break-inside: avoid;
}

.experience-item::after {
  background: var(--border-light) !important;
}

  .section::before {
    background: black !important;
  }

  .experience-header::before {
    background: black !important;
    border: 3px solid white !important;
  }

  .experience-list li::before {
    background: black !important;
  }

  .skill-tag {
    border: 1px solid #333 !important;
    color: black !important;
    background: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .skill-tag.secondary {
    background: #f0f0f0 !important;
  }

  .section-title::after {
    background: black !important;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.hero, .section {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.hero {
  animation-delay: 0.1s;
}

.section:nth-child(2) {
  animation-delay: 0.2s;
}

.section:nth-child(3) {
  animation-delay: 0.3s;
}

.section:nth-child(4) {
  animation-delay: 0.4s;
}

.section:nth-child(5) {
  animation-delay: 0.5s;
}

.section:nth-child(6) {
  animation-delay: 0.6s;
}

.section:nth-child(7) {
  animation-delay: 0.7s;
}

.headshot {
  animation: float 6s ease-in-out infinite;
}
