/* ===================================
   RESET & BASE
=================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;
  --accent: #111111;
  --accent-soft: #f5f5f5;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h: 68px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ===================================
   NAVBAR
=================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 100px;
  transition: color 0.2s, background 0.2s;
}

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

/* ===================================
   HERO
=================================== */
.hero {
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-left: 28px;
  padding-right: 28px;
  padding-bottom: 80px;
}

.hero-content {
  max-width: 800px;
  width: 100%;
  display: flex;
  gap: 52px;
  align-items: center;
}

/* Photo */
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.hero-photo {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  border: 3px solid var(--border);
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Hide fallback when image loads */
.hero-photo:not(.no-photo) .photo-fallback {
  display: none;
}
.hero-photo.no-photo img {
  display: none;
}

.status-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  background: #22c55e;
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  animation: pulse-green 2.5s ease-in-out infinite;
}

@keyframes pulse-green {
  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); }
}

/* Hero text */
.hero-text {
  flex: 1;
}

.hero-greeting {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards 0.1s;
}

.hero-name {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards 0.2s;
}

.hero-name span {
  color: var(--text-secondary);
}

.hero-role {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards 0.3s;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards 0.4s;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards 0.5s;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 24px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--text-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
  border-color: var(--border);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1s;
}

.hero-scroll-hint span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  50% { opacity: 0.4; }
}

/* ===================================
   SECTIONS
=================================== */
.section {
  padding: 100px 28px;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 56px;
}

.section-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.65;
}

/* ===================================
   SKILLS
=================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(16px);
}

.skill-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.skill-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.skill-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.skill-bar {
  height: 3px;
  background: var(--border-light);
  border-radius: 100px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0%;
  background: var(--text-primary);
  border-radius: 100px;
  transition: width 0.9s cubic-bezier(0.25, 1, 0.5, 1);
}

.skill-card.visible .skill-fill {
  width: var(--w);
}

/* ===================================
   PROJECTS
=================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-thumb {
  height: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.project-thumb-1 {
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(0,0,0,0.03) 24px, rgba(0,0,0,0.03) 25px),
    repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(0,0,0,0.03) 24px, rgba(0,0,0,0.03) 25px);
}

.project-thumb-2 {
  background: linear-gradient(135deg, #ececec 0%, #d8d8d8 100%);
}

.project-thumb-3 {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0,0,0,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,0,0,0.04) 0%, transparent 50%);
}

/* Decorative shapes inside thumbnails */
.project-thumb-1::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 100px;
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.project-thumb-1::after {
  content: '';
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  box-shadow: 0 12px 0 rgba(0,0,0,0.07), 0 24px 0 rgba(0,0,0,0.07), 0 36px 0 rgba(0,0,0,0.04);
}

.project-thumb-2::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  height: 100px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.project-thumb-2::after {
  content: '';
  position: absolute;
  top: 34px;
  left: 38px;
  right: 38px;
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
  box-shadow: 0 12px 0 rgba(0,0,0,0.06), 0 24px 0 rgba(0,0,0,0.04), 0 36px 0 rgba(0,0,0,0.04), 0 48px 0 rgba(0,0,0,0.04), 0 60px 0 rgba(0,0,0,0.04);
}

.project-thumb-3::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 80px;
  background: rgba(255,255,255,0.65);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.thumb-label {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.85);
  padding: 4px 10px;
  border-radius: 100px;
  backdrop-filter: blur(6px);
}

.project-body {
  padding: 22px 24px 24px;
}

.project-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.project-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--accent-soft);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ===================================
   CONTACT
=================================== */
.contact-wrap {
  max-width: 560px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.contact-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: #d0d0d0;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.contact-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.contact-item:hover .contact-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

.contact-note {
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

.contact-note p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ===================================
   FOOTER
=================================== */
.footer {
  padding: 32px 28px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

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

/* ===================================
   ANIMATIONS
=================================== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 640px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hero-photo {
    width: 130px;
    height: 130px;
  }

  .hero-bio {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .section {
    padding: 72px 20px;
  }
}

@media (max-width: 480px) {
  .nav-links a {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
}
