/* 01-minimal-portfolio — 林雅文 UI/UX Designer */

:root {
  --bg: #FAFAFA;
  --text: #09090B;
  --accent: #2563EB;
  --muted: #71717A;
  --border: #E4E4E7;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Archivo', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Masonry grid */
.masonry {
  columns: 1;
  column-gap: 1.5rem;
}

@media (min-width: 640px) {
  .masonry {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .masonry {
    columns: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* Nav underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Button styles */
.btn-primary {
  background: var(--accent);
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-outline {
  border: 1.5px solid var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-outline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Project card hover */
.project-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(9, 9, 11, 0.08);
}

.project-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Form focus */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

/* Hero gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Skill bar */
.skill-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s ease;
}

/* Timeline */
.timeline-dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-menu.open {
  max-height: 320px;
}
