/* ==========================================================================
   CSS Variables for Theme Colors
   ========================================================================== */

:root {
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --accent-primary: #e91e63;
  --accent-hover: #c2185b;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --navbar-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e4e4e4;
    --text-muted: #a0a0a0;
    --border-color: #404040;
    --accent-primary: #ff4081;
    --accent-hover: #ff6090;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --navbar-bg: #1a1a1a;
  }
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
  margin-bottom: 30px;
  font-family: 'Work Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

@media (min-width: 768px) {
  body {
    margin-bottom: 60px;
  }
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.navbar-brand {
  font-family: 'Faculty Glyphic', sans-serif;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
  padding-left: 15% !important;
  padding-right: 15% !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  background-color: var(--navbar-bg);
  transition: background-color 0.3s ease;
}

.navbar-brand {
  margin-top: 0;
  color: var(--text-primary);
}

.navbar-nav {
  margin-top: 0;
}

.navbar-brand .h4 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.navbar-brand .text-muted {
  font-size: 0.9rem;
  color: var(--text-muted) !important;
}

/* Mobile responsive navbar */
@media (max-width: 576px) {
  .navbar {
    flex-direction: column !important;
    padding: 0.5rem 1rem !important;
  }

  .navbar-brand {
    margin: 0 !important;
    text-align: center;
    flex-direction: column;
    align-items: center !important;
  }

  .navbar-brand .h4 {
    margin: 0 !important;
    font-size: 1.25rem;
  }

  .navbar-brand .text-muted {
    display: none;
  }

  .navbar-nav {
    margin-top: 0.5rem;
  }

  .nav-link-primary {
    font-size: 0.9rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .navbar {
    padding-left: 5% !important;
    padding-right: 5% !important;
  }

  .navbar-brand .h4 {
    font-size: 1.5rem;
  }

  .navbar-brand .text-muted {
    font-size: 0.85rem;
  }
}

@media (min-width: 769px) {
  .navbar-brand .h4 {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   Layout
   ========================================================================== */

.main-content {
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .main-content {
    margin-top: 2rem;
  }
}

/* Profile image styling */
.profile-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  float: none;
  display: block;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 4px 8px var(--shadow-color);
}

/* Responsive profile image */
@media (min-width: 576px) {
  .profile-image {
    width: 130px;
    height: 130px;
  }
}

@media (min-width: 768px) {
  .profile-image {
    width: 150px;
    height: 150px;
    float: right;
    margin: 0 0 1rem 2rem;
  }
}

@media (min-width: 992px) {
  .profile-image {
    width: 200px;
    height: 200px;
  }
}

/* ==========================================================================
   Typography & Content
   ========================================================================== */

.text-content {
  font-size: 1rem;
  line-height: 1.6;
}

.inline-link {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.inline-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.blog-section h2,
.projects-section h2 {
  font-weight: 600;
  font-size: 1.75rem;
}

.project-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-item {
  transition: all 0.3s ease;
}

.project-item-link:hover .project-item {
  background-color: var(--bg-secondary);
  box-shadow: 0 2px 8px var(--shadow-color);
}

.project-content {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.project-thumbnail {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.project-details {
  flex: 1;
}

.project-title {
  font-weight: 600;
  color: var(--text-primary);
}

.project-link-text {
  color: var(--accent-primary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.project-item-link:hover .project-link-text {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Responsive project layout */
@media (max-width: 576px) {
  .project-content {
    flex-direction: column;
  }

  .project-thumbnail {
    width: 100%;
    height: 180px;
  }
}

/* Responsive Typography */
@media (min-width: 576px) {
  .text-content {
    font-size: 1.1rem;
  }

  .blog-section h2,
  .projects-section h2 {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .text-content {
    font-size: 1.25rem;
  }

  .blog-section h2,
  .projects-section h2 {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   Interactive Elements
   ========================================================================== */

.blog-title {
  cursor: pointer;
  transition: color 0.3s ease;
}

.blog-title:hover {
  color: var(--accent-primary) !important;
}

.blog-post {
  transition: background-color 0.3s ease;
}

.blog-post:hover {
  background-color: var(--bg-secondary);
}

.nav-link-primary {
  color: var(--accent-primary) !important;
  text-decoration: none;
}

.nav-link-primary:hover {
  color: var(--accent-hover) !important;
}

/* ==========================================================================
   Social Links
   ========================================================================== */

.social-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.social-link {
  color: var(--text-primary);
  font-size: 1rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  color: var(--accent-primary);
}

.social-separator {
  color: var(--text-muted);
  user-select: none;
}

@media (min-width: 768px) {
  .social-links {
    justify-content: flex-start;
  }

  .social-link {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-primary-color {
  color: var(--accent-primary);
}

.border-primary {
  border-color: var(--accent-primary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.border {
  border-color: var(--border-color) !important;
}