/*
Theme Name: Portfolio White Theme
Theme URI: 
Author: My Portfolio
Author URI: 
Description: A clean, white, modern portfolio theme with glassmorphism effects.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portfolio-white
Tags: light, portfolio, grid-layout, modern, clean
*/

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --bg-light: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.04);
  --accent-glow: 0 10px 40px rgba(79, 70, 229, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-light);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.05), transparent 25%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.portfolio-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.hero-section {
  text-align: center;
  margin-bottom: 5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  text-decoration: none;
  color: inherit;
  opacity: 0;
}

.project-card.loaded {
    opacity: 1;
    animation: fadeIn 0.8s ease-out forwards;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
  transform: skewX(-20deg);
  transition: all 0.6s ease;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: var(--accent-glow);
}

.project-card:hover::before {
  left: 150%;
}

.project-image-wrapper {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

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

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

.no-thumbnail {
  color: #94a3b8;
  font-size: 3rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e293b;
  z-index: 2;
  position: relative;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  z-index: 2;
  position: relative;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  z-index: 2;
  position: relative;
}

.tag {
  background: #f1f5f9;
  color: #64748b;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  padding: 0.5rem 0;
  width: fit-content;
  z-index: 2;
  position: relative;
}

.project-card:hover .project-link-btn {
  color: var(--primary-hover);
  gap: 0.8rem;
}

.project-image-wrapper.full-width {
  height: 300px;
  margin-bottom: 1.5rem;
}

.entry-content {
  line-height: 1.8;
  color: #334155;
}

.entry-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.portfolio-footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

/* ===== Single Post: 2-Column Layout ===== */
.single-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.single-main {
  flex: 1;
  min-width: 0;
}

.site-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
}

.sidebar-widget {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--glass-shadow);
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget ul li:last-child {
  border-bottom: none;
}

.sidebar-widget a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-widget a:hover {
  color: var(--primary);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .single-layout {
    flex-direction: column;
  }
  .site-sidebar {
    width: 100%;
    position: static;
  }
}
