/* Global Styles - Fuma Tsuchiya Portfolio */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  background-color: #0F1419;
  color: #F9FAFB;
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
  font-weight: 900;
}

h2 {
  font-size: 2.5rem;
  font-weight: 800;
}

h3 {
  font-size: 1.875rem;
  font-weight: 700;
}

h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  color: #D1D5DB;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #6366F1 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card Styles */
.card {
  background: rgba(26, 31, 46, 0.6);
  border: 1px solid rgba(55, 65, 81, 0.3);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #6366F1 0%, #3B82F6 100%);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid rgba(99, 102, 241, 0.5);
  color: #F9FAFB;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #6366F1;
  background: rgba(99, 102, 241, 0.1);
}

/* Form Styles */
input:focus,
textarea:focus {
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

input::placeholder,
textarea::placeholder {
  color: #6B7280;
}

/* Form Message Animation */
#form-message {
  animation: slideDown 0.3s ease-out;
}

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

/* Section Title */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #9CA3AF;
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Responsive */
@media (max-width: 1280px) {
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Typography */
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  /* Layout */
  section {
    padding: 3rem 0;
  }
  
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  /* Navigation - Mobile */
  nav {
    padding: 1rem 0 !important;
  }
  
  nav .container {
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 0 !important;
  }
  
  nav .container > div:last-child {
    display: none !important;
  }
  
  #mobile-menu-button {
    display: flex !important;
  }
  
  nav a {
    font-size: 0.875rem !important;
  }
  
  /* Cards */
  .card {
    padding: 1.5rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  /* Hide scroll indicator on mobile */
  section > div > div[style*="position:absolute"][style*="bottom"] {
    display: none !important;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Reveal Animation for Scroll */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Animation */
.reveal.delay-1 {
  transition-delay: 0.1s;
}

.reveal.delay-2 {
  transition-delay: 0.2s;
}

.reveal.delay-3 {
  transition-delay: 0.3s;
}

.reveal.delay-4 {
  transition-delay: 0.4s;
}

/* Hero Section Load Animation */
.hero-section {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.hero-section.loaded {
  opacity: 1;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366F1 0%, #3B82F6 100%);
  z-index: 9999;
  transition: width 0.3s ease;
}

/* Navigation Transition */
nav {
  transition: all 0.3s ease;
}

/* Mobile Menu */
#mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

#mobile-menu-button span {
  width: 25px;
  height: 3px;
  background: #F9FAFB;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: rgba(15, 20, 25, 0.98);
  backdrop-filter: blur(20px);
  z-index: 9998;
  transition: right 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

#mobile-menu.active {
  right: 0;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

#mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #F9FAFB;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
}

.mobile-menu-links a {
  font-size: 1.25rem;
  font-weight: 600;
  color: #F9FAFB;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
  transition: all 0.3s ease;
}

.mobile-menu-links a:hover {
  color: #6366F1;
  padding-left: 1rem;
}

/* Mobile Menu Overlay */
#mobile-menu::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#mobile-menu.active::before {
  opacity: 1;
  pointer-events: auto;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(135deg, #6366F1 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.mb-8 { margin-bottom: 4rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mt-8 { margin-top: 4rem; }

/* Background Gradient */
.bg-gradient {
  position: relative;
  background: linear-gradient(180deg, #0F1419 0%, #1A1F2E 100%);
}

.bg-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  pointer-events: none;
}
