:root {
  /* Colors */
  --bg-sidebar: #1e293b; /* Dark Slate */
  --bg-main: #f8fafc;    /* Very Light Grey */
  --bg-card: #ffffff;
  --accent: #0ea5e9;     /* Sky Blue */
  --accent-hover: #0284c7;
  --text-sidebar-main: #f1f5f9;
  --text-sidebar-sub: #94a3b8;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --border: #e2e8f0;
  
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, sans-serif;
  background: var(--bg-sidebar); /* Fallback */
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden; /* Prevent body scroll */
}

/* Layout Shell */
.app-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  background: var(--bg-sidebar);
  color: var(--text-sidebar-main);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255,255,255,0.1);
  z-index: 10;
}

.profile-section {
  text-align: center;
}

.profile-image-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

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

.name {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 5px;
}

.title {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-sidebar-sub);
  margin-bottom: 30px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.contact-link {
  color: var(--text-sidebar-sub);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  padding: 8px;
  border-radius: 6px;
}

.contact-link:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* Navigation */
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-sidebar-sub);
  padding: 15px 20px;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 12px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-btn:hover {
  color: white;
  background: rgba(255,255,255,0.05);
  transform: translateX(5px);
}

.nav-btn.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.sidebar-footer {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.2);
  margin-top: 20px;
}

/* Main Content Area */
.content-area {
  background: var(--bg-main);
  position: relative;
  overflow: hidden; /* Inner content scrolls, not this container */
}

.tab-pane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  flex-direction: column;
}

.tab-pane.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 5;
}

.pane-header {
  padding: 40px 40px 20px;
  background: var(--bg-main);
  z-index: 10;
}

.pane-header h2 {
  font-size: 2.5rem;
  margin: 0;
  color: var(--text-primary);
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  padding-bottom: 5px;
}

.pane-content.scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px 60px; /* Bottom padding for space */
  /* Hide Scrollbar mostly */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.pane-content::-webkit-scrollbar {
  width: 6px;
}
.pane-content::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

/* Home / About Styles */
.hero-text {
  margin-bottom: 50px;
  max-width: 800px;
}

.lead {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.info-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  border: 1px solid var(--border);
}

.info-card:hover {
  transform: translateY(-5px);
}

.info-card h3 {
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}

.career-goals {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 30px;
  border-radius: 16px;
  border-left: 5px solid var(--accent);
}

.career-goals ul {
  list-style: none;
  padding: 0;
}
.career-goals li {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* Projects Grid */
.projects-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-tile {
  background: white;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.project-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.15);
  transform: translateY(-3px);
}

.project-tile .tile-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.badge-sm {
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.year {
  font-size: 0.85rem;
  color: #94a3b8;
}

.project-tile h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.project-tile p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

/* Skills Dashboard */
.skills-dashboard {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.skill-group {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.skill-group h3 {
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.progress-bar-wrapper {
  margin-bottom: 15px;
}

.progress-bar-wrapper .label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-weight: 500;
}

.progress {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tags span {
  background: #f1f5f9;
  color: #475569;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 600px;
  z-index: 101;
  pointer-events: none; /* Events passed when active */
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: none; /* Hidden by default */
  position: relative;
  pointer-events: auto;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content.active {
  display: block;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #94a3b8;
}

.close-btn:hover { color: var(--text-primary); }

.modal-meta {
  margin: 10px 0 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-meta .badge {
  background: var(--accent);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.result {
  margin-top: 20px;
  padding: 15px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
  }

  .sidebar {
    flex-direction: row;
    padding: 15px;
    height: auto;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-right: none;
  }

  .profile-image-container, .subtitle, .contact-info, .sidebar-footer, .title {
    display: none; /* Hide extra details on mobile to save space */
  }
  
  .profile-section { margin: 0; text-align: left; }
  .name { font-size: 1.2rem; margin: 0; color: white; }

  .main-nav {
    flex-direction: row;
    flex: 0;
    gap: 5px;
  }

  .nav-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .nav-btn span { display: none; } /* Hide text, show icons only if space tight, or keep text if enough */
  
  .pane-header { padding: 20px; }
  .pane-header h2 { font-size: 1.8rem; }
  .pane-content.scrollable { padding: 20px; padding-bottom: 100px; } /* Extra padding for safe area */
}
