/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #fcfcfc;
  --surface-color: #ffffff;
  --text-primary: #222222;
  --text-secondary: #555555;
  --accent-color: #d26428; /* Rust/Orange accent from CV */
  --border-color: #e0e0e0;
  --sidebar-width: 320px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --surface-color: #1a1a1a;
    --text-primary: #ededed;
    --text-secondary: #a0a0a0;
    --accent-color: #e88753; /* Lighter rust/orange for dark mode */
    --border-color: #333333;
  }
}

/* Explicit theme choice (via toggle) overrides system preference above */
:root[data-theme="dark"] {
  --bg-color: #121212;
  --surface-color: #1a1a1a;
  --text-primary: #ededed;
  --text-secondary: #a0a0a0;
  --accent-color: #e88753;
  --border-color: #333333;
}

:root[data-theme="light"] {
  --bg-color: #fcfcfc;
  --surface-color: #ffffff;
  --text-primary: #222222;
  --text-secondary: #555555;
  --accent-color: #d26428;
  --border-color: #e0e0e0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  cursor: pointer;
  margin-bottom: 1.5rem;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--accent-color);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--accent-color);
}

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.layout-wrapper {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background-color: var(--surface-color);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--surface-color);
  border-right: 1px solid var(--border-color);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.profile-img-container {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 4px solid var(--surface-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.profile-img-container:hover {
  transform: scale(1.05);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: left;
}

.sidebar h2 {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 2rem;
  text-align: left;
}

/* Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  gap: 0.5rem;
}

.nav-link {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-align: left;
}

.nav-link:hover {
  color: var(--accent-color);
  background-color: rgba(210, 100, 40, 0.05);
  text-shadow: none;
}

/* Projects */
.project-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: var(--surface-color);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.project-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: contain;
  background-color: white;
  padding: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.project-content {
  flex: 1;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-title a {
  color: var(--text-primary);
}

.project-title a:hover {
  color: var(--accent-color);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-item svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--accent-color);
  flex-shrink: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 4rem 5rem;
  overflow-y: auto;
}

section {
  margin-bottom: 3rem;
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

section:nth-child(1) { 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; }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
  margin-left: 1rem;
}

.profile-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: justify;
}

/* Skills */
.skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skills-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.skill-category {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 180px;
}

.skill-items {
  color: var(--text-secondary);
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2rem;
  border-left: 2px solid var(--border-color);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-color);
  box-shadow: 0 0 0 4px var(--surface-color);
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-desc ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Publications */
.pub-list {
  list-style-type: decimal;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-list li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pub-list b {
  color: var(--text-primary);
}

.pub-journal {
  font-style: italic;
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 900px) {
  .layout-wrapper {
    flex-direction: column;
    box-shadow: none;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 2rem;
  }
  
  .main-content {
    padding: 2rem;
  }
}
