/* ============================================
   Ellyn — Personal Portfolio
   Palette inspired by cmcrameri: devon, acton, lapaz
   Soft violets, dusty rose, slate blues
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Source+Sans+3:wght@300;400;600;700&display=swap');

:root {
  /* cmcrameri-inspired palette */
  --bg-primary: #f8f5fa;
  --bg-secondary: #f0eaf4;
  --bg-dark: #1e1a2e;
  --text-color: #2d2640;
  --text-muted: #6e6485;
  --accent-color: #8b5a8a;          /* muted violet */
  --accent-hover: #724872;
  --accent-secondary: #4a6a8a;      /* slate blue (lapaz) */
  --accent-secondary-light: #6a8aaa;
  --accent-rose: #c48a9f;           /* dusty rose (acton) */
  --accent-rose-light: #daa8b8;
  --warm-sand: #e0d4ea;
  --warm-highlight: #f0e6f5;
  --glass-bg: rgba(248, 245, 250, 0.88);
  --glass-border: rgba(139, 90, 138, 0.12);
  --card-shadow: 0 8px 32px rgba(45, 38, 64, 0.07);
  --card-shadow-hover: 0 16px 48px rgba(45, 38, 64, 0.13);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-color);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text-color);
}

::selection {
  background: var(--accent-color);
  color: white;
}

/* ============================================
   BACKGROUND DECORATION — Soft gradient blobs
   ============================================ */
.bg-icons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.045;
  filter: blur(80px);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  height: 70px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent-color);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links li {
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links li:hover {
  color: var(--accent-color);
  background: rgba(139, 90, 138, 0.06);
}

.nav-links li.active {
  color: var(--accent-color);
  background: rgba(139, 90, 138, 0.1);
}

.nav-links li.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-rose));
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--accent-color);
}

/* ============================================
   CONTENT CONTAINER
   ============================================ */
.content-container {
  position: relative;
  z-index: 1;
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active-tab {
  display: block;
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 100px 80px 80px;
  min-height: calc(100vh - 70px);
}

.hero-content {
  max-width: 560px;
}

.hero-content h1 {
  font-size: 3.6rem;
  margin-bottom: 12px;
  color: var(--text-color);
  line-height: 1.1;
}

.hero-content .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 300;
  line-height: 1.6;
}

.hero-icon {
  max-width: 350px;
  flex-shrink: 0;
  position: relative;
}

.hero-icon .hero-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--accent-secondary) 0%, var(--accent-color) 50%, var(--accent-rose) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  color: rgba(255,255,255,0.3);
  box-shadow: 0 20px 50px rgba(139, 90, 138, 0.2);
  border: 4px solid white;
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(139, 90, 138, 0.2);
  border: 4px solid white;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-rose));
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139, 90, 138, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 90, 138, 0.4);
  filter: brightness(1.05);
}

.btn-secondary {
  padding: 14px 28px;
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(139, 90, 138, 0.07);
  transform: translateY(-2px);
}

/* ============================================
   CV SECTION
   ============================================ */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px;
}

.container.wide {
  max-width: 1200px;
}

.pdf-container {
  display: flex;
  justify-content: center;
}

.btn-ads {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
  color: white;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-ads:hover {
  color: white;
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* ============================================
   SIDEBAR LAYOUT (Blog)
   ============================================ */
.research-layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

.research-sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 40px 24px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.research-sidebar h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.research-sidebar ul {
  list-style: none;
}

.research-sidebar ul li {
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.25s ease;
  margin-bottom: 2px;
}

.research-sidebar ul li:hover {
  color: var(--accent-color);
  background: rgba(139, 90, 138, 0.06);
}

.research-sidebar ul li.active-sub {
  color: var(--accent-color);
  background: rgba(139, 90, 138, 0.1);
  font-weight: 600;
}

.sidebar-category-header {
  font-weight: 700 !important;
  color: var(--accent-secondary) !important;
  margin-top: 18px !important;
  font-size: 0.9rem !important;
}

.research-main {
  flex: 1;
  padding: 40px 60px;
  max-width: 900px;
}

.research-main.scrollable-area {
  overflow-y: auto;
  max-height: calc(100vh - 70px);
}

.research-section h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--accent-secondary);
}

.research-section h4 {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.research-section p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   PROJECT CARDS
   ============================================ */
.project-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  display: block;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--card-shadow);
  transition: all 0.4s ease;
  border: 1px solid var(--glass-border);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  color: inherit;
}

.project-card-image {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-color) 50%, var(--accent-rose) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-image i {
  font-size: 3.5rem;
  color: rgba(255,255,255,0.35);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-content {
  padding: 24px;
}

.project-card-content h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-color);
}

.project-card-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.project-tag {
  padding: 4px 12px;
  background: var(--warm-highlight);
  color: var(--accent-color);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================
   BLOG POST CARDS
   ============================================ */
.blog-post {
  margin-top: 50px;
}

.blog-post:first-child {
  margin-top: 0;
}

.blog-post h4 {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 6px;
}

.blog-post .blog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.blog-post .blog-img {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.blog-post .blog-img img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post .blog-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact .social-icons {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 30px;
}

#contact .social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-secondary);
  color: var(--accent-color);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
}

#contact .social-icons a:hover {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-rose));
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(139, 90, 138, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    padding: 60px 30px;
    gap: 40px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-icon {
    max-width: 220px;
  }

  .cta-buttons {
    justify-content: center;
  }

  .navbar {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .research-layout {
    flex-direction: column;
  }

  .research-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .research-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .research-main {
    padding: 30px 20px;
    max-height: none;
    overflow-y: visible;
  }

  .project-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .subtitle {
    font-size: 1.05rem;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.scrollable-area::-webkit-scrollbar {
  width: 6px;
}

.scrollable-area::-webkit-scrollbar-track {
  background: transparent;
}

.scrollable-area::-webkit-scrollbar-thumb {
  background: var(--warm-sand);
  border-radius: 3px;
}

.scrollable-area::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ============================================
   UTILITY
   ============================================ */
.text-accent { color: var(--accent-color); }
.text-blue   { color: var(--accent-secondary); }
.text-rose   { color: var(--accent-rose); }
.mt-60 { margin-top: 60px; }
