/* ========================================
   Jeffrey Jin - Personal Website
   ======================================== */

:root {
  --bg-primary: #fafaf9;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e5e5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 500;
}

.wave {
  display: inline-block;
  animation: wave-anim 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave-anim {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
}

.name-highlight {
  display: inline-block;
  cursor: default;
}

.ripple-letter {
  display: inline-block;
  background: linear-gradient(135deg, #0d9488, #14b8a6, #2dd4bf, #06b6d4);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glass-shimmer 4s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.35s ease;
  filter: drop-shadow(0 0 0px transparent);
}

.ripple-letter:hover {
  transform: translateY(-3px) scale(1.08);
  filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.5));
}

.ripple-letter.ripple-active {
  animation: glass-shimmer 4s ease-in-out infinite,
             liquid-ripple 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes glass-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes liquid-ripple {
  0% {
    transform: translateY(0) scaleX(1) scaleY(1);
    filter: drop-shadow(0 0 0px transparent) blur(0px);
  }
  20% {
    transform: translateY(-6px) scaleX(0.92) scaleY(1.12);
    filter: drop-shadow(0 0 12px rgba(20, 184, 166, 0.6)) blur(0.5px);
  }
  40% {
    transform: translateY(3px) scaleX(1.06) scaleY(0.94);
    filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.4)) blur(0px);
  }
  60% {
    transform: translateY(-2px) scaleX(0.97) scaleY(1.04);
    filter: drop-shadow(0 0 4px rgba(20, 184, 166, 0.3)) blur(0px);
  }
  80% {
    transform: translateY(1px) scaleX(1.01) scaleY(0.99);
  }
  100% {
    transform: translateY(0) scaleX(1) scaleY(1);
    filter: drop-shadow(0 0 0px transparent) blur(0px);
  }
}

/* Social Links */
.social-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social-links a {
  color: var(--text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* Hero Image */
.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.03);
}

/* Content */
.content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.content a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.content a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Section Blocks */
.section-block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.section-block h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

/* Lists */
.content ul {
  list-style: none;
  padding: 0;
}

.content ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.skill-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skill-items {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Hobbies */
.hobbies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hobby {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hobby:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.fun-fact {
  margin-top: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #eff6ff, #f0f0ff);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  font-size: 0.98rem;
}

/* Last Section */
.last-block {
  padding-bottom: 0;
}

.last-block p {
  font-size: 1.1rem;
}

/* Footer */
footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer .updated {
  font-size: 0.82rem;
  margin-top: 4px;
}

.heart {
  color: #ef4444;
}

/* Responsive */
@media (max-width: 680px) {
  .container {
    padding: 32px 18px 28px;
  }

  .hero {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .social-links {
    justify-content: center;
  }

  .hero-image img {
    width: 160px;
    height: 160px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hobbies {
    justify-content: center;
  }

  .content ul li {
    font-size: 0.96rem;
  }
}

@media (max-width: 400px) {
  .hero-text h1 {
    font-size: 1.35rem;
  }

  .hero-image img {
    width: 130px;
    height: 130px;
  }
}
