/* ============================================
   CSS CUSTOM PROPERTIES (Theme Variables)
   ============================================ */

:root {
  --header-height: 120px;
  --nav-height: 60px;
  --max-width: 1200px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* Orange Theme - Vibrant Warm Orange */
[data-theme="orange"] {
  --accent: #E8562F;
  --accent-hover: #D94520;
  --bg: #FAF7F5;
  --bg-alt: #FFFFFF;
  --card-bg: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #5A5A5A;
  --border: #E0D5D0;
  --shadow: rgba(232, 86, 47, 0.15);
  --shadow-hover: rgba(232, 86, 47, 0.3);
  --timeline-line: #D9C5BE;
  --timeline-dot: #E8562F;
  --timeline-dot-inactive: #D9C5BE;
}

/* Blue Theme - Electric Navy & Bright Blue */
[data-theme="blue"] {
  --accent: #2B7DE9;
  --accent-hover: #1E5FCC;
  --bg: #EDF3FB;
  --bg-alt: #FFFFFF;
  --card-bg: #FFFFFF;
  --text: #0A1929;
  --text-muted: #4A5B73;
  --border: #C5D9F2;
  --shadow: rgba(43, 125, 233, 0.2);
  --shadow-hover: rgba(43, 125, 233, 0.35);
  --timeline-line: #B8D4F1;
  --timeline-dot: #2B7DE9;
  --timeline-dot-inactive: #B8D4F1;
}

/* Mono Theme - High Contrast Black & White */
[data-theme="mono"] {
  --accent: #000000;
  --accent-hover: #2A2A2A;
  --bg: #F8F8F8;
  --bg-alt: #FFFFFF;
  --card-bg: #FFFFFF;
  --text: #000000;
  --text-muted: #4A4A4A;
  --border: #D0D0D0;
  --shadow: rgba(0, 0, 0, 0.12);
  --shadow-hover: rgba(0, 0, 0, 0.25);
  --timeline-line: #C0C0C0;
  --timeline-dot: #000000;
  --timeline-dot-inactive: #C0C0C0;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   HEADER
   ============================================ */

#main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--card-bg);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 4px 12px var(--shadow);
  padding: var(--spacing-lg) 0;
  transition: transform 0.3s ease;
}

#main-header.header-hidden {
  transform: translateY(-100%);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-lg);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex: 1;
  min-width: 0;
}

#profile-picture-container {
  flex-shrink: 0;
}

.profile-picture {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 6px 16px var(--shadow-hover);
}

.header-info {
  flex: 1;
  min-width: 0;
}

#header-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#header-headline {
  font-size: 1rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--spacing-md);
  background: linear-gradient(135deg, transparent, var(--bg-alt));
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 22px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 8px var(--shadow);
}

.language-toggle:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

#social-buttons,
#footer-social-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.social-button:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px var(--shadow-hover);
}

.social-button svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* ============================================
   SECTION NAVIGATION
   ============================================ */

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.content-section {
  margin-bottom: var(--spacing-xl);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.section-content {
  max-width: 900px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  color: var(--text);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

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

/* ============================================
   ABOUT SECTION
   ============================================ */

#about-summary {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: var(--spacing-lg);
  white-space: pre-wrap;
}

#about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-md);
  background: linear-gradient(135deg, var(--card-bg), var(--bg-alt));
  border: 2px solid var(--accent);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px var(--shadow);
}

.chip svg {
  width: 16px;
  height: 16px;
  margin-right: var(--spacing-xs);
  fill: var(--accent);
}

/* ============================================
   TIMELINE (Experience & Education)
   ============================================ */

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

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--timeline-line), var(--accent));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px var(--shadow);
  transition: var(--transition);
  opacity: 0.6;
  border: 1px solid var(--border);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -42px;
  top: var(--spacing-lg);
  width: 16px;
  height: 16px;
  background-color: var(--timeline-dot-inactive);
  border: 3px solid var(--card-bg);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 0 0 2px var(--timeline-dot-inactive);
  z-index: 2;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -26px;
  top: calc(var(--spacing-lg) + 8px);
  width: 32px;
  height: 2px;
  background: linear-gradient(to right, var(--timeline-dot-inactive), transparent);
  opacity: 0.3;
  transition: var(--transition);
}

.timeline-item.active {
  opacity: 1;
  transform: translateX(4px);
  box-shadow: 0 8px 24px var(--shadow-hover), -6px 0 20px var(--shadow);
  border-color: var(--accent);
}

.timeline-item.active::before {
  background-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent), 0 0 16px var(--accent);
  animation: pulse 2s infinite;
  transform: scale(1.15);
}

.timeline-item.active::after {
  background: linear-gradient(to right, var(--accent), transparent);
  opacity: 0.8;
  width: 40px;
  height: 3px;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 5px var(--accent), 0 0 16px var(--accent);
  }
  50% {
    box-shadow: 0 0 0 8px var(--accent), 0 0 24px var(--accent);
  }
}

.timeline-item:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px var(--shadow-hover);
  border-color: var(--accent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
}

.timeline-title {
  flex: 1;
  min-width: 200px;
}

.timeline-company,
.timeline-school {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.timeline-position,
.timeline-degree {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-location {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

.timeline-location svg {
  width: 14px;
  height: 14px;
  fill: var(--text-muted);
}

.timeline-description {
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: var(--spacing-xl) var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

#footer-social-buttons {
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

#footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   ERROR MESSAGE
   ============================================ */

.error-message {
  padding: var(--spacing-lg);
  background-color: #FEE;
  border: 1px solid #FCC;
  border-radius: var(--border-radius);
  color: #C00;
  margin: var(--spacing-md) 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  :root {
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-left {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }

  .header-info {
    width: 100%;
  }

  #header-name {
    font-size: 1.5rem;
    white-space: normal;
  }

  #header-headline {
    white-space: normal;
  }

  .header-right {
    width: 100%;
    justify-content: center;
  }

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

  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-item::before {
    left: -32px;
    width: 12px;
    height: 12px;
  }

  .timeline-header {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .timeline-company,
  .timeline-school {
    font-size: 1.1rem;
  }

  .timeline-position,
  .timeline-degree {
    font-size: 0.95rem;
  }

  #about-summary {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .social-button {
    width: 40px;
    height: 40px;
  }

  .social-button svg {
    width: 18px;
    height: 18px;
  }

  main {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .timeline-item {
    padding: var(--spacing-md);
  }
}
