/* ============================================
   Victor Jaepyo Jo — Portfolio Style Sheet
   Design: Dark Glass · Apple/Linear Inspired
   Font: Pretendard Variable
   ============================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');

/* ---- Custom Properties ---- */
:root {
  --bg-primary: #06060e;
  --bg-secondary: #0b0d14;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.1);
  --text-primary: #edf0f7;
  --text-secondary: #8b95a8;
  --text-tertiary: #5a6478;
  --gradient-start: #4a9eff;
  --gradient-mid: #7c6df0;
  --gradient-end: #a78bfa;
  --gradient-hero: linear-gradient(135deg, var(--text-primary) 30%, var(--gradient-start) 60%, var(--gradient-end) 100%);
  --gradient-accent: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  --accent-blue: #4a9eff;
  --accent-purple: #a78bfa;
  --accent-green: #34d399;
  --accent-orange: #fb923c;
  --accent-cyan: #22d3ee;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-width: 1200px;
  --nav-height: 64px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 60px rgba(74, 158, 255, 0.04);
  --shadow-glow: 0 0 60px rgba(74, 158, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
}

/* ---- Screen Shell ---- */
.screen-shell {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  word-break: break-word;
  overflow-wrap: break-word;
}

::selection {
  background: rgba(74, 158, 255, 0.3);
  color: var(--text-primary);
}

/* ---- Ambient Background ---- */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.ambient-bg::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 158, 255, 0.07) 0%, transparent 60%);
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  animation: ambientFloat 10s ease-in-out infinite;
}

.ambient-bg::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 109, 240, 0.05) 0%, transparent 60%);
  bottom: -10%;
  right: -10%;
  animation: ambientFloat 14s ease-in-out infinite reverse;
}

@keyframes ambientFloat {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

/* Noise texture overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
}

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  overflow: hidden;
}

/* ---- Navigation ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  background: rgba(6, 6, 14, 0.6);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

nav.scrolled {
  background: rgba(6, 6, 14, 0.85);
  border-bottom-color: var(--glass-border-strong);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-links a.active {
  color: var(--text-primary);
  background: rgba(74, 158, 255, 0.08);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
  transform-origin: center;
}

/* ---- Hero Section ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 158, 255, 0.1) 0%, transparent 60%);
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  animation: heroPulse 6s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 1rem;
  background: rgba(74, 158, 255, 0.08);
  border: 1px solid rgba(74, 158, 255, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-blue);
  margin-bottom: 2rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.hero .location {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.hero .bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-primary);
}

.hero-links a:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.hero-links a.primary-link {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.12), rgba(124, 109, 240, 0.12));
  border-color: rgba(74, 158, 255, 0.25);
  color: var(--accent-blue);
}

.hero-links a.primary-link:hover {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(124, 109, 240, 0.2));
  border-color: rgba(74, 158, 255, 0.4);
}

.hero-links svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- Section ---- */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ---- Projects Grid ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.15), transparent 50%, rgba(167, 139, 250, 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-visibility {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}

.project-visibility.public {
  color: var(--accent-green);
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.08);
}

.project-repo {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-family: 'Pretendard Variable', ui-monospace, monospace;
  margin-bottom: 0.75rem;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tag {
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag.ts {
  background: rgba(49, 120, 198, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(49, 120, 198, 0.18);
}

.tag.rust {
  background: rgba(239, 84, 46, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(239, 84, 46, 0.18);
}

.tag.py {
  background: rgba(255, 217, 61, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(255, 217, 61, 0.18);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.project-link:hover {
  color: var(--accent-purple);
  gap: 0.5rem;
}

.project-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ---- Contributions ---- */
.contributions-list {
  display: grid;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.contribution-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.75rem;
  transition: all var(--transition);
  backdrop-filter: blur(12px);
}

.contribution-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  transform: translateX(3px);
}

.contribution-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.contribution-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pr-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-green);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
}

.pr-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color var(--transition-fast);
  margin-left: auto;
}

.pr-link:hover {
  color: var(--accent-blue);
}

.pr-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.pr-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pr-details li {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding-left: 1rem;
  position: relative;
}

.pr-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

/* ---- Video Section ---- */
.video-wrapper {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- Demo / Philosophy ---- */
.demo-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.demo-statement {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.demo-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.demo-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.demo-stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-stat-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ---- About Page ---- */
.about-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.about-hero .hero-content {
  max-width: 600px;
}

.about-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.about-hero .location {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

.about-content .lead {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-weight: 450;
}

.about-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.about-section-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.12), rgba(124, 109, 240, 0.12));
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

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

/* ---- Skills Grid ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-bottom: 2rem;
  max-width: 100%;
  overflow: hidden;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.skill-chip:hover {
  border-color: rgba(74, 158, 255, 0.25);
  color: var(--text-primary);
  transform: translateY(-1px);
  background: var(--bg-card-hover);
}

.skill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skill-dot.ts { background: #60a5fa; }
.skill-dot.rust { background: #fb923c; }
.skill-dot.py { background: #fbbf24; }
.skill-dot.infra { background: var(--accent-green); }
.skill-dot.ai { background: var(--accent-purple); }

/* About links */
.about-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-primary);
}

.about-links a:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.about-links svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin-top: 4rem;
}

footer p {
  margin-bottom: 0.35rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.83rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-blue);
}

/* ---- Scroll-triggered Animations ---- */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-in.visible,
.animate-in.no-animate {
  opacity: 1;
  transform: translateY(0);
}

.animate-in-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger delays for grid children */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children > *:nth-child(4) { transition-delay: 240ms; }
.stagger-children > *:nth-child(5) { transition-delay: 320ms; }
.stagger-children > *:nth-child(6) { transition-delay: 400ms; }

/* ---- Selection colors for code-like elements ---- */
code, pre {
  font-family: 'Pretendard Variable', ui-monospace, SFMono-Regular, monospace;
}

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

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  nav {
    padding: 0 1.25rem;
  }

  .hero {
    padding: 6rem 0 4rem;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 4rem 0;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 80vh;
  }

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

  .container {
    padding: 0 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-links {
    flex-direction: column;
    align-items: center;
  }

  .hero-links a {
    width: 100%;
    justify-content: center;
  }

  .projects-grid {
    gap: 1rem;
  }

  .project-card {
    padding: 1.25rem;
  }

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

  .contribution-card {
    padding: 1.15rem 1.25rem;
  }

  .about-links {
    flex-direction: column;
    align-items: stretch;
  }

  .about-links a {
    justify-content: center;
  }

  .demo-stats {
    gap: 2rem;
  }

  .demo-stat-value {
    font-size: 1.8rem;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-in,
  .animate-in-left {
    opacity: 1;
    transform: none;
  }
}
