/*
Theme Name: Sugimoto Portfolio
Description: A modern portfolio theme for Sugimoto Masatoshi
Author: Sugimoto Masatoshi
Version: 1.0.0
Text Domain: sugimoto-portfolio
*/

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

html, body {
  margin: 0 !important;
  padding: 0 !important;
  height: 100%;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

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

/* Header */
header {
  background: #fff;
  padding: 20px 0;
  position: relative;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

header h1 {
  flex: 0 0 auto;
}

header nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  margin-right: 60px;
}

header .instagram {
  flex: 0 0 auto;
}

header h1 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  letter-spacing: 2px;
}

header nav ul {
  display: flex;
  list-style: none;
  gap: 40px;
}

header nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

header nav a:hover {
  color: #666;
}

header .instagram {
  width: 24px;
  height: 24px;
}

/* Main Visual */
.main-visual {
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.main-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Service Section */
.service {
  padding: 80px 0;
  background: #f8f8f8;
}

.service h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 60px;
  color: #333;
}

.service-list {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 0 20px;
}

.service-item {
  flex: 1;
  text-align: center;
  background: #fff;
  padding: 40px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-item img {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  object-fit: cover;
  border-radius: 50%;
}

.service-item h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
}

.service-item h3 span {
  display: block;
  font-size: 14px;
  color: #666;
  font-weight: normal;
  margin-top: 5px;
}

.service-item p {
  font-size: 14px;
  line-height: 1.8;
  color: #666;
}

/* Works Section */
.works {
  padding: 80px 0;
  background: #fff;
}

.works h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 60px;
  color: #333;
}

.works-list {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  padding: 0 20px;
}

.works-item {
  flex: 1;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
}

.works-item:hover {
  transform: translateY(-5px);
}

.works-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.works-item:hover img {
  transform: scale(1.05);
}

.works-item p {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

/* Blog Section */
.blog {
  padding: 80px 0;
  background: #f8f8f8;
}

.blog h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 60px;
  color: #333;
}

.blog-list {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  padding: 0 20px;
}

.blog-item {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.blog-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-item:hover img {
  transform: scale(1.05);
}

.blog-item h3 {
  font-size: 16px;
  color: #333;
  margin: 20px 20px 10px;
  font-weight: 600;
}

.blog-item p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin: 0 20px;
}

.blog-item a {
  display: inline-block;
  margin: 20px 20px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.blog-item a:hover {
  color: #666;
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

footer nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 40px;
  margin-bottom: 20px;
}

footer nav a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

footer nav a:hover {
  opacity: 0.7;
}

footer p {
  font-size: 14px;
  opacity: 0.7;
}

/* Top Button */
.totop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  transition: opacity 0.3s;
}

.totop:hover {
  opacity: 0.8;
}

.totop img {
  width: 20px;
  height: 20px;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(128, 128, 128, 0.95);
  z-index: 1000;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav ul {
  list-style: none;
  text-align: center;
}

.mobile-nav li {
  margin: 30px 0;
}

.mobile-nav a {
  color: #000;
  font-size: 24px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.mobile-nav a:hover {
  color: #333;
}

.close-menu {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #000;
  font-size: 30px;
  cursor: pointer;
  transition: color 0.3s;
}

.close-menu:hover {
  color: #333;
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.animate {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.slide-in-left.animate {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.slide-in-right.animate {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease;
}

.scale-in.animate {
  opacity: 1;
  transform: scale(1);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Header Mobile */
  .header-inner {
    padding: 0 15px;
    justify-content: space-between;
  }
  
  header h1 {
    font-size: 20px;
    letter-spacing: 1px;
  }
  
  header nav {
    display: none;
    margin-right: 0;
  }
  
  .menu-toggle {
    display: flex;
    order: 2;
  }
  
  header .instagram {
    width: 20px;
    height: 20px;
    order: 3;
  }
  
  /* Main Visual Mobile */
  .main-visual {
    height: 300px;
  }
  
  /* Container Mobile */
  .container {
    padding: 0 15px;
  }
  
  .page-title {
    font-size: 32px;
    margin: 40px 0 40px;
  }
  
  /* Service Section Mobile */
  .service {
    padding: 50px 0;
  }
  
  .service h2 {
    font-size: 28px;
    margin-bottom: 40px;
  }
  
  .service-list {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }
  
  .service-item {
    padding: 30px 20px;
  }
  
  .service-item img {
    width: 60px;
    height: 60px;
  }
  
  .service-item h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .service-item p {
    font-size: 13px;
  }
  
  /* Works Section Mobile */
  .works {
    padding: 50px 0;
  }
  
  .works h2 {
    font-size: 28px;
    margin-bottom: 40px;
  }
  
  .works-list {
    flex-direction: column;
    gap: 30px;
    padding: 0 15px;
  }
  
  .works-item img {
    height: 200px;
  }
  
  .works-item p {
    font-size: 14px;
  }
  
  /* Blog Section Mobile */
  .blog {
    padding: 50px 0;
  }
  
  .blog h2 {
    font-size: 28px;
    margin-bottom: 40px;
  }
  
  .blog-list {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }
  
  .blog-item img {
    height: 150px;
  }
  
  .blog-item h3 {
    font-size: 15px;
    margin: 15px 15px 8px;
  }
  
  .blog-item p {
    font-size: 13px;
    margin: 0 15px;
  }
  
  .blog-item a {
    margin: 15px 15px 15px;
    font-size: 13px;
  }
  
  /* Footer Mobile */
  footer {
    padding: 30px 0;
  }
  
  footer nav ul {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
  }
  
  footer nav a {
    font-size: 14px;
  }
  
  footer p {
    font-size: 12px;
  }
  
  /* Top Button Mobile */
  .totop {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  .totop img {
    width: 18px;
    height: 18px;
  }
}

/* Page-specific styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-title {
  font-size: 48px;
  margin: 80px 0 60px;
  color: #333;
  font-weight: bold;
}

.current {
  color: #666 !important;
  font-weight: bold;
}

/* Contact Page */
.contact-page {
  padding: 40px 0 80px;
  background: #f8f8f8;
  min-height: 80vh;
}

.contact-intro {
  margin-bottom: 60px;
  text-align: left;
}

.contact-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 10px;
}

.contact-form {
  background: #fff;
  padding: 60px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 40px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #666;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-submit {
  text-align: center;
  margin-top: 40px;
}

.submit-btn {
  background: #666;
  color: #fff;
  padding: 15px 40px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: #555;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Blog Page */
.blog-page {
  padding: 40px 0 80px;
  background: #fff;
  min-height: 80vh;
}

.blog-article {
  margin-bottom: 80px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e0e0e0;
}

.blog-article:last-child {
  border-bottom: none;
}

.article-title {
  font-size: 32px;
  margin-bottom: 30px;
  color: #333;
  font-weight: bold;
}

.article-image {
  margin: 30px 0;
  text-align: center;
}

.article-image img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-content {
  max-width: 800px;
}

.article-content p {
  font-size: 16px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 20px;
}

/* Works Page */
.works-page {
  padding: 40px 0 80px;
  background: #f8f8f8;
  min-height: 80vh;
}

.work-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 60px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  min-height: 400px;
}

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

.work-image {
  flex: 1;
  padding: 40px;
}

.work-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.work-details {
  flex: 1;
  padding: 40px;
}

.work-title {
  font-size: 28px;
  margin-bottom: 20px;
  color: #333;
  font-weight: bold;
}

.work-meta {
  margin-bottom: 20px;
}

.work-meta p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.work-description p {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

/* About Page */
.about-page {
  padding: 40px 0 80px;
  background: #fff;
  min-height: 80vh;
}

.about-intro {
  margin-bottom: 80px;
}

.about-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
}

.career-timeline {
  margin-top: 40px;
}

.timeline-item {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
  padding-left: 20px;
  position: relative;
}

.timeline-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #666;
  font-weight: bold;
}

.about-profile {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

.profile-image {
  flex: 0 0 300px;
}

.profile-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.profile-details {
  flex: 1;
}

.profile-details h2 {
  font-size: 24px;
  margin-bottom: 30px;
  color: #333;
  font-weight: bold;
}

.profile-details p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
}

/* Header link styling */
header h1 a {
  color: #333;
  text-decoration: none;
}

header h1 a:hover {
  color: #666;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 32px;
    margin: 40px 0 40px;
  }
  
  .contact-form {
    padding: 30px 20px;
  }
  
  .work-item {
    flex-direction: column !important;
    min-height: auto;
  }
  
  .work-item:nth-child(even) {
    flex-direction: column !important;
  }
  
  .work-image,
  .work-details {
    padding: 20px;
  }
  
  .about-profile {
    flex-direction: column;
    gap: 30px;
  }
  
  .profile-image {
    flex: none;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .article-title {
    font-size: 24px;
  }
  
  .work-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  /* Extra Small Devices */
  header h1 {
    font-size: 18px;
  }
  
  .service h2,
  .works h2,
  .blog h2 {
    font-size: 24px;
  }
  
  .service-item {
    padding: 25px 15px;
  }
  
  .service-item img {
    width: 50px;
    height: 50px;
  }
  
  .service-item h3 {
    font-size: 16px;
  }
  
  .service-item p {
    font-size: 12px;
  }
  
  .main-visual {
    height: 250px;
  }
  
  .page-title {
    font-size: 28px;
    margin: 30px 0 30px;
  }
  
  .contact-form {
    padding: 20px 15px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 12px;
    font-size: 14px;
  }
  
  .submit-btn {
    padding: 12px 30px;
    font-size: 14px;
  }
}