/* Modern Portfolio Enhancements */

/* Prevent text selection */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection in code blocks and inputs for usability */
code, pre, input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --border-radius: 0.75rem;
}

/* Homepage Content Styling */
.homepage-content {
  margin: var(--spacing-xl) 0;
}

.homepage-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  max-width: 65ch;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.homepage-content p:first-child {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Header Improvements - Hidden */
header {
  display: none;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

header .main a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: none;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  text-decoration: none;
}

header .main a:hover {
  color: var(--primary-color);
  filter: none;
}

header nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

header nav a {
  color: var(--text-secondary);
  border-bottom: none;
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  position: relative;
}

header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.2s ease;
}

header nav a:hover {
  color: var(--primary-color);
  filter: none;
}

header nav a:hover::after {
  width: 100%;
}

header nav span {
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

header nav span:hover {
  color: var(--primary-color);
}

/* Footer Improvements */
footer {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-xl);
  border-top: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

footer .soc {
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: transparent;
  text-decoration: none;
}

footer .soc:hover {
  color: var(--primary-color);
  background: var(--bg-light);
  transform: translateY(-2px);
  filter: none;
}

.footer-info {
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0;
  margin-top: var(--spacing-xs);
}

footer .border {
  display: none;
}

/* Content Width Improvements */
.content {
  max-width: 900px;
  padding: var(--spacing-xl) var(--spacing-md);
  margin: 0 auto;
}

/* List Items (Posts) Improvements */
.list-item {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--border-color);
  transition: padding 0.2s ease;
}

.list-item:hover {
  padding-left: var(--spacing-sm);
}

.list-item .title a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: none;
  transition: color 0.2s ease;
}

.list-item .title a:hover {
  color: var(--primary-color);
  filter: none;
}

.list-item .readmore {
  color: var(--primary-color);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.list-item .readmore:hover {
  border-bottom-color: var(--primary-color);
  filter: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .homepage-content p {
    font-size: 1rem;
  }

  .homepage-content p:first-child {
    font-size: 1.125rem;
  }

  header nav {
    margin-top: var(--spacing-sm);
  }

  header nav a {
    margin-left: 0;
    margin-right: var(--spacing-md);
  }

  .content {
    padding: 0 var(--spacing-sm);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Link Improvements */
a {
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--primary-color);
  filter: none;
}

/* Typography Improvements */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Section Spacing */
section {
  margin-bottom: var(--spacing-lg);
}

/* Posts List Page Styling */
.posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.posts li {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
  transition: padding 0.2s ease;
}

.posts li:hover {
  padding-left: var(--spacing-sm);
}

.posts li a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: none;
  transition: color 0.2s ease;
  text-decoration: none;
}

.posts li a:hover {
  color: var(--primary-color);
  filter: none;
}

.posts li .meta {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
}

.page-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-lg) 0;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.page-title::before {
  display: none;
}

/* Additional Refinements */
body {
  margin: 0;
  padding: 0;
}

/* Improve code blocks appearance */
pre {
  border-radius: var(--border-radius);
  overflow-x: auto;
}

code {
  border-radius: 4px;
}

/* Better image handling */
img {
  border-radius: var(--border-radius);
}

/* Improve list styling */
ul, ol {
  padding-left: 1.5rem;
}

ul > li::before {
  color: var(--primary-color);
}

/* Better blockquote styling */
blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--spacing-md);
  margin: var(--spacing-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Improve table styling */
table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin: var(--spacing-md) 0;
}

table th {
  background-color: var(--bg-light);
  font-weight: 600;
}

table tr:hover {
  background-color: var(--bg-light);
}

/* Link styling improvements for homepage */
.homepage-content a {
  color: var(--primary-color);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.homepage-content a:hover {
  border-bottom-color: var(--primary-color);
}

/* Company links with inline logos */
.company-link {
  display: inline;
  text-decoration: none;
  color: var(--primary-color);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  font-weight: 500;
  line-height: inherit;
  vertical-align: baseline;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.company-link:hover {
  border-bottom-color: var(--primary-color);
  opacity: 0.8;
}

.company-logo {
  width: 1em;
  height: 1em;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.25rem;
  margin-left: 0;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  padding: 0;
}

