/*
Theme Name: Fahim V1
Theme URI: https://fahim.dev
Author: Fahim Reza
Description: A minimal personal site for a coder, creator, and entrepreneur
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fahim-v1
*/

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation styling */
.wp-block-navigation {
  font-weight: 500;
}

.wp-block-navigation a {
  transition: color 0.2s ease;
}

.wp-block-site-title a {
  text-decoration: none;
  color: var(--wp--preset--color--foreground);
  transition: opacity 0.2s ease;
  font-weight: 400;
  font-size: 0.9375rem;
}

.wp-block-site-title a:hover {
  opacity: 0.6;
}

/* Hero section - minimal and clean */
.hero-section {
  padding-top: 2.5rem !important;
  padding-bottom: 2.5rem !important;
}

.hero-avatar {
  margin: 0 0 1.5rem 0 !important;
}

.hero-avatar img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
}

.hero-section p {
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 100%;
}

.hero-section p:first-child {
  margin-bottom: 1rem;
  color: var(--wp--preset--color--foreground);
  font-weight: 500;
}

.hero-section p:last-child {
  margin-bottom: 0;
}

/* Now section */
.now-section {
  padding-top: 0;
  padding-bottom: 2.5rem;
}

.now-section h2 {
  margin-bottom: 1.75rem;
  font-weight: 400;
  font-size: 1.125rem;
}

.now-section p {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.now-section a,
.hero-section a {
  color: var(--wp--preset--color--foreground);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.now-section a:hover,
.hero-section a:hover {
  opacity: 0.5;
}

/* Work section - minimal */
.work-section {
  padding-top: 2.5rem !important;
  padding-bottom: 2.5rem !important;
}

.work-section h2 {
  margin-bottom: 1.75rem;
  font-weight: 400;
  font-size: 1.125rem;
}

.work-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--wp--preset--color--surface);
  border-radius: 4px;
  padding: 1rem 1.25rem !important;
  margin-bottom: 0.75rem;
  border: 1px solid var(--wp--preset--color--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.work-item:last-child {
  margin-bottom: 0;
}

.work-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border-color: var(--wp--preset--color--accent);
}

.work-icon {
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.5;
}

.work-item p {
  margin: 0;
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 400;
}

.work-item a {
  color: var(--wp--preset--color--foreground);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.work-item a:hover {
  opacity: 0.6;
}

.work-year {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  color: var(--wp--preset--color--secondary);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 1rem;
  font-weight: 400;
}

/* Posts section */
.posts-section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.posts-section h2 {
  margin-bottom: 1.75rem;
  font-weight: 400;
  font-size: 1.125rem;
}

/* Post cards - lean and simple with white background */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-card {
  background: var(--wp--preset--color--surface);
  border-radius: 4px;
  padding: 1.25rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Post card specific styles - ensure they're not overridden */
.post-card .wp-block-post-title {
  margin-bottom: 0.5rem !important;
  font-weight: 400 !important;
  font-size: 0.9375rem !important;
  line-height: 1.4 !important;
}

.post-card .wp-block-post-title a {
  text-decoration: none !important;
  color: var(--wp--preset--color--foreground) !important;
  transition: opacity 0.2s ease;
}

.post-card .wp-block-post-title a:hover {
  opacity: 0.6;
}

.post-card .post-meta {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wp-block-post-date {
  color: var(--wp--preset--color--secondary);
  font-size: 0.75rem;
  font-weight: 400;
  font-family: var(--wp--preset--font-family--mono);
}

.reading-time-separator {
  color: var(--wp--preset--color--secondary);
  font-size: 0.75rem;
  margin: 0 0.25rem;
  opacity: 0.5;
}

.post-reading-time {
  color: var(--wp--preset--color--secondary);
  font-size: 0.75rem;
  font-weight: 400;
  font-family: var(--wp--preset--font-family--mono);
}

/* Archive and pagination */
.wp-block-query-pagination {
  margin-top: 3rem;
}

.wp-block-query-pagination a {
  text-decoration: none;
  color: var(--wp--preset--color--foreground);
  font-weight: 500;
  transition: color 0.2s ease;
}

.wp-block-query-pagination a:hover {
  color: var(--wp--preset--color--accent);
}

/* Single post content */
.single-post {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.post-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.post-header h1 {
  text-align: center;
  margin-bottom: 1rem;
}

.post-meta-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-reading-time-single {
  color: var(--wp--preset--color--secondary);
  font-size: 0.75rem;
  font-weight: 400;
  font-family: var(--wp--preset--font-family--mono);
}

.wp-block-post-content {
  margin-top: 0;
  text-align: left;
}

.wp-block-post-content p {
  margin-bottom: 1.5rem;
  text-align: left;
}

.wp-block-post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1rem;
  border-left: 3px solid var(--wp--preset--color--accent);
  text-align: left;
}

.wp-block-post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  text-align: left;
}

.wp-block-post-content a {
  color: var(--wp--preset--color--foreground);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.wp-block-post-content a:hover {
  opacity: 0.6;
}

/* Author box */
.author-box {
  border-top: 1px solid var(--wp--preset--color--border);
  padding-top: 3rem;
  margin-top: 3rem;
}

.author-box .wp-block-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.author-box .wp-block-avatar {
  flex-shrink: 0;
}

.author-box .wp-block-avatar img {
  border-radius: 50%;
  width: 48px;
  height: 48px;
}

.author-box .wp-block-post-author-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-box .wp-block-post-author-biography {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--wp--preset--color--secondary);
  margin-top: 0;
  margin-bottom: 0;
}

/* Code blocks - developer aesthetic */
code {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.875em;
  background: var(--wp--preset--color--code-bg);
  color: var(--wp--preset--color--accent);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid var(--wp--preset--color--border);
  font-weight: 500;
}

pre {
  background: var(--wp--preset--color--code-bg);
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--wp--preset--color--border);
  border-left: 3px solid var(--wp--preset--color--accent);
  overflow-x: auto;
  position: relative;
}

pre code {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  color: var(--wp--preset--color--foreground);
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--wp--preset--color--accent);
  padding-left: 1.5rem;
  margin-left: 0;
  color: var(--wp--preset--color--secondary);
  font-style: italic;
}

/* Elsewhere section */
.elsewhere-section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.elsewhere-section h2 {
  margin-bottom: 1.75rem;
  font-weight: 400;
  font-size: 1.125rem;
}

.elsewhere-section a {
  color: var(--wp--preset--color--foreground);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.elsewhere-section a:hover {
  opacity: 0.6;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--wp--preset--font-family--mono);
  background: var(--wp--preset--color--foreground);
  color: var(--wp--preset--color--background);
  border-radius: 2px;
  flex-shrink: 0;
  line-height: 1;
}

.social-username {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.875rem;
  font-weight: 400;
}

.elsewhere-section .wp-block-group {
  gap: 1.5rem;
}

.elsewhere-section p {
  margin: 0;
}

/* Footer styling - minimal */
.footer-section {
  border-top: 1px solid var(--wp--preset--color--border);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  margin-top: 4rem;
}

.footer-section .wp-block-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-section p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--wp--preset--color--secondary);
}

.footer-motto {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-transform: uppercase;
}

.footer-location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.75rem;
  font-family: var(--wp--preset--font-family--mono);
}

.clock-icon {
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1;
  opacity: 0.7;
}

.current-time {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Utility classes */
.has-border-bottom {
  border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Selection color */
::selection {
  background: var(--wp--preset--color--accent);
  color: white;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Header */
  header .wp-block-group:first-child {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  .wp-block-site-title {
    font-size: 1rem !important;
  }
  
  .wp-block-navigation {
    font-size: 0.875rem !important;
  }
  
  .wp-block-navigation__responsive-container {
    gap: 1.5rem;
  }
  
  /* Hero section */
  .hero-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .hero-section p {
    font-size: 0.9375rem !important;
  }
  
  .hero-section p:first-child {
    margin-bottom: 0.875rem;
  }
  
  .hero-avatar {
    margin-bottom: 1.25rem !important;
  }
  
  .hero-avatar img {
    width: 72px;
    height: 72px;
  }
  
  /* Now section */
  .now-section {
    padding-bottom: 2rem;
  }
  
  .now-section h2 {
    margin-bottom: 1.5rem;
  }
  
  /* Work section */
  .work-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .work-section h2 {
    margin-bottom: 1.5rem;
  }
  
  .work-item {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.875rem 1rem !important;
  }
  
  .work-year {
    margin-left: 0;
    width: 100%;
    margin-top: 0.25rem;
  }
  
  /* Posts section */
  .posts-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .posts-section h2 {
    margin-bottom: 1.5rem;
  }
  
  .post-card {
    padding: 1rem !important;
  }
  
  /* Elsewhere section */
  .elsewhere-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .elsewhere-section h2 {
    margin-bottom: 1.5rem;
  }
  
  .elsewhere-section .wp-block-group {
    gap: 1rem;
  }
  
  /* Footer */
  .footer-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-top: 3rem;
  }
  
  .footer-section .wp-block-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .footer-time {
    margin-right: 0.5rem;
  }
  
  /* Single post */
  .single-post {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }
  
  .post-header {
    margin-bottom: 2rem;
  }
  
  .post-header h1 {
    font-size: 1.75rem;
  }
  
  .wp-block-post-content h2 {
    padding-left: 0.75rem;
    font-size: 1.375rem;
  }
  
  .author-box {
    padding-top: 2rem;
    margin-top: 2rem;
  }
  
  .author-box .wp-block-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Focus states for accessibility */
a:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
}
