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

:root {
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --bg: #0f0f1a;
  --bg-light: #1a1a2e;
  --text: #e2e8f0;
  --text-muted: #a0aec0;
  --border: #2d3748;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans',
    'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}

/* Button */
.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

/* Section */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* About */
.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

/* Skills */
.skills {
  background: var(--bg-light);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.skill-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* Works */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.work-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.work-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.work-info {
  padding: 24px;
}

.work-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.work-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Contact */
.contact {
  background: var(--bg-light);
}

.contact-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  margin-top: -40px;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.contact-form .btn {
  opacity: 1;
  animation: none;
  align-self: flex-start;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 20px;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }
}
