:root {
  --bg: #0f172a;
  --bg-alt: #121c33;
  --card: #0d1224;
  --accent: #0ea5e9;
  --accent-light: rgba(14, 165, 233, 0.1);
  --text: #e2e8f0;
  --muted: #cbd5e1; /* Increased from #94a3b8 for better readability */
  --border: rgba(226, 232, 240, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(14, 165, 233, 0.08),
      transparent 25%
    ),
    radial-gradient(circle at 80% 0%, rgba(99, 102, 241, 0.12), transparent 20%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.pc-only { display: inline; }
.mobile-only { display: none; }

@media (max-width: 767px) {
  .pc-only { display: none; }
  .mobile-only { display: inline; }
}

.interactive-hint {
  font-size: 0.9rem;
  opacity: 0.8;
}

a {
  color: inherit;
  text-decoration: none;
}



a:hover {
  color: var(--accent);
}

.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 1.2rem;
}

.hero {
  padding: 140px 0 70px; /* Increased top padding to account for fixed header (80px -> 140px) */
  background: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.8),
      rgba(15, 23, 42, 0.7)
    ),
    url("assets/images/error.png");
  background-size: cover;
  background-position: center 15%;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

@media (max-width: 767px) {
  .hero {
    background-position: 20% 15%; /* Shift text/focus to the left on mobile to show the person */
  }
  .hero.hero--home {
    background-image: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.8),
        rgba(15, 23, 42, 0.7)
      ),
      url("assets/images/profile_suit.JPG");
  }
}

.hero__eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.hero__title {
  margin: 14px 0 12px;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  letter-spacing: 0.02em;
}

.hero__subtitle {
  margin: 0 0 24px;
  max-width: 780px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0b1221;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  box-shadow: 0 12px 20px rgba(14, 165, 233, 0.25);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.35);
  color: #0b1221; /* Ensure text remains visible */
}

.button--ghost {
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.button--ghost:hover {
  color: #ffffff; /* Keep text white for ghost button on hover */
  background: rgba(255, 255, 255, 0.1);
}

.section {
  padding: 70px 0;
}

.section--accent {
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 18px;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.section__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.section__grid--reverse {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative; /* Base for absolute positioning */
  overflow: hidden; /* Prevent overflow of decorative elements */
}

.profile-card__logo {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 100px;
  height: 100px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  opacity: 1.0; /* Increased to 1.0 for full visibility */
  pointer-events: none;
  z-index: 0;
}

.profile-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 767px) {
  .profile-card__logo {
    top: 16px;
    right: 16px;
    width: 70px; /* Slightly larger on mobile */
    height: 70px;
    opacity: 1.0; /* Fully opaque on mobile as well */
  }
}

.list,
.card ul {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
}

.info-list dt {
  color: var(--muted);
  font-weight: 600;
}

.info-list dd {
  margin: 0;
}

.media-card {
  text-align: center;
}

.media-card__image {
  position: relative;
  height: 220px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-weight: 600;
}

.media-card__caption {
  margin: 10px 0 0;
  color: var(--muted);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cards-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cards-grid--career {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.cards-grid--media {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    to bottom,
    rgba(14, 165, 233, 0.6),
    rgba(14, 165, 233, 0)
  );
}

.timeline__item {
  position: relative;
  padding-left: 42px;
}

.timeline__year {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.timeline__card {
  margin: 0;
}

.list li {
  margin-bottom: 6px;
}

.media-placeholder {
  text-align: left;
}

.placeholder-box {
  margin-top: 12px;
  height: 120px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.footer__content {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.footer__title {
  margin: 0 0 4px;
  font-weight: 700;
}

.footer__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--muted);
  font-weight: 600;
}

.footer__links a.button {
  color: #0b1221;
}

.footer__links a.button--ghost {
  color: var(--text);
}

.footer__links a.button--ghost:hover {
  color: #ffffff;
}

.footer__links a:hover {
  color: var(--accent);
}
/* ===== 画像はみ出し防止（基本） ===== */

/* Grid / Card 内での横はみ出し防止 */
.card,
.media-card {
  min-width: 0;
}

/* 画像枠 */
.media-card__image {
  width: 100%;
  aspect-ratio: 16 / 10; /* ← 好みで 4 / 3 や 1 / 1 に変更可 */
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);

  display: block;
}

/* 実画像 */
.media-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 枠に収めてトリミング */
  display: block;
}

.media-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

/* 画像・動画 共通 */
.media-card__media img,
.media-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .info-list__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero {
    padding-top: 120px; /* Adjusted for fixed header on mobile */
  }

  .hero__cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Navigation ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-header__logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__logo-icon {
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
}

.global-nav__list {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.global-nav__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}

.global-nav__link:hover,
.global-nav__link[aria-current="true"] {
  color: var(--accent);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1001;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  transition: all 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .global-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--bg-alt);
    padding: 80px 24px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .global-nav[aria-hidden="false"] {
    right: 0;
  }

  .nav-toggle {
    display: block;
  }

  .global-nav__list {
    flex-direction: column;
    gap: 20px;
  }

  .global-nav__link {
    font-size: 1.1rem;
    display: block;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

/* Overlay for mobile menu */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* History Section Refactor */
.history-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 768px) {
  .history-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.history-column-title {
  font-size: 1.4rem;
  margin: 0 0 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-weight: 700;
}

/* Header colors */
.history-column-title.education {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.history-column-title.work {
  border-bottom-color: #f59e0b; /* Amber 500 */
  color: #f59e0b;
}

/* Mobile Styles */
@media (max-width: 767px) {
  .history-column {
    margin-bottom: 40px;
  }
  
  .history-column:last-child {
    margin-bottom: 0;
  }

  .history-column-title {
    padding: 12px 16px;
    border-bottom: none;
    border-radius: 8px;
    /* Use background strip style */
  }

  .history-column-title.education {
    background: rgba(14, 165, 233, 0.1);
    border-left: 4px solid var(--accent);
  }

  .history-column-title.work {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
  }
}

/* Specific colors for Work History Timeline */
.history-column.work .timeline::before {
  background: linear-gradient(
    to bottom,
    rgba(245, 158, 11, 0.6),
    rgba(245, 158, 11, 0)
  );
}

.history-column.work .timeline__year {
  color: #f59e0b;
}


/* Specific adjustment for Sushi-da image to crop top/bottom */
.sushida-card .media-card__media img {
  transform: scale(1.15); /* Enlarge slightly to hide edges */
  transform-origin: center;
  transition: transform 0.3s ease;
}



/* ===== Product Showcase (Apple-style) ===== */
.product-showcase {
  display: grid;
  /* Limit to max 3 columns on PC, sized between 280px and 350px */
  grid-template-columns: repeat(3, minmax(0, 350px));
  justify-content: start; /* Left-align when items are fewer than columns */
  gap: 32px;
  margin-top: 40px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
  max-width: 350px; /* Prevent cards from becoming too large */
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.product-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 20px 20px 8px;
  color: var(--text);
}

.product-card__tagline {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 20px 20px;
  font-weight: 400;
  line-height: 1.4;
}

/* Mobile: Horizontal scroll */
@media (max-width: 767px) {
  .product-showcase {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  .product-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
  }
  
  /* Hide scrollbar for cleaner look */
  .product-showcase::-webkit-scrollbar {
    height: 6px;
  }
  
  .product-showcase::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
  }
  
  .product-showcase::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
  }
}

/* ===== Product Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal--active {
  display: flex;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal__content {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.modal__close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.modal__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

.modal__image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  padding: 32px;
}

.modal__image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}

.modal__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal__info h2 {
  font-size: 2rem;
  margin: 0 0 20px;
  color: var(--text);
}

.modal__info p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}

.modal__buttons {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Mobile modal */
@media (max-width: 767px) {
  .modal {
    padding: 0; /* Remove padding to maximize space */
    align-items: center;
    justify-content: center;
  }
  
  .modal__content {
    width: calc(100vw - 20px); /* Full width minus small margin */
    max-width: calc(100vw - 20px);
    max-height: 85vh;
    margin: 10px;
    border-radius: 12px;
  }
  
  .modal__close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }
  
  .modal__body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    padding-top: 48px;
    overflow-y: auto;
    max-height: calc(85vh - 32px);
  }
  
  .modal__image {
    width: 100%;
    padding: 16px;
    max-height: 200px;
    min-height: unset;
    aspect-ratio: unset;
  }
  
  .modal__image img {
    width: 100%;
    height: auto;
    max-height: 170px;
    object-fit: contain;
  }
  
  .modal__info {
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  
  .modal__info h2 {
    font-size: 1.25rem;
    margin: 0 0 12px;
    line-height: 1.3;
  }
  
  .modal__info p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
  }
  
  .modal__buttons {
    margin-top: 16px;
    width: 100%;
  }
  
  .modal__buttons .button {
    width: 100%;
    text-align: center;
  }
}

/* Add cursor pointer to product cards */
.product-card {
  cursor: pointer;
}

