/* Modern Design System - 2025 Bold Minimalism */

:root {
  /* Color Palette - Blue & White Theme */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-text-primary: #1a202c;
  /* Dark Blue-Grey for high contrast */
  --color-text-secondary: #4a5568;
  --color-accent-primary: #0056b3;
  /* Strong Accessible Blue */
  --color-accent-hover: #004494;
  --color-accent-light: #e6f0ff;
  --color-border: #e2e8f0;

  /* Typography */
  --font-sans: 'Lato', 'Segoe UI', Helvetica, Arial, sans-serif;
  /* Body font */
  --font-heading: 'Outfit', sans-serif;
  /* Heading font (Google Sans alternative) */
  --font-mono: 'Fira Code', monospace;

  /* Spacing - 8pt Grid System */
  --space-xs: 0.5rem;
  /* 8px */
  --space-sm: 1rem;
  /* 16px */
  --space-md: 1.5rem;
  /* 24px */
  --space-lg: 2rem;
  /* 32px */
  --space-xl: 3rem;
  /* 48px */
  --space-2xl: 5rem;
  /* 80px */

  /* Layout */
  --container-width: 1200px;
  --sidebar-width: 300px;

  /* Accessibility */
  --focus-ring: 3px solid var(--color-accent-light);
  --focus-ring-offset: 2px;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  /* Base 16px */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.7;
  /* Improved line height for readability */
  font-size: 1.125rem;
  /* 18px */
  letter-spacing: 0.01em;
  /* Slight letter spacing for professional feel */
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: var(--color-accent-primary) solid 3px;
  outline-offset: 2px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  /* Tighter headings */
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.5rem;
  color: var(--color-accent-primary);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  max-width: 100%;
  /* Allow text to fill container */
}

a {
  color: var(--color-accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

/* Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

@media (min-width: 992px) {
  .app-container {
    flex-direction: row;
  }
}

/* Section Spacing - Consistent vertical rhythm */
section {
  margin-bottom: var(--space-2xl);
  /* 80px between major sections */
}

section:last-child {
  margin-bottom: var(--space-xl);
  /* Reduced bottom margin for last section */
}

section h2 {
  margin-bottom: var(--space-md);
  /* 24px after section headings */
  margin-top: 0;
}

section>p {
  margin-bottom: var(--space-lg);
  /* 32px after intro paragraphs */
}

/* Horizontal rules between sections */
hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
  /* 48px vertical spacing around dividers */
}

/* Sidebar & Navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--color-accent-primary);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  z-index: 1000;
}

.navbar-brand {
  display: block;
  text-align: center;
  margin-bottom: var(--space-lg);
  text-decoration: none;
}

.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

.desktop-brand-img {
  display: block;
}

.mobile-brand-text {
  display: none;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
}

@media (min-width: 992px) {
  .sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    flex-shrink: 0;
  }
}

.nav-link {
  display: block;
  font-family: var(--font-heading);
  /* Use brand font for nav */
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
  /* 24px left padding for better balance */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s, transform 0.2s;
}

.nav-link:hover,
.nav-link:focus {
  color: white;
  transform: translateX(5px);
  text-decoration: none;
}

.nav-link.active {
  color: white;
  font-weight: 800;
}



/* Main Content */
.main-content {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  max-width: 100%;
}

@media (min-width: 992px) {
  .main-content {
    padding: var(--space-2xl);
    margin-left: var(--sidebar-width);
    /* Fix: Push content to right of fixed sidebar */
    width: calc(100% - var(--sidebar-width));
    /* Ensure content doesn't overflow */
  }
}

section {
  margin-bottom: var(--space-2xl);
  scroll-margin-top: var(--space-2xl);
  /* For sticky header offset if needed */
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  /* Brand font for buttons */
  background-color: var(--color-accent-primary);
  color: white;
  border-radius: 6px;
  /* Sharper, more professional radius */
  font-weight: 600;
  border: 1px solid transparent;
  /* Cleaner border */
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

/* GitHub button specific styling */
.btn-github {
  background-color: #24292e;
  color: white;
  border-radius: 12px;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-github:hover {
  background-color: #1a1e22;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: white;
}

.btn:hover {
  background-color: var(--color-accent-hover);
  color: white !important;
  /* Force white text */
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-sm);
  list-style: none;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-sm);
  background: var(--color-bg-secondary);
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.skill-item:hover {
  transform: translateY(-5px);
  background: white;
  border-color: var(--color-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-xs);
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.skill-item:hover .skill-icon {
  color: var(--color-accent-primary);
}

img.skill-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.8);
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.skill-item:hover img.skill-icon {
  filter: grayscale(0%) opacity(1);
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1600px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

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

.project-img-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--color-bg-secondary);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  list-style: none;
  margin-top: var(--space-sm);
  padding-left: 0;
}

/* Tag styling - Arrow shape */
/* Tag styling - Arrow shape */
.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: auto;
  /* Allow growth */
  min-height: 40px;
  padding: 8px 32px !important;
  background-color: #f1f3f5;
  color: #495057;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px 0 0 6px;
  margin-right: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: normal;
  /* Allow wrapping */
  flex-shrink: 0;
  /* Prevent shrinking */
  max-width: 100%;
  /* Prevent overflow */
  line-height: 1.4;

  /* The Arrow Shape using Clip-Path - Deeper arrow */
  clip-path: polygon(0 0,
      calc(100% - 15px) 0,
      100% 50%,
      calc(100% - 15px) 100%,
      0 100%);
}

/* The Hole (Left Side) */
.tag::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 15px;
  /* Moved further right */
  transform: translateY(-50%);
  width: 10px;
  /* Larger hole */
  height: 10px;
  background-color: white;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* Remove the old ::after arrow */
.tag::after {
  display: none;
}

/* Hover State */
.tag:hover {
  background-color: var(--color-accent-primary);
  /* Blue */
  color: white;
  text-decoration: none;
}

/* Timeline Entries (Education, Experience, Leadership) */
.timeline-entry {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.timeline-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-logo {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.timeline-content {
  flex: 1;
}

.timeline-content h3 {
  margin-bottom: var(--space-xs);
}

.timeline-content p {
  margin-bottom: var(--space-sm);
  /* Consistent paragraph spacing */
}

.timeline-content ul {
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

.timeline-content li {
  margin-bottom: var(--space-xs);
  /* Space between list items */
}

.timeline-content li:last-child {
  margin-bottom: 0;
}

/* List styling - standard bullet alignment */
ul {
  list-style-type: disc;
  padding-left: 2.5rem;
  /* Standard 40px indent for bullets */
  margin-bottom: var(--space-md);
}

ol {
  list-style-type: decimal;
  padding-left: 2.5rem;
  /* Standard 40px indent for numbers */
  margin-bottom: var(--space-md);
}

li {
  padding-left: 0.5rem;
  /* 8px space between bullet and text */
  margin-bottom: var(--space-xs);
}

.subheading {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.text-secondary {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

@media (max-width: 767px) {
  .timeline-entry {
    flex-direction: column;
    gap: var(--space-md);
  }

  .timeline-logo {
    width: 80px;
    height: 80px;
  }
}

/* Timeline Entry with Logo on Right */
.timeline-entry-reverse {
  display: flex;
  flex-direction: row-reverse;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.timeline-entry-reverse:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 767px) {
  .timeline-entry-reverse {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* Text-only Project Cards (for Projects page) */
.project-card-text-only {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-lg);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Grid layout is handled by parent .projects-grid */
}

.project-card-text-only:hover {
  box-shadow: 0 10px 30px -3px rgba(0, 0, 0, 0.15);
  border-color: var(--color-accent-primary);
  transform: translateY(-5px);
}

.project-card-text-only h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
}

.project-card-text-only p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-sm);
}

.project-card-text-only .tag-list {
  margin-bottom: var(--space-md);
}

.project-card-text-only .card-actions {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: auto;
}

/* Inline text links (for 'See more') */
.inline-link {
  color: var(--color-accent-primary);
  text-decoration: none;
  font-weight: 400;
  /* Normal weight, not bold */
  font-style: italic;
  transition: color 0.2s ease;
  white-space: nowrap;
  /* Keep on same line */
  align-self: flex-end;
}

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

/* Make paragraphs with inline links align text to justify */


.tag {
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin-top: var(--space-md);
}

.social-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-secondary);
  /* Light background initially */
  color: var(--color-text-secondary);
  /* Dark icon initially */
  border-radius: 50%;
  font-size: 1.5rem;
  transition: all 0.2s ease;
  border: 1px solid var(--color-border);
}

.social-ico.btn:hover,
.btn:focus {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

/* Icon-only buttons - match social icon style */
.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background-color: var(--color-accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
}

.btn-icon i {
  margin: 0;
}

/* Pill-shaped buttons (Icon + Text) matching icon style */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border-radius: 50px;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
  text-decoration: none;
  font-weight: 600;
}

.btn-pill:hover {
  background-color: var(--color-accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
  text-decoration: none;
}

.btn-pill i {
  font-size: 1.2rem;
}

a {
  border-color: var(--color-accent-primary);
  text-decoration: none;
}

.social-icon:hover {
  background-color: var(--color-accent-primary);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent-primary);
  text-decoration: none;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-md);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item+.breadcrumb-item::before {
  content: "/";
  padding: 0 var(--space-xs);
  color: var(--color-text-secondary);
}

.breadcrumb-item.active {
  color: var(--color-text-secondary);
}

.breadcrumb-item a {
  color: var(--color-accent-primary);
  text-decoration: none;
  font-weight: 500;
}

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

/* Responsive Design Overrides */

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  background: var(--color-accent-primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    align-items: center;
    /* Center items in mobile menu */
  }

  .sidebar.active {
    transform: translateX(0);
  }

  /* Overlay when menu is open */
  .sidebar.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 250px;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Mobile Layout Adjustments */
@media (max-width: 991px) {
  .mobile-brand-text {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
  }

  .desktop-brand-img {
    display: block;
    /* Show image on mobile too if desired, or keep hidden */
    margin-bottom: 1rem;
  }

  .profile-img {
    width: 100px;
    /* Smaller on mobile */
    height: 100px;
    border-width: 2px;
  }

  .mobile-nav-toggle {
    display: block;
  }


  /* Typography */
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .main-content {
    padding: var(--space-md) var(--space-sm);
  }

  section {
    min-height: auto;
    padding-top: var(--space-xl);
    margin-bottom: var(--space-xl);
  }

  /* Card Stacking */
  .project-card {
    flex-direction: column;
    align-items: stretch;
  }

  .project-img-container {
    margin-right: 0;
    margin-bottom: var(--space-sm);
    max-width: 100%;
  }

  .project-img {
    height: auto;
    max-height: 250px;
    /* Limit height on mobile */
    object-fit: cover;
  }

  /* Social Icons */
  .social-icons {
    justify-content: center;
  }

  /* Project Detail Pages - Stack columns on mobile */
  .resume-section [style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-lg) !important;
  }

  /* Ensure media column content is centered and properly sized */
  .resume-section [style*="flex-direction: column"] {
    align-items: stretch !important;
    width: 100% !important;
  }

  /* GitHub button should be full width on mobile */
  .btn-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* YouTube iframe responsive sizing */
  .resume-section iframe {
    width: 100% !important;
    height: 250px !important;
    max-width: 100%;
  }
}