/* ====================================
   SaikyoSonata Portfolio - Styles
   ==================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Dark Theme */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --bg-card-hover: #242424;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --border: #2a2a2a;
  --shadow: rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

/* ====================================
   Animations
   ==================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

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

.slide-in {
  animation: slideIn 0.6s ease-out forwards;
}

/* Staggered animations */
.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

.stagger-3 {
  animation-delay: 0.3s;
}

.stagger-4 {
  animation-delay: 0.4s;
}

.stagger-5 {
  animation-delay: 0.5s;
}

/* ====================================
   HOME PAGE
   ==================================== */

.home-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.home-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.home-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
      rgba(10, 10, 10, 0.3) 0%,
      rgba(10, 10, 10, 0.6) 50%,
      rgba(10, 10, 10, 0.9) 100%);
}

.home-content {
  text-align: center;
  z-index: 1;
  padding: 2rem;
}

.alias {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.2s forwards;
}

.nav-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.nav-link {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.nav-link:hover::before {
  left: 100%;
}

/* ====================================
   PAGE LAYOUT (Non-Home Pages)
   ==================================== */

.page-container {
  min-height: 100vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
}

.back-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

/* ====================================
   BIODATA PAGE
   ==================================== */

.biodata-container {
  flex: 1;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

.biodata-photo {
  position: sticky;
  top: 2rem;
}

.biodata-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 20px;
  border: 2px solid var(--border);
  box-shadow: 0 20px 50px var(--shadow);
}

.biodata-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.biodata-header {
  opacity: 0;
  animation: slideIn 0.6s ease-out 0.2s forwards;
}

.biodata-name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.biodata-profession {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 500;
}

.biodata-intro {
  opacity: 0;
  animation: slideIn 0.6s ease-out 0.4s forwards;
}

.biodata-intro h3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.biodata-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ====================================
   PROJECTS PAGE
   ==================================== */

.projects-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: var(--transition);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-year {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
}

.project-link:hover {
  background: rgba(99, 102, 241, 0.2);
}

.project-link svg {
  width: 16px;
  height: 16px;
}

/* ====================================
   CONTACTS PAGE
   ==================================== */

.contacts-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: var(--transition);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.contact-item:hover {
  transform: translateX(10px);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.contact-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  color: var(--accent);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.contact-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ====================================
   RESPONSIVE
   ==================================== */

@media (max-width: 900px) {
  .biodata-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .biodata-photo {
    position: static;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .page-container {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-link {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-item {
    padding: 1rem 1.5rem;
  }

  .alias {
    font-size: 2.5rem;
  }
}