/*
  styles.css

  Description:
  This stylesheet defines the visual appearance for kavinrajasekaran.dev.
  It includes definitions for light and dark modes, typography, layout,
  and component-specific styles for all pages on the site.

  Table of Contents:
  1. Font Imports
  2. CSS Variables (Light & Dark Modes)
  3. Base & Typography Styles
  4. Layout & Container
  5. Header & Navigation
  6. Hero Section
  7. Common Section Styles
  8. Experience & Education Sections
  9. Projects Section
  10. Publications Page
  11. Blog Page
  12. Footer
  13. Responsive Design
*/

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

/* 2. CSS Variables */

/* Light Mode (Default) */
:root {
  --bg-color: #f8f9fa;
  --bg-secondary-color: #ffffff;
  --text-color: #212529;
  --text-secondary: #6c757d;
  --accent-color: #0d6efd;
  --accent-color-hover: #0b5ed7;
  --border-color: #dee2e6;
  --card-bg: #ffffff;
  --hover-bg: #f1f3f5;
  --shadow-color: rgba(0, 0, 0, 0.05);

  --status-current: #0d6efd;
  --status-future: #6f42c1;
  --status-completed: #198754;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --bg-secondary-color: #1c1c1c;
    --text-color: #e9ecef;
    --text-secondary: #adb5bd;
    --accent-color: #0d6efd;
    --accent-color-hover: #3c87fd;
    --border-color: #343a40;
    --card-bg: #1c1c1c;
    --hover-bg: #2d2d2d;
    --shadow-color: rgba(0, 0, 0, 0.2);

    --status-current: #0d6efd;
    --status-future: #8a63d2;
    --status-completed: #20c997;
  }
}

/* 3. Base & Typography Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

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

/* 4. Layout & Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* 5. Header & Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo a {
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo a:hover {
  text-decoration: none;
}

.profile-pic-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover {
    color: var(--text-color);
    text-decoration: none;
}

nav a.active {
  color: var(--text-color);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-color);
}

/* 6. Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.bio {
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.bio p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-color);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
  background-color: var(--hover-bg);
  text-decoration: none;
  transform: translateY(-2px);
}

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

/* 7. Common Section Styles */
section {
    margin-bottom: 4rem;
}

/* 8. Experience and Education Sections */
.experience, .education {
  margin-bottom: 3rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.experience-list, .education-list {
  list-style: none;
  border-left: 2px solid var(--border-color);
  padding-left: 1.5rem;
}

.experience-item, .education-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s ease;
}

.experience-item:hover, .education-item:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
}

.experience-item::before, .education-item::before {
    content: '';
    position: absolute;
    left: -1.95rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 2px solid var(--bg-color);
}

.experience-item-header, .education-item-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.company-logo, .university-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 4px;
  border: 1px solid var(--border-color);
}

/* Hide toggle icon, description is always visible */
.experience-item .toggle-icon, .education-item .toggle-icon {
  display: none;
}

.status-indicator {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-current {
  background-color: var(--status-current);
}

.status-future {
  background-color: var(--status-future);
}

.status-completed {
  background-color: var(--status-completed);
}

.status-past {
  display: none;
}

.experience-item h3, .education-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  margin-right: 0.5rem;
}

.position-wrapper, .degree-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.position-wrapper::before {
  content: "|";
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.position, .degree {
  font-weight: 500;
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
}

.duration-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.duration {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  margin-left: 0; /* Reset margin */
  display: block; /* Always display */
}

/* 9. Projects Section */
.projects {
  margin-bottom: 3rem;
}

.view-more {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-weight: 500;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--shadow-color);
}

.project-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  background-size: cover;
  background-position: center;
}

.project-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.project-type {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background-color: var(--accent-color);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.project-tech img {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.project-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: auto;
}

/* 10. Publications Page */
.publication-item {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s ease;
}

.publication-item:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
}

.publication-item h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.publication-authors {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.publication-venue {
  color: var(--text-color);
  font-style: italic;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.publication-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--status-completed);
  color: white;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.publication-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.publication-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.publication-link {
  padding: 0.5rem 1rem;
  background-color: var(--accent-color);
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.publication-link:hover {
  background-color: var(--accent-color-hover);
  text-decoration: none;
}

.publication-link-placeholder {
  padding: 0.5rem 1rem;
  background-color: var(--text-secondary);
  color: var(--bg-color);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.6;
}

.publications-placeholder {
  margin-top: 2rem;
}

.publications-placeholder h2 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  margin-top: 2rem;
  font-size: 1.25rem;
}

.placeholder-text {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.research-interests {
    margin-top: 4rem;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.interest-item {
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.interest-item h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.interest-item p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}


/* 11. Blog Page */
.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-post {
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  transition: box-shadow 0.2s ease;
}

.blog-post:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
}

.blog-post h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.blog-post h2 a {
  color: var(--text-color);
}

.post-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

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

.read-more {
  font-size: 0.9rem;
  font-weight: 600;
}

/* 12. Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 13. Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  header {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Remove unused styles */
.discord-card, .gems-grid, .gem-card, .blog-post-full, .post-header, .post-content, .post-footer, .back-to-blog, .publication-link-placeholder, .publications-placeholder, .placeholder-text {
    display: none;
} 