:root {
  --bg-primary: #0f1117;
  --bg-secondary: #171923;
  --bg-card: #1e2230;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --border: rgba(255, 255, 255, 0.08);
  --modal-bg: rgba(10, 12, 18, 0.92);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --border: rgba(0, 0, 0, 0.08);
  --modal-bg: rgba(248, 250, 252, 0.94);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans", "Meiryo", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(15, 17, 23, 0.85);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="light"] .header {
  background-color: rgba(248, 250, 252, 0.85);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
}

/* Hero Section */
.hero {
  padding: 80px 0 40px;
  text-align: center;
}

.hero-tagline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-desc {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Filters */
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0 32px;
}

.filter-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.filter-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 100px;
}

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.gallery-item.tall {
  aspect-ratio: 3 / 4;
}

.gallery-item.square {
  aspect-ratio: 1 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 17, 23, 0.9) 0%, rgba(15, 17, 23, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.item-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.item-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

/* About Section */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  display: flex;
  gap: 48px;
  align-items: center;
  box-shadow: var(--shadow);
}

.about-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  flex-shrink: 0;
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 40%;
}

.about-info h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.about-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.about-bio {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 1rem;
  line-height: 1.7;
}

.badge-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Contact Section */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.contact-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.contact-desc {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45);
}

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

/* Modal / Lightbox */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--modal-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-caption {
  margin-top: 16px;
  text-align: center;
}

.modal-caption h4 {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.modal-caption p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1010;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1010;
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-nav.prev {
  left: 24px;
}

.modal-nav.next {
  right: 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }

  .about-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
    gap: 24px;
  }

  .badge-list, .social-links {
    justify-content: center;
  }

  .modal-nav {
    display: none;
  }
}
