:root {
  /* Colors */
  --color-text: #333;
  --color-text-light: #f5f5f5;
  --color-background: #fff;
  --color-background-light: #f9f9f9;
  --color-primary: #2c3e50;
  --color-accent: #34495e;
  --color-border: #ddd;

  /* Fonts */
  --font-heading: "Playfair Display", serif;
  --font-body: "Noto Sans JP", sans-serif;

  /* Spacing */
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;

  /* Other */
  --header-height: 70px;
}

/* Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-background);
  margin: 0;
  padding-top: var(--header-height);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--color-primary);
}

/* Header */
.header {
  background-color: rgba(255, 255, 255, 0.9);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.header--scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 0 var(--space-lg);
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-primary);
}

.nav__list {
  display: flex;
}

.nav__item {
  margin-left: var(--space-lg);
}

.nav__link {
  font-weight: bold;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 5px;
}
.nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s;
}
.nav__link:hover::after {
  width: 100%;
}

.header__toggle {
  display: none; /* Hide by default */
}

/* Hero Section */
.hero {
  height: calc(100vh - var(--header-height));
  background-image: url("https://images.unsplash.com/photo-1499951360447-b19be8fe80f5?q=80&w=2070&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-text-light);
}

.hero__text {
  background-color: rgba(0, 0, 0, 0.5);
  padding: var(--space-lg) var(--space-xl);
  border-radius: 8px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-top: var(--space-md);
}

/* Content Sections */
.about,
.works,
.contact {
  padding: 100px 0;
}
.works {
  background-color: var(--color-background-light);
}

/* About Section */
.about__profile {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.about__img-wrapper {
  flex-shrink: 0;
}

.about__img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.about__name {
  font-size: 1.5rem;
  margin-top: 0;
}

/* Works Section */
.works__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.works__item {
  background-color: var(--color-background);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.works__item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.works__item-content {
  padding: var(--space-md) var(--space-lg);
}
.works__item-title {
  margin-top: 0;
  color: var(--color-text);
}
.works__item p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Contact Section */
.contact__description {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.contact__form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact__input,
.contact__textarea {
  padding: 15px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact__input:focus,
.contact__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 5px rgba(44, 62, 80, 0.2);
}

.contact__btn {
  padding: 15px 20px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s;
}
.contact__btn:hover {
  background-color: var(--color-accent);
}

/* Footer */
.footer {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  text-align: center;
  padding: var(--space-lg) 0;
}

.footer__copy {
  margin: 0;
  font-size: 0.9rem;
}

/* Animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header__nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--color-background);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  .header__nav.is-active {
    display: block;
  }
  .nav__list {
    flex-direction: column;
    padding: var(--space-md) 0;
  }
  .nav__item {
    margin: 0;
  }
  .nav__link {
    display: block;
    padding: var(--space-md) var(--space-lg);
    text-align: center;
  }
  .nav__link:hover {
    background-color: var(--color-background-light);
  }
  .nav__link::after {
    display: none;
  }

  .header__toggle {
    display: block;
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10;
  }
  .header__toggle span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transition: all 0.3s;
  }
  .header__toggle span:nth-child(1) { top: 0; }
  .header__toggle span:nth-child(2) { top: 10px; }
  .header__toggle span:nth-child(3) { bottom: 0; }
  
  .header__toggle.is-active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .header__toggle.is-active span:nth-child(2) { opacity: 0; }
  .header__toggle.is-active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

  .about__profile {
    flex-direction: column;
    text-align: center;
  }
}