/* ================================
   Memories × Technology
   A Portfolio by Ryo Tsuzukihashi
   ================================ */

/* ========== Variables ========== */
:root {
  /* Color Palette - Memories × Technology */
  --color-sunset: #FF6B6B;        /* 思い出の夕焼け */
  --color-ocean: #4ECDC4;          /* テクノロジーの深海 */
  --color-golden: #FFD93D;         /* 輝く瞬間 */
  --color-cream: #FFF9F5;          /* 優しい記憶 */
  --color-charcoal: #2D3436;      /* 確かな技術 */
  --color-gray: #636E72;           /* サブテキスト */
  --color-light-gray: #DFE6E9;    /* ボーダー */
  --color-white: #FFFFFF;
  
  /* Gradients removed for cleaner design */
  
  /* Typography */
  --font-main: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --font-accent: 'Inter', 'Helvetica Neue', sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;
  
  /* Animation */
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s ease;
  --animation-float: float 6s ease-in-out infinite;
}

/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ========== Typography ========== */
h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.4;
}

p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--color-gray);
}

.text-gradient {
  color: var(--color-sunset);
}

/* ========== Navigation ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  background: rgba(255, 249, 245, 0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition-normal);
}

.nav.scrolled {
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-accent);
  color: var(--color-charcoal);
  text-decoration: none;
  transition: var(--transition-normal);
}

.nav-logo:hover {
  color: var(--color-sunset);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-charcoal);
  text-decoration: none;
  transition: var(--transition-normal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-sunset);
  transition: var(--transition-normal);
}

.nav-link:hover::after {
  width: 100%;
}

/* ========== Hero Section ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-2xl) var(--space-md);
  background: var(--color-cream);
  background-image: url('../images/main_image.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-cream);
  opacity: 0.85;
  z-index: 1;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  text-align: center;
  z-index: 2;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--color-white);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-sunset);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
  animation: slideDown 0.8s ease;
}

.hero-title {
  margin-bottom: 1.5rem;
  animation: slideUp 0.8s ease 0.2s both;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--color-gray);
  margin-bottom: 3rem;
  font-weight: 400;
  animation: slideUp 0.8s ease 0.4s both;
}

.hero-cta {
  display: inline-flex;
  gap: 1.5rem;
  animation: slideUp 0.8s ease 0.6s both;
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--color-sunset);
  color: var(--color-white);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-charcoal);
  border: 2px solid var(--color-light-gray);
}

.btn-secondary:hover {
  border-color: var(--color-sunset);
  color: var(--color-sunset);
  transform: translateY(-3px);
}

/* ========== Memory Cards (Portfolio) ========== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.memory-card {
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: var(--transition-normal);
  cursor: pointer;
}

.memory-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.memory-card-image {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: var(--color-ocean);
}

.memory-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.memory-card:hover .memory-card-image img {
  transform: scale(1.1);
}

.memory-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-ocean);
}

.memory-card-content {
  padding: 2rem;
}

.memory-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-charcoal);
}

.memory-card-description {
  font-size: 1rem;
  color: var(--color-gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.memory-card-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-light-gray);
}

.memory-stat {
  display: flex;
  flex-direction: column;
}

.memory-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-sunset);
}

.memory-stat-label {
  font-size: 0.875rem;
  color: var(--color-gray);
}

/* ========== Timeline (Journey) ========== */
.timeline {
  position: relative;
  padding: var(--space-xl) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-ocean);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: 45%;
  padding: 2rem;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  position: relative;
}

.timeline-year {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: var(--color-sunset);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.125rem;
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.timeline-item:nth-child(odd) .timeline-year {
  right: -30px;
}

.timeline-item:nth-child(even) .timeline-year {
  left: -30px;
}

/* ========== Sections ========== */
.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section-alt {
  background: var(--color-white);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--color-sunset);
  color: var(--color-white);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 1.5rem;
  color: var(--color-charcoal);
}

.section-description {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.25rem;
  color: var(--color-gray);
}

/* ========== Floating Memory Shapes ========== */
.memory-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.memory-shape {
  position: absolute;
  opacity: 0.05;
  animation: float 20s ease-in-out infinite;
}

.memory-shape:nth-child(1) {
  top: 10%;
  left: 10%;
  width: 100px;
  height: 100px;
  background: var(--color-sunset);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation-delay: 0s;
}

.memory-shape:nth-child(2) {
  top: 70%;
  right: 10%;
  width: 150px;
  height: 150px;
  background: var(--color-ocean);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation-delay: 2s;
}

.memory-shape:nth-child(3) {
  bottom: 20%;
  left: 20%;
  width: 80px;
  height: 80px;
  background: var(--color-golden);
  border-radius: 40% 60% 60% 40% / 40% 60% 40% 60%;
  animation-delay: 4s;
}

/* ========== Stats Counter ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-top: var(--space-xl);
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-sunset);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.125rem;
  color: var(--color-gray);
  font-weight: 500;
}

.stat-description {
  font-size: 0.875rem;
  color: var(--color-gray);
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* ========== Animations ========== */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(10px) rotate(-5deg);
  }
  75% {
    transform: translateY(-10px) rotate(3deg);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
  from {
    opacity: 0;
    transform: translateY(30px);
  }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    justify-content: center;
    transition: var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
  }
  
  .nav-toggle span {
    width: 100%;
    height: 3px;
    background: var(--color-charcoal);
    border-radius: 3px;
    transition: var(--transition-normal);
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .memory-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: row;
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px;
  }
  
  .timeline-year {
    left: 0 !important;
    right: auto !important;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

/* ========== Utilities ========== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

/* ========== Footer SNS Icons ========== */
.footer-sns {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
  text-decoration: none;
}

.sns-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.sns-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: var(--transition-normal);
}

@media (max-width: 768px) {
  .footer-sns {
    gap: 1rem;
  }
  
  .sns-link {
    width: 36px;
    height: 36px;
  }
  
  .sns-icon {
    width: 20px;
    height: 20px;
  }
}