/* ==========================================================================
   home.css — Home Page Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Cursor Glow
   -------------------------------------------------------------------------- */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

@media (hover: none) {
  #cursor-glow { display: none; }
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--c-bg);
}

/* Ambient background glows */
.hero-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-1 {
  position: absolute;
  top: -20%;
  right: -10%;
  width: clamp(400px, 60vw, 800px);
  height: clamp(400px, 60vw, 800px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 65%);
  animation: ambientFloat1 14s ease-in-out infinite;
}

.ambient-2 {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: clamp(300px, 50vw, 600px);
  height: clamp(300px, 50vw, 600px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 65%);
  animation: ambientFloat2 18s ease-in-out infinite;
}

@keyframes ambientFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(40px, -30px) scale(1.08); }
  50%      { transform: translate(10px, 20px) scale(0.96); }
  75%      { transform: translate(-30px, -10px) scale(1.04); }
}

@keyframes ambientFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(-20px, 40px) scale(1.06); }
  50%      { transform: translate(30px, -10px) scale(0.94); }
  75%      { transform: translate(10px, 30px) scale(1.02); }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding-inline: var(--container-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.hero-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
  text-transform: uppercase;
  /* GSAP initial */
  opacity: 0;
  transform: translateY(20px);
}

.hero-headline {
  font-family: var(--font-ja);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: var(--grad-full);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradientShift 8s ease-in-out infinite;
  padding-bottom: 0.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50%      { background-position: 100% center; }
}

.headline-line {
  display: block;
  overflow: hidden; /* for line reveal animation */
  padding-bottom: 0.2em;
}

.hero-en {
  font-family: var(--font-en);
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 300;
  color: var(--c-text-muted);
  letter-spacing: 0.05em;
  font-style: italic;
  opacity: 0;
  transform: translateY(20px);
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  opacity: 0;
  transform: translateY(20px);
}

.hero-name {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: 0.04em;
}

.hero-name-sep {
  color: var(--c-text-faint);
  font-weight: 300;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: clamp(24px, 4vh, 48px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  animation: fadeIn 0.8s 2s forwards;
  cursor: pointer;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.scroll-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-faint);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--c-text-faint);
  position: relative;
  overflow: hidden;
}

.scroll-dot {
  position: absolute;
  top: -6px;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%   { top: -6px; opacity: 1; }
  80%  { top: 100%; opacity: 0.3; }
  100% { top: -6px; opacity: 0; }
}

/* --------------------------------------------------------------------------
   WORKS FEATURED GRID
   -------------------------------------------------------------------------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* Featured card is larger */
.work-card--featured {
  grid-column: 1;
  grid-row: 1;
}

/* Work Card */
.work-card {
  display: flex;
  flex-direction: column;
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-mid) var(--ease-smooth);
  cursor: pointer;
}

.work-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-6px);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
}

.work-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Thumbnail */
.work-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

.work-card-thumb-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Islay card thumbnail — emerald/ocean feel */
.islay-thumb {
  background: linear-gradient(135deg, #0a1628 0%, #0d2137 40%, #0f3460 100%);
}

.islay-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 30% 50%, rgba(34, 197, 94, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* ohmatching card thumbnail — deep blue professional */
.ohmatching-thumb {
  background: linear-gradient(135deg, #0d1b2a 0%, #162032 100%);
}

.ohmatching-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 8px 24px rgba(59, 130, 246, 0.3));
}

/* Blog card thumbnail — warm editorial */
.blog-thumb {
  background: linear-gradient(135deg, #1a0a00 0%, #2a1200 100%);
}

.blog-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 60% 40%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 70%, rgba(247, 147, 30, 0.08) 0%, transparent 50%);
}

.thumb-label {
  position: relative;
  z-index: 1;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: -0.02em;
}

.work-card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

/* Card Body */
.work-card-body {
  flex: 1;
  padding: var(--space-5) var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.work-card-cat {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.work-card-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color var(--dur-fast);
}

.work-card:hover .work-card-title {
  color: var(--c-accent);
}

.work-card-title-en {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  letter-spacing: 0.02em;
  margin-top: -var(--space-2);
}

.work-card-desc {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.7;
}

.work-card-tech {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: auto;
}

/* Card Footer */
.work-card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.work-card-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text-muted);
  transition: all var(--dur-fast);
}

.work-card:hover .work-card-cta {
  color: var(--c-accent);
  gap: var(--space-3);
}

/* Responsive works grid */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .work-card--featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
  .work-card--featured {
    grid-column: 1;
  }
}

/* --------------------------------------------------------------------------
   ABOUT SNAPSHOT
   -------------------------------------------------------------------------- */
#about-snap {
  background: var(--c-bg-2);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.about-snap-inner {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

/* Photo */
.about-snap-photo {
  position: relative;
}

.photo-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform var(--dur-slow) var(--ease-smooth);
}

.about-snap-photo:hover .profile-photo {
  transform: scale(1.03);
}

.photo-frame {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* Floating badge */
.photo-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  white-space: nowrap;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* About text */
.about-lead {
  font-size: var(--fs-lg);
  line-height: 1.8;
  color: var(--c-text-muted);
  margin-bottom: var(--space-5);
}

.about-lead strong {
  color: var(--c-text);
}

/* Stats */
.about-stats {
  display: flex;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.2em;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  letter-spacing: 0.05em;
  font-family: var(--font-en);
}

/* Education */
.about-education {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-left: var(--space-4);
  border-left: 2px solid var(--c-border);
}

.edu-item {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.edu-year {
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  white-space: nowrap;
  padding-top: 3px;
  min-width: 100px;
}

.edu-degree {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.01em;
}

.edu-school {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  margin-top: 2px;
}

.about-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .about-snap-inner {
    grid-template-columns: 1fr;
  }
  .about-snap-photo {
    max-width: 300px;
    margin: 0 auto;
  }
  .photo-badge {
    right: 0;
  }
}

/* --------------------------------------------------------------------------
   SKILLS PREVIEW
   -------------------------------------------------------------------------- */
#skills-preview {
  background: var(--c-bg);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: var(--space-6);
}

.skill-group {
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
}

.skill-group-title {
  margin-bottom: var(--space-4);
  color: var(--c-accent);
}

/* Skill bars */
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.skill-bar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.skill-name {
  font-family: var(--font-en);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  min-width: 80px;
}

.skill-bar-track {
  flex: 1;
  height: 3px;
  background: var(--c-bg-4);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: 0; /* animated via JS */
  background: var(--grad-warm);
  border-radius: var(--radius-full);
  transition: width 1.2s var(--ease-out);
}

/* Skill tags */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-en);
  font-size: var(--fs-xs);
  font-weight: 500;
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  transition: all var(--dur-fast);
}

.skill-tag:hover {
  color: var(--c-text);
  border-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   WHAT'S NEW
   -------------------------------------------------------------------------- */
#whats-new {
  background: var(--c-bg-2);
  border-top: 1px solid var(--c-border);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--c-border);
  transition: background var(--dur-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: var(--glass-bg);
  margin-inline: calc(-1 * var(--space-4));
  padding-inline: var(--space-4);
  border-radius: var(--radius-md);
}

.news-date {
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  white-space: nowrap;
  min-width: 80px;
}

.news-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.news-tag {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-en);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: rgba(255, 107, 53, 0.1);
  color: var(--c-accent);
  border: 1px solid rgba(255, 107, 53, 0.2);
  white-space: nowrap;
}

.news-text {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.news-text strong {
  color: var(--c-text);
}

.news-arrow {
  color: var(--c-text-faint);
  font-size: 18px;
  flex-shrink: 0;
  transition: all var(--dur-fast);
}

.news-item:hover .news-arrow {
  color: var(--c-accent);
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   CONTACT CTA
   -------------------------------------------------------------------------- */
#contact-cta {
  background: var(--c-bg);
}

.cta-block {
  position: relative;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  background: var(--c-bg-2);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-eyebrow {
  margin-bottom: var(--space-3);
}

.cta-heading {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: var(--space-5);
}

.cta-sub {
  font-size: var(--fs-md);
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-7);
}

.cta-btn {
  font-size: var(--fs-md);
  padding: 16px 40px;
}

/* --------------------------------------------------------------------------
   FOOTER extras
   -------------------------------------------------------------------------- */
.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--c-border);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 18px;
  transition: all var(--dur-mid) var(--ease-smooth);
}

.footer-social:hover {
  color: var(--c-accent);
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.15);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   Responsive fixes
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .about-stats {
    gap: var(--space-5);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
  }

  .footer-lang {
    justify-content: center;
  }

  .section-header {
    flex-wrap: wrap;
  }

  .section-header .btn-sm {
    width: 100%;
    margin-left: 0 !important;
    justify-content: center;
  }
}
