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

:root {
  --bg: #060a10;
  --bg2: #0d1825;
  --bg3: #122030;
  --accent: #00c8f0;
  --accent2: #38d9f5;
  --accent-light: #80eeff;
  --text: #f0f6ff;
  --muted: #6a95b0;
  --border: rgba(0, 200, 240, 0.2);
  --border-accent: rgba(0, 200, 240, 0.6);
}

html { scroll-behavior: smooth; }

body {
  /* Optimized font stack for Japanese and English */
  font-family: 'Space Grotesk', "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(0, 200, 240, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 240, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(6, 10, 16, 0.85);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-logo { font-size: 14px; font-weight: 700; color: var(--accent); }
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

section {
  padding: 4rem 2rem;
  max-width: 900px; /* Slightly wider for bilingual content */
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.section-tag {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 1.4rem; }

.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 5rem 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
  border-top: none;
}

.avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-accent);
  flex-shrink: 0;
}

.hero-tag { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; line-height: 1.15; margin-bottom: 0.7rem; }
.accent { color: var(--accent); }
.hero-sub { font-size: 15px; color: var(--muted); margin-bottom: 1rem; line-height: 1.8; }

.available {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 200, 240, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--accent-light);
  margin-bottom: 1.4rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  animation: pulse 1.8s infinite;
}

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

.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #060a10; border: none; }
.btn-primary:hover { background: var(--accent2); text-decoration: none; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* About Grid Layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.about-text { color: var(--muted); font-size: 15px; line-height: 1.9; }
.about-text strong { color: var(--text); }

.jp-card {
  background: var(--bg2);
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.jp-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.2rem; }
.jp-sub { font-size: 12px; color: var(--muted); margin-bottom: 1.2rem; }
.jp-body { font-size: 14px; line-height: 2; margin-bottom: 1.2rem; color: #d1d9e0; }

.skills-list { display: flex; flex-wrap: wrap; gap: 8px; }

.skill {
  font-size: 13px;
  padding: 5px 15px;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
  color: var(--accent2);
}

.skill.learning { border-color: rgba(0, 200, 240, 0.2); color: var(--muted); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover { border-color: var(--border-accent); transform: translateY(-4px); }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 0.5rem; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 1.2rem; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: auto; padding-bottom: 1rem; }

.tag {
  font-size: 10px;
  background: rgba(0, 200, 240, 0.08);
  color: var(--accent2);
  border-radius: 4px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-links { display: flex; gap: 10px; }

.card-link {
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 4px 12px;
  transition: all 0.2s;
  text-decoration: none;
}

.card-link:hover { background: var(--accent); color: #060a10; text-decoration: none; }

.contact-intro { color: var(--muted); font-size: 15px; margin-bottom: 1.5rem; }
.contact-grid { display: flex; flex-wrap: wrap; gap: 15px; }

.contact-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  flex: 1;
  min-width: 250px;
  transition: border-color 0.2s;
}

.contact-item:hover { border-color: var(--border-accent); }

.contact-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-item a,
.contact-item span { font-size: 14px; font-weight: 600; color: var(--text); }

footer {
  text-align: center;
  padding: 3rem 1.8rem;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  nav { flex-direction: column; gap: 0.8rem; padding: 1.5rem 1rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .hero { flex-direction: column; text-align: center; padding: 4rem 1.5rem; }
  .hero-cta { justify-content: center; }
  .available { margin: 0 auto 1.4rem; }
  section { padding: 3rem 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { flex-direction: column; }
}
