/*
Theme Name: Arai Portfolio
Theme URI: https://otaku-arai.com
Author: アライ
Author URI: https://otaku-arai.com
Description: Tech Creator アライのポートフォリオテーマ。PC、キーボード、3Dプリント、スマートホームなどの活動を紹介するカスタムテーマ。
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: arai-theme
*/

/* ===== CSS Variables ===== */
:root {
  --bg: #e6e6e6;
  --accent: #e74304;
  --gold: #e3bf36;
  --dark: #1e1e1e;
  --mid: #5a5a5a;
  --light: #f0f0f0;
  --card: #ffffff;
  --accent-soft: rgba(231, 67, 4, 0.07);
  --gold-soft: rgba(227, 191, 54, 0.12);
  --font-jp: 'M PLUS 2', 'Hiragino Sans', sans-serif;
  --font-en: 'Hanken Grotesk', 'Arial', sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --max-w: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ===== Accent Line ===== */
.accent-line {
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 100%);
}

/* ===== Navigation ===== */
.nav {
  background: var(--light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 36px;
}

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

.nav-links a {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 13px;
  color: var(--mid);
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

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

/* ===== Hero ===== */
.hero {
  background: var(--card);
  position: relative;
  z-index: 1;
  overflow: visible;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 32px 64px;
  display: flex;
  align-items: flex-start;
  gap: 48px;
  position: relative;
  min-height: 380px;
}

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

.hero-name {
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: 52px;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero-tagline {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 480px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hero-tag {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--mid);
  transition: all 0.2s;
  display: inline-block;
}

.hero-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.hero-character {
  position: absolute;
  right: 0;
  left: auto;
  top: 20px;
  width: 520px;
  z-index: 1;
}

.hero-character img {
  width: 100%;
  height: auto;
}

/* ===== Main content (scrolls over character) ===== */
.main-content {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

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

.sns-btn {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 18px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, opacity 0.2s;
}

.sns-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.sns-btn svg {
  flex-shrink: 0;
}

.sns-yt { background: var(--accent); color: #fff; }
.sns-x { background: var(--dark); color: #fff; }
.sns-github { background: #24292e; color: #fff; }
.sns-note { background: #41c9b4; color: #fff; }
.sns-booth { background: #fc4d50; color: #fff; }
.sns-ig { background: #e4405f; color: #fff; }

/* About SNS icons */
.about-sns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.about-sns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light);
  color: var(--mid);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.about-sns a:hover {
  background: var(--dark);
  color: #fff;
  transform: translateY(-2px);
}

.about-sns svg {
  flex-shrink: 0;
}

/* ===== Sections ===== */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 20px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.section-link {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 13px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.section-link:hover {
  gap: 8px;
}

.section-link::after {
  content: '\2192';
}

.section-divider {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.section-divider hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ===== Works ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.work-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.25s, box-shadow 0.25s;
  display: block;
}

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

.work-img {
  aspect-ratio: 4 / 3;
  background: var(--light);
  overflow: hidden;
}

.work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.work-card:hover .work-img img {
  transform: scale(1.05);
}

.work-info {
  padding: 14px 16px;
}

.work-title {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
  margin-bottom: 2px;
}

.work-subtitle {
  font-size: 12px;
  color: var(--mid);
  margin-bottom: 8px;
}

.work-badge {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  letter-spacing: 0.3px;
}

.badge-keyboard { background: var(--accent-soft); color: var(--accent); }
.badge-3dprint { background: var(--gold-soft); color: #8a7010; }
.badge-gadget { background: rgba(30,30,30,0.06); color: var(--mid); }
.badge-smarthome { background: rgba(30,30,30,0.06); color: var(--mid); }
.badge-camera { background: rgba(30,30,30,0.06); color: var(--mid); }

/* ===== YouTube ===== */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.yt-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.25s, box-shadow 0.25s;
  display: block;
}

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

.yt-thumb {
  aspect-ratio: 16 / 9;
  background: var(--dark);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-play {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.yt-card:hover .yt-play {
  transform: scale(1.1);
}

.yt-play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 3px;
}

.yt-info {
  padding: 14px 16px;
}

.yt-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.5;
  margin-bottom: 4px;
}

.yt-meta {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 12px;
  color: var(--mid);
}

/* ===== Blog ===== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-row:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.blog-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--light);
  flex-shrink: 0;
  overflow: hidden;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-text {
  flex: 1;
  min-width: 0;
}

.blog-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.5;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-meta {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 12px;
  color: var(--mid);
}

.blog-category {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-block;
  margin-left: 6px;
}

/* ===== Events ===== */
.events-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px 48px;
}

.events-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px 28px 20px;
  border: 1px solid rgba(0,0,0,0.05);
}

.event-item {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: opacity 0.2s;
  color: inherit;
}

.event-item:hover {
  opacity: 0.7;
}

.event-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.event-date {
  text-align: center;
  min-width: 56px;
}

.event-month {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.event-day {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 28px;
  color: var(--dark);
  line-height: 1.1;
}

.event-detail {
  flex: 1;
}

.event-name {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 15px;
  color: var(--dark);
  margin-bottom: 2px;
}

.event-desc {
  font-size: 12px;
  color: var(--mid);
}

.event-badge {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #8a7010;
  display: inline-block;
  margin-top: 4px;
}

/* ===== About ===== */
.about-strip {
  background: var(--card);
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.about-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 32px;
  display: flex;
  gap: 32px;
  align-items: center;
}

.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--light);
  flex-shrink: 0;
  overflow: hidden;
}

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

.about-text {
  flex: 1;
}

.about-name {
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: 20px;
  color: var(--dark);
  margin-bottom: 2px;
}

.about-role {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.about-bio {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.8;
}

/* ===== Contact ===== */
.contact-strip {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 32px;
}

.contact-card {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-card h3 {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.contact-card p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.contact-btn {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 28px;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.2s, opacity 0.2s;
  display: inline-block;
}

.contact-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* ===== Contact Page ===== */
.contact-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 32px;
}

.contact-page-inner {
  max-width: 640px;
  margin: 0 auto;
}

.contact-page-title {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 28px;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-page-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 28px;
  background: var(--accent);
  border-radius: 2px;
}

.contact-page-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 40px;
}

.contact-form-wrap {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  border: 1px solid rgba(0,0,0,0.05);
}

/* CF7 form styling */
.contact-form-wrap .wpcf7-form input[type="text"],
.contact-form-wrap .wpcf7-form input[type="email"],
.contact-form-wrap .wpcf7-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  font-family: var(--font-jp);
  font-size: 14px;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.2s;
}

.contact-form-wrap .wpcf7-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  font-family: var(--font-jp);
  font-size: 14px;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a5a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.contact-form-wrap .wpcf7-form input:focus,
.contact-form-wrap .wpcf7-form textarea:focus,
.contact-form-wrap .wpcf7-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form-wrap .wpcf7-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form-wrap .wpcf7-form input[type="file"] {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 20px;
}

.contact-form-wrap .wpcf7-form input[type="submit"] {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  margin-top: 8px;
}

.contact-form-wrap .wpcf7-form input[type="submit"]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-form-wrap .wpcf7-form .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.contact-form-wrap .wpcf7-form .wpcf7-not-valid-tip {
  font-size: 12px;
  color: var(--accent);
  margin-top: -16px;
  margin-bottom: 12px;
}

.cf7-field {
  margin-bottom: 24px;
}

.cf7-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.cf7-field label .req {
  color: var(--accent);
  margin-left: 2px;
}

.cf7-note {
  font-size: 12px;
  color: var(--mid);
  line-height: 1.7;
  margin-bottom: 8px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 32px 32px;
  text-align: center;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo img {
  height: 24px;
  margin: 0 auto;
  filter: invert(1);
  opacity: 0.35;
}

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

.footer-links a {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.7);
}

.footer-copy {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.5px;
}

/* ===== Single Post / Page ===== */
.content-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 32px;
}

.content-wrap .entry-title {
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: 28px;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 12px;
}

.content-wrap .entry-meta {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 32px;
}

.content-wrap .entry-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--dark);
}

.content-wrap .entry-content h2 {
  font-weight: 700;
  font-size: 22px;
  margin: 40px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

.content-wrap .entry-content h3 {
  font-weight: 700;
  font-size: 18px;
  margin: 32px 0 12px;
}

.content-wrap .entry-content p {
  margin-bottom: 20px;
}

.content-wrap .entry-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.content-wrap .entry-content a {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== Archive ===== */
.archive-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 32px 24px;
}

.archive-title {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 24px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.archive-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
}

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

.hero-inner { animation: fadeUp 0.6s ease-out; }
.work-card { animation: fadeUp 0.5s ease-out both; }
.work-card:nth-child(1) { animation-delay: 0.1s; }
.work-card:nth-child(2) { animation-delay: 0.2s; }
.work-card:nth-child(3) { animation-delay: 0.3s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-inner {
    padding: 40px 20px 36px;
    text-align: center;
    min-height: 320px;
    overflow: hidden;
  }
  .hero-content { max-width: 100%; }
  .hero-name { font-size: 40px; }
  .hero-tagline { font-size: 18px; }
  .hero-tags { justify-content: center; max-width: 100%; }
  .hero-sns { justify-content: center; max-width: 100%; }
  .sns-btn { font-size: 11px; padding: 5px 12px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-character {
    width: 280px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    top: 40px !important;
    opacity: 0.25;
    transform: none !important;
  }

  .nav-inner { padding: 10px 16px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 11px; }

  .section { padding: 36px 16px; }
  .section-divider { padding: 0 16px; }
  .works-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .yt-grid { grid-template-columns: 1fr; gap: 12px; }

  .about-inner {
    flex-direction: column;
    text-align: center;
    padding: 36px 16px;
  }
  .about-sns { justify-content: center; }

  .contact-card {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 28px 20px;
  }

  .events-wrap { padding: 0 16px 36px; }
  .contact-strip { padding: 36px 16px; }
  .content-wrap { padding: 36px 16px; }
  .contact-page { padding: 36px 16px; }
  .contact-form-wrap { padding: 24px 16px; }
}

@media (max-width: 480px) {
  .works-grid { grid-template-columns: 1fr; }
  .hero-name { font-size: 32px; }
  .nav-links { gap: 10px; }
}
