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

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #E8E8E8;
  --hover-bg: #F7F7F7;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Language — EN default, toggle adds lang-id to body */
.id { display: none; }
body.lang-id .id { display: inline; }
body.lang-id .en { display: none; }

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 22px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

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

.nav-name {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.lang-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Layout */
.hero,
.section,
footer {
  max-width: 740px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}

/* Hero */
.hero {
  padding-top: 156px;
  padding-bottom: 100px;
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(46px, 7.5vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 36px;
}

.hero-bottom {
  display: flex;
  align-items: stretch;
  gap: 40px;
}

.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.hero-intro {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
}

.hero-links {
  display: flex;
  gap: 20px;
}

.hero-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

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

.hero-photo {
  position: relative;
  flex-shrink: 0;
  width: 128px;
}

.hero-photo img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 50%;
}

.photo-placeholder {
  width: 128px;
  height: 128px;
  background: #F0F0F0;
  border: 1px dashed #D0D0D0;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.photo-placeholder span {
  font-size: 11px;
  color: #AAAAAA;
  letter-spacing: 0.06em;
}

/* Sections */
.section {
  padding-top: 72px;
  padding-bottom: 72px;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 44px;
  display: block;
}

/* Projects */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  position: relative;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  transition: opacity 0.3s ease;
  cursor: default;
}

.project-item:last-child {
  border-bottom: 1px solid var(--border);
}

.project-item::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-list:hover .project-item:hover::after {
  transform: scaleX(1);
}

.project-list:hover .project-item {
  opacity: 0.35;
}

.project-list:hover .project-item:hover {
  opacity: 1;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.project-name {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.15;
  transition: transform 0.3s ease;
}

.project-list:hover .project-item:hover .project-name {
  transform: translateX(6px);
}

.project-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 18px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: gap 0.2s ease;
}

.project-link:hover {
  gap: 14px;
}

/* About */
.about-text {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.9;
  font-weight: 300;
}

/* Footer */
footer {
  padding-top: 40px;
  padding-bottom: 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Scroll animations */
.animate {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.project-item.animate:nth-child(2) { transition-delay: 0.08s; }
.project-item.animate:nth-child(3) { transition-delay: 0.16s; }

/* Responsive — tablet */
@media (max-width: 768px) {
  nav,
  .hero,
  .section,
  footer {
    padding-left: 32px;
    padding-right: 32px;
  }

  .hero {
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .hero-bottom {
    flex-direction: column-reverse;
    gap: 24px;
  }

  .hero-photo,
  .hero-photo img,
  .photo-placeholder {
    width: 96px;
    height: 96px;
  }

  .project-desc,
  .about-text {
    max-width: 100%;
  }
}

/* Responsive — mobile */
@media (max-width: 480px) {
  nav,
  .hero,
  .section,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  nav {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .hero {
    padding-top: 100px;
    padding-bottom: 64px;
  }

  .hero-photo,
  .hero-photo img,
  .photo-placeholder {
    width: 80px;
    height: 80px;
  }

  .hero-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  .project-name {
    font-size: 22px;
  }

  .project-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .tags {
    justify-content: flex-start;
  }

  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .project-list:hover .project-item {
    opacity: 1;
  }

  .project-list:hover .project-item:hover::after {
    transform: scaleX(0);
  }

  .project-list:hover .project-item:hover .project-name {
    transform: none;
  }
}
