* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #fafaf7;
  --bg-elevated: #ffffff;
  --text: #0f0f0f;
  --text-secondary: #666;
  --text-tertiary: #999;
  --accent: #0f0f0f;
  --border: #e8e5de;
  --border-strong: #d0cdc4;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.08);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(250, 250, 247, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

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

.logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
}

.hero-portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.15s forwards;
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.45s forwards;
}

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

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.7s forwards;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 36px;
  background: var(--text);
  animation: scrollPulse 2s ease infinite;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.15; transform: scaleY(0.5); }
  50% { opacity: 0.8; transform: scaleY(1); }
}

/* Sections */
.section {
  max-width: 780px;
  margin: 0 auto;
  padding: 7rem 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-wide {
  max-width: 1100px;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
  position: relative;
}

.section h2::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--text);
  margin-top: 0.75rem;
}

.section-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
  max-width: 640px;
  line-height: 1.6;
}

/* About */
.about-content .lead {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.5;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.about-content p:not(.lead) {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 580px;
  color: var(--text-secondary);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.skill {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.skill:hover {
  border-color: var(--text);
  color: var(--text);
  transform: translateY(-1px);
}

.cv-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cv-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

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

.project-visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.12;
}

.project-visual[data-project="staymate"] {
  background: linear-gradient(135deg, #1e3a5f 0%, #2e5c8a 100%);
}
.project-visual[data-project="rentoutbase"] {
  background: linear-gradient(135deg, #2d4a3e 0%, #4a7a5f 100%);
}
.project-visual[data-project="garnly"] {
  background: linear-gradient(135deg, #5a3d2e 0%, #8a6348 100%);
}

.project-logo {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.project-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.project-header h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-weight: 500;
}

.project-tagline {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
}

.metric-value {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}

.metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.project-tags span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: gap 0.2s;
}

.project-link:hover {
  gap: 0.6rem;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 160px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  align-items: start;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 156px;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--text);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  padding-top: 0.15rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.timeline-content h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.timeline-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.timeline-content p:last-child {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Contact */
.contact-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.contact-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-card svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.contact-card div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
}

.contact-value {
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Responsive */
@media (max-width: 700px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .section {
    padding: 5rem 1.5rem;
  }

  .hero-stats {
    gap: 1.75rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding-left: 2rem;
  }

  .timeline-item::before {
    left: 2px;
    top: 0.4rem;
  }

  .timeline-date {
    text-align: left;
  }

  .about-content .lead {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 1rem;
  }
  .nav-links a {
    font-size: 0.8rem;
  }
}
