/* ===========================
   Variables & Base
   =========================== */
:root {
  --color-primary: #FF8C42;
  --color-primary-light: #FFB347;
  --color-primary-glow: rgba(255, 140, 66, 0.3);
  --color-text: #2a2a2a;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-bg-alt: #fafafa;
  --color-border: #eaeaea;
  --font-base: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  --header-height: 72px;
  --container-width: 1120px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ===========================
   Opening Animation
   =========================== */
.opening {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 1.2s ease;
}

.opening.is-done {
  opacity: 0;
  pointer-events: none;
}

.opening__logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.6) rotate(0deg);
  animation: openingSpin 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  position: relative;
  z-index: 2;
}

/* Petal container */
.opening__petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.opening__petal {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50% 50% 50% 0;
  opacity: 0;
  will-change: transform, opacity;
}

/* Logo spin: fade in → accelerate rotation → peak at ~2.5s */
@keyframes openingSpin {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: scale(0.9) rotate(30deg);
  }
  40% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.05) rotate(540deg);
  }
  85% {
    opacity: 1;
    transform: scale(1.1) rotate(690deg);
  }
  100% {
    opacity: 1;
    transform: scale(1.1) rotate(720deg);
  }
}

/* ===========================
   Utility
   =========================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.sp-only {
  display: none;
}

/* ===========================
   Floating Logo Decorations
   =========================== */
.floating-logos {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-logo {
  position: absolute;
  width: 60px;
  height: 60px;
  object-fit: contain;
  opacity: 0;
  will-change: transform, opacity;
}

/* ===========================
   Scroll Animations
   =========================== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }
.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ===========================
   Button
   =========================== */
.btn {
  display: inline-block;
  padding: 16px 48px;
  border: none;
  border-radius: 60px;
  font-family: var(--font-base);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-3px);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(255, 140, 66, 0.05);
  transform: translateY(-3px);
}

.btn--glow {
  box-shadow: 0 4px 24px var(--color-primary-glow);
}

.btn--glow:hover {
  box-shadow: 0 8px 40px var(--color-primary-glow);
}

.btn--full {
  display: block;
  width: 100%;
  text-align: center;
}

.btn--instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ===========================
   Header
   =========================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: background var(--transition-slow),
              box-shadow var(--transition-slow),
              border-color var(--transition-slow);
  background: transparent;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
}

.header__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.header__logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.header:not(.is-scrolled) .header__logo {
  color: var(--color-text);
}

.header__nav {
  display: flex;
  gap: 36px;
}

.header__nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.header:not(.is-scrolled) .header__nav-link {
  color: var(--color-text-light);
}

.header:not(.is-scrolled) .header__nav-link:hover {
  color: var(--color-primary);
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.header__nav-link:hover::after,
.header__nav-link.is-active::after {
  width: 100%;
}

.header__nav-link:hover {
  color: var(--color-primary);
}

/* Hamburger */
.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.header:not(.is-scrolled) .header__hamburger span {
  background: var(--color-text);
}

.header__hamburger.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.header__hamburger.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===========================
   Hero
   =========================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--header-height) 24px 0;
  text-align: center;
  background: #FFFAF5;
  overflow: hidden;
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

/* ---- Depth background layers ---- */
.hero__depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__depth-layer {
  position: absolute;
  inset: -20%;
  will-change: transform;
}

/* Far layer — large soft gradient, deepest */
.hero__depth-layer--far {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(255, 224, 178, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(255, 200, 150, 0.25) 0%, transparent 70%),
    radial-gradient(ellipse 90% 80% at 50% 50%, rgba(255, 245, 238, 0.5) 0%, transparent 80%);
  filter: blur(40px);
  transform: translateZ(-300px) scale(1.6);
  animation: depthDriftFar 25s ease-in-out infinite alternate;
}

/* Mid layer — medium texture */
.hero__depth-layer--mid {
  background:
    radial-gradient(ellipse 50% 40% at 70% 25%, rgba(255, 179, 71, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 45% 50% at 25% 75%, rgba(255, 140, 66, 0.12) 0%, transparent 65%),
    radial-gradient(circle at 50% 50%, rgba(255, 230, 200, 0.15) 0%, transparent 50%);
  filter: blur(20px);
  transform: translateZ(-150px) scale(1.3);
  animation: depthDriftMid 18s ease-in-out infinite alternate;
}

/* Near layer — sharper, subtle geometric hint */
.hero__depth-layer--near {
  background:
    radial-gradient(ellipse 30% 30% at 15% 20%, rgba(255, 140, 66, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 25% 25% at 85% 80%, rgba(255, 179, 71, 0.06) 0%, transparent 70%);
  filter: blur(8px);
  transform: translateZ(-50px) scale(1.1);
  animation: depthDriftNear 12s ease-in-out infinite alternate;
}

@keyframes depthDriftFar {
  0%   { transform: translateZ(-300px) scale(1.6) translate(0, 0); }
  100% { transform: translateZ(-300px) scale(1.6) translate(15px, -10px); }
}

@keyframes depthDriftMid {
  0%   { transform: translateZ(-150px) scale(1.3) translate(0, 0); }
  100% { transform: translateZ(-150px) scale(1.3) translate(-12px, 8px); }
}

@keyframes depthDriftNear {
  0%   { transform: translateZ(-50px) scale(1.1) translate(0, 0); }
  100% { transform: translateZ(-50px) scale(1.1) translate(8px, -6px); }
}

/* Vignette — darkens edges for depth focus */
.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 70% 65% at 50% 50%,
    transparent 0%,
    rgba(255, 250, 245, 0.3) 60%,
    rgba(245, 235, 225, 0.6) 100%
  );
}

/* Floating works images — 3 depth layers */
.hero__works-float {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero__work-item {
  position: absolute;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-border);
  pointer-events: auto;
  will-change: transform, opacity;
  transition: opacity 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
}

/* Back layer — small, blurred, faint */
.hero__work-item[data-layer="back"] {
  z-index: 1;
  opacity: 0.18;
  filter: blur(2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border-radius: 8px;
}

.hero__work-item[data-layer="back"]:hover {
  opacity: 0.5;
  filter: blur(0px);
  box-shadow: 0 8px 32px rgba(255, 140, 66, 0.12);
}

/* Middle layer — medium, subtle blur */
.hero__work-item[data-layer="mid"] {
  z-index: 2;
  opacity: 0.3;
  filter: blur(0.5px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  border-radius: 10px;
}

.hero__work-item[data-layer="mid"]:hover {
  opacity: 0.7;
  filter: blur(0px);
  box-shadow: 0 12px 40px rgba(255, 140, 66, 0.18);
}

/* Front layer — large, sharp, prominent */
.hero__work-item[data-layer="front"] {
  z-index: 3;
  opacity: 0.45;
  filter: blur(0px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
  border-radius: 14px;
}

.hero__work-item[data-layer="front"]:hover {
  opacity: 0.9;
  box-shadow: 0 20px 60px rgba(255, 140, 66, 0.25);
}

/* Ambient glow orbs */
.hero__glows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  /* filter: blur set per-orb via JS for depth variation */
}

.hero__content {
  position: relative;
  z-index: 4;
  max-width: 800px;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.8),
               0 0 80px rgba(255, 255, 255, 0.6);
}

/* ---- Staggered entrance animation ---- */
.hero__stagger {
  opacity: 0;
  transform: translateY(32px);
  animation: heroSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 1. Subtitle  2. Title  3. Description  4. Buttons */
.hero__stagger:nth-child(1) { animation-delay: 0.3s; }
.hero__stagger:nth-child(2) { animation-delay: 0.5s; }
.hero__stagger:nth-child(3) { animation-delay: 0.7s; }
.hero__stagger:nth-child(4) { animation-delay: 0.9s; }

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

/* Title words — additional per-word reveal inside the staggered title */
.hero__title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%);
  animation: heroWordPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__title-word:nth-child(1) { animation-delay: 0.6s; }
.hero__title-word:nth-child(2) { animation-delay: 0.8s; }
.hero__title-word:nth-child(3) { animation-delay: 1.0s; }

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

/* ---- Subtitle ---- */
.hero__subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero__subtitle-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-primary);
  opacity: 0.4;
}

/* ---- Title ---- */
.hero__title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 24px;
  color: var(--color-text);
}

.hero__title-line {
  display: block;
  overflow: hidden;
}

/* ---- Title & Description hover ---- */
.hero__title--hoverable,
.hero__desc--hoverable {
  transition: color 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.hero__title--hoverable:hover {
  color: var(--color-primary);
  transform: translateY(0) scale(1.02);
}

.hero__desc--hoverable:hover {
  color: var(--color-primary);
  transform: translateY(0) scale(1.02);
}

/* ---- Description ---- */
.hero__description {
  font-size: 16px;
  color: var(--color-text-light);
  margin-bottom: 48px;
  line-height: 1.8;
}

/* ---- Hero Buttons ---- */
.hero__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  opacity: 0;
  animation: heroFadeUp 0.8s 1.8s forwards;
}

.hero__scroll span {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(42, 42, 42, 0.3);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(42, 42, 42, 0.3), transparent);
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.3; }
}

/* ===========================
   Section
   =========================== */
.section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

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

.section__title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  margin: 20px auto 56px;
  border-radius: 2px;
}

.section__lead {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 48px;
  font-size: 15px;
}

/* ===========================
   About
   =========================== */
.about__bg-logo {
  position: absolute;
  top: -10%;
  right: -15%;
  width: 75%;
  height: auto;
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;
  animation: aboutLogoSpin 75s linear infinite;
}

@keyframes aboutLogoSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.about {
  display: flex;
  align-items: center;
  gap: 56px;
  max-width: 900px;
  margin: 0 auto;
}

.about__photo {
  flex-shrink: 0;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-border);
  background: var(--color-bg-alt);
  position: relative;
}

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

/* Placeholder when image not found */
.about__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eee, #ddd);
}

.about__photo--placeholder::after {
  content: 'Photo';
  font-size: 14px;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about__text {
  flex: 1;
}

.about__text p {
  margin-bottom: 20px;
  line-height: 2.1;
  font-size: 15px;
}

.about__text p:last-child {
  margin-bottom: 0;
}

/* About text scroll animation */
.about__text-anim {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.about__text-anim:nth-child(2) { transition-delay: 0.15s; }
.about__text-anim:nth-child(3) { transition-delay: 0.3s; }

.about__text-anim.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===========================
   Skills & Career Layout
   =========================== */
.sc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.sc-layout__skills,
.sc-layout__career {
  min-width: 0;
}

/* ===========================
   Skills
   =========================== */
.skills-block {
  margin-bottom: 48px;
}

.skills-block:last-child {
  margin-bottom: 0;
}

.skills-block__heading {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 28px;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skills-block__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tag {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 60px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.2);
  transition: transform var(--transition), box-shadow var(--transition);
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 140, 66, 0.3);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.skill-card {
  padding: 20px 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.skill-card:hover {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.skill-card__name {
  font-size: 13px;
  font-weight: 600;
}

/* ===========================
   Timeline
   =========================== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-border));
}

.timeline__item {
  position: relative;
  padding-bottom: 40px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--color-primary);
  box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.15);
  transition: all var(--transition);
}

.timeline__item:hover::before {
  background: var(--color-primary);
  box-shadow: 0 0 0 8px rgba(255, 140, 66, 0.15);
}

.timeline__year {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  padding: 2px 12px;
  background: rgba(255, 140, 66, 0.08);
  border-radius: 4px;
}

.timeline__content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline__content p {
  font-size: 13px;
  color: var(--color-text-light);
}

/* ===========================
   Tree Growth Animation
   =========================== */
.tree-grow {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 160px;
  height: 400px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.tree-grow__trunk {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: none;
}

.tree-grow__branch {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: none;
}

.tree-grow__leaf {
  transform-origin: center;
  transform: scale(0);
  transition: none;
}

/* Animate when visible */
.tree-grow.is-visible .tree-grow__trunk {
  animation: treeDraw 2s ease forwards;
}

.tree-grow.is-visible .tree-grow__branch--1 {
  animation: branchDraw 0.8s 1.5s ease forwards;
}
.tree-grow.is-visible .tree-grow__branch--2 {
  animation: branchDraw 0.8s 1.8s ease forwards;
}
.tree-grow.is-visible .tree-grow__branch--3 {
  animation: branchDraw 0.8s 2.1s ease forwards;
}
.tree-grow.is-visible .tree-grow__branch--4 {
  animation: branchDraw 0.8s 2.4s ease forwards;
}

.tree-grow.is-visible .tree-grow__leaf--1  { animation: leafPop 0.4s 2.5s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--2  { animation: leafPop 0.4s 2.6s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--3  { animation: leafPop 0.4s 2.7s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--4  { animation: leafPop 0.4s 2.8s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--5  { animation: leafPop 0.4s 2.9s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--6  { animation: leafPop 0.4s 3.0s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--7  { animation: leafPop 0.4s 3.1s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--8  { animation: leafPop 0.4s 3.2s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--9  { animation: leafPop 0.4s 3.3s ease forwards; }
.tree-grow.is-visible .tree-grow__leaf--10 { animation: leafPop 0.4s 3.4s ease forwards; }

@keyframes treeDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes branchDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes leafPop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@media (max-width: 768px) {
  .tree-grow {
    width: 100px;
    height: 260px;
    opacity: 0.15;
  }
}

/* ===========================
   Works
   =========================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.work-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition-slow);
  cursor: pointer;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.work-card__thumb {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.work-card__thumb--1 { background: linear-gradient(135deg, #FF8C42 0%, #FFB347 50%, #FFD89B 100%); }
.work-card__thumb--2 { background: linear-gradient(135deg, #FFB347 0%, #FFD89B 50%, #FFF0DB 100%); }
.work-card__thumb--3 { background: linear-gradient(135deg, #FF8C42 0%, #FF6B6B 100%); }
.work-card__thumb--4 { background: linear-gradient(135deg, #FFB347 0%, #FF8C42 100%); }
.work-card__thumb--5 { background: linear-gradient(135deg, #FFD89B 0%, #FFB347 50%, #FF8C42 100%); }
.work-card__thumb--6 { background: linear-gradient(135deg, #FF6B6B 0%, #FFB347 50%, #FFD89B 100%); }

.work-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.work-card:hover .work-card__overlay {
  opacity: 1;
}

.work-card__view {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 10px 28px;
  border: 2px solid #fff;
  border-radius: 60px;
  transform: translateY(8px);
  transition: transform var(--transition);
}

.work-card:hover .work-card__view {
  transform: translateY(0);
}

.work-card__body {
  padding: 24px;
}

.work-card__category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.work-card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.work-card__desc {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Works page */
.works-page {
  padding-top: calc(var(--header-height) + 60px);
}

.works-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.works-tab {
  padding: 10px 28px;
  border: 2px solid var(--color-border);
  border-radius: 60px;
  background: transparent;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.works-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.works-tab.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

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

/* Works More button */
.works-more {
  text-align: center;
  margin-top: 48px;
}

/* ===========================
   Service
   =========================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.service-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 28px;
  text-align: center;
  border: 1px solid var(--color-border);
  transition: all var(--transition-slow);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.service-card__icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.service-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.service-card__desc {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.8;
}

.service-cta {
  text-align: center;
  margin-top: 8px;
}

/* ===========================
   Blog
   =========================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}

.blog-card__thumb {
  height: 180px;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__thumb {
  transform: scale(1.03);
}

.blog-card__thumb--1 { background: linear-gradient(135deg, #f0f0f0, #ddd); }
.blog-card__thumb--2 { background: linear-gradient(135deg, #e8e8e8, #ccc); }
.blog-card__thumb--3 { background: linear-gradient(135deg, #ddd, #f0f0f0); }

.blog-card__body {
  padding: 24px;
}

.blog-card__date {
  font-size: 12px;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
}

.blog-card__title {
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
  line-height: 1.6;
  transition: color var(--transition);
}

.blog-card:hover .blog-card__title {
  color: var(--color-primary);
}

/* ===========================
   Form
   =========================== */
.form {
  margin-top: 8px;
}

.form__group {
  margin-bottom: 28px;
}

.form__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.form__required {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: var(--color-primary);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-base);
  font-size: 15px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 140px;
}

/* ===========================
   Footer
   =========================== */
.footer {
  padding: 48px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border);
  letter-spacing: 0.02em;
}

/* ===========================
   Work Detail Page
   =========================== */
.work-detail {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
}

.work-detail__hero {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 40px;
}

.work-detail__hero-placeholder {
  width: 100%;
  height: 360px;
  border-radius: 16px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.1em;
}

.work-detail__header {
  margin-bottom: 48px;
}

.work-detail__category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  padding: 6px 20px;
  border-radius: 60px;
  margin-bottom: 16px;
}

.work-detail__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.work-detail__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
  padding: 32px;
  background: var(--color-bg-alt);
  border-radius: 16px;
  border: 1px solid var(--color-border);
}

.work-detail__meta-item {
  text-align: center;
}

.work-detail__meta-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.work-detail__meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.6;
}

.work-detail__meta-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.work-detail__tool-tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 60px;
  color: var(--color-text);
}

.work-detail__section {
  margin-bottom: 56px;
}

.work-detail__section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--color-primary);
  color: var(--color-text);
}

.work-detail__section-text {
  font-size: 15px;
  line-height: 2;
  color: var(--color-text);
}

.work-detail__gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.work-detail__gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-detail__gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.work-detail__gallery img:first-child:last-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.work-detail__gallery-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.work-detail__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.work-detail__highlight-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(255, 140, 66, 0.08);
  border: 1.5px solid rgba(255, 140, 66, 0.3);
  border-radius: 60px;
  letter-spacing: 0.02em;
}

.work-detail__highlight-tag::before {
  content: '✓';
  font-size: 11px;
  font-weight: 700;
}

.work-detail__result {
  margin-bottom: 56px;
  padding: 32px 36px;
  background: linear-gradient(135deg, rgba(255, 140, 66, 0.06) 0%, rgba(255, 179, 71, 0.04) 100%);
  border-radius: 16px;
  border-left: 4px solid var(--color-primary);
}

.work-detail__result-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.work-detail__result-text {
  font-size: 15px;
  line-height: 2;
  color: var(--color-text);
}

.work-detail__site-link {
  text-align: center;
  margin-bottom: 80px;
}

.work-detail__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 80px;
}

.work-detail__nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: color var(--transition);
  max-width: 40%;
}

.work-detail__nav-item:hover {
  color: var(--color-primary);
}

.work-detail__nav-item--next {
  text-align: right;
  margin-left: auto;
}

.work-detail__nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.work-detail__nav-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.work-detail__cta {
  text-align: center;
  padding: 64px 0 0;
}

.work-detail__cta-text {
  font-size: 15px;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  .works-grid,
  .works-grid--page,
  .blog-grid,
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sc-layout {
    grid-template-columns: 1fr;
    gap: 64px;
  }
}

@media (max-width: 768px) {
  .sp-only {
    display: inline;
  }

  .header__hamburger {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: rgba(26, 26, 46, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
  }

  .header__nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .header__nav.is-open .header__nav-link {
    color: rgba(255, 255, 255, 0.85);
  }

  .header__nav.is-open .header__nav-link:hover {
    color: var(--color-primary-light);
  }

  .header__nav-link {
    font-size: 18px;
    letter-spacing: 0.1em;
  }

  .section {
    padding: 80px 0;
  }

  .section__title {
    font-size: 26px;
  }

  .section__title::after {
    margin: 16px auto 40px;
  }

  .hero__title {
    font-size: 28px;
  }

  .hero__subtitle {
    font-size: 12px;
  }

  .hero__scroll {
    display: none;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .about {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .about__bg-logo {
    width: 90%;
    right: -25%;
    top: 5%;
    opacity: 0.06;
  }

  .about__photo {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .header__logo-img {
    width: 32px;
    height: 32px;
  }

  .sc-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .timeline {
    padding-left: 36px;
  }

  .works-grid,
  .works-grid--page,
  .blog-grid,
  .service-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .works-tabs {
    gap: 8px;
  }

  .works-tab {
    padding: 8px 18px;
    font-size: 13px;
  }

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

  .work-card__thumb {
    height: 180px;
  }

  .hero__work-item[data-layer="back"] { border-radius: 6px; }
  .hero__work-item[data-layer="mid"] { border-radius: 8px; }
  .hero__work-item[data-layer="front"] { border-radius: 10px; }

  .floating-logo {
    width: 36px;
    height: 36px;
  }

  .work-detail__title {
    font-size: clamp(22px, 5vw, 28px);
  }

  .work-detail__gallery {
    grid-template-columns: 1fr;
  }

  .work-detail__gallery img:first-child:last-child {
    aspect-ratio: 4 / 3;
  }

  .work-detail__result {
    padding: 24px 20px;
  }

  .work-detail__meta {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }

  .work-detail__nav {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }

  .work-detail__nav-item--next {
    text-align: left;
    margin-left: 0;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
  }

  .work-detail__hero-placeholder {
    height: 220px;
  }
}
