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

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --accent: #1a1a1a;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', monospace;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --bg-card: #191919;
    --text: #e6e6e6;
    --text-secondary: #999999;
    --text-tertiary: #666666;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --accent: #e6e6e6;
  }
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  position: relative;
}


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

::selection {
  background: var(--text);
  color: var(--bg);
}

body {
  position: relative;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@media (prefers-color-scheme: dark) {
  .nav.scrolled {
    background: rgba(17, 17, 17, 0.85);
  }
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 16px;

  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.6;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s var(--ease);
}

.nav-toggle span:first-child { top: 3px; }
.nav-toggle span:last-child { bottom: 3px; }

.nav-toggle.active span:first-child {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active span:last-child {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 36px;
  transition: opacity 0.2s ease;
}

.mobile-menu a:hover {
  opacity: 0.5;
}

/* ========================================
   Profile Photo
   ======================================== */
.profile-photo {
  max-width: 780px;
  margin: 0 auto;
  padding: 120px 40px 0;
}

.profile-photo img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 25%;
}

/* ========================================
   Currently
   ======================================== */
.currently {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 40px 0;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 2.4;
  color: var(--text-secondary);
}

.currently-label {
  color: var(--text-tertiary);
  margin-bottom: 4px;

}

.currently-label em {
  font-style: italic;
}

.currently-line {
  color: var(--text-secondary);
}

.currently-link {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
  display: inline-block;
}

.currently-link:hover {
  opacity: 0.6;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 28px;

}

.hero-title em {
  font-style: italic;
}

.hero-sub {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--text-secondary);

}

/* ========================================
   Section Labels
   ======================================== */
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 48px;
  display: block;
}

/* ========================================
   Work / Projects
   ======================================== */
.work {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px 120px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  transition: transform 0.5s var(--ease);
  cursor: pointer;
  text-decoration: none;
}

.project-card:last-of-type {
  border-bottom: 1px solid var(--border);
}

.project-card:hover {
  /* rotation handled by JS */
}

.project-image {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s ease, transform 0.5s var(--ease);
}

.project-card:nth-child(2) .project-image { background: #f0f0f8; }
.project-card:nth-child(3) .project-image { background: #eef8f5; }
.project-card:nth-child(4) .project-image { background: #f8eef3; }
.project-card:nth-child(5) .project-image { background: #f8f5ee; }

@media (prefers-color-scheme: dark) {
  .project-card:nth-child(2) .project-image { background: #1a1a24; }
  .project-card:nth-child(3) .project-image { background: #1a2420; }
  .project-card:nth-child(4) .project-image { background: #241a20; }
  .project-card:nth-child(5) .project-image { background: #24201a; }
}

.project-card:hover .project-image {
  border-color: var(--border-hover);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
  padding: 16px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg));
}

.project-placeholder svg {
  width: 100%;
  height: 100%;
}

.project-info {
  padding: 8px 0;
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 12px;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 12px;
  transition: opacity 0.2s ease;
}

.project-card:hover .project-title {
  opacity: 0.7;
}

.project-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ========================================
   About
   ======================================== */
.about {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

.about-body {
  max-width: 600px;
  margin-bottom: 64px;
}

.about-body p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;

}

.about-capabilities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 48px;
}

.capability h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 6px;

}

.capability p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);

}

/* ========================================
   Experiments
   ======================================== */
.experiments {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

.experiments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.experiment-item {
  display: block;
  text-decoration: none;
  transition: transform 0.5s var(--ease);
}

.experiment-item:hover {
  /* rotation handled by JS */
}

.experiment-thumb {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #a855f7;
  margin-bottom: 12px;
  transition: border-color 0.3s ease;
}

.experiment-item:hover .experiment-thumb {
  border-color: var(--border-hover);
}

.experiment-thumb svg {
  width: 100%;
  height: 100%;
}

.experiment-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.experiment-item:hover .experiment-title {
  color: var(--text);
}

/* ========================================
   Contact
   ======================================== */
.contact {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 40px 120px;
  border-top: 1px solid var(--border);
}

.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
}

.contact-sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 460px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-link {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  display: inline-block;
}

.contact-link:hover {
  color: var(--text);
  border-color: var(--text);
  transform: rotate(var(--hover-rotation, 0deg));
}

/* ========================================
   Footer
   ======================================== */
.footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 40px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer span,
.footer a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer a {
  transition: color 0.2s ease;
}

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

/* ========================================
   Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .nav {
    padding: 16px 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-menu {
    display: flex;
  }

  .currently {
    padding: 120px 24px 0;
  }

  .hero {
    padding: 60px 24px 80px;
  }

  .work {
    padding: 0 24px 80px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 0;
  }

  .about {
    padding: 60px 24px 80px;
  }

  .about-capabilities {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .experiments {
    padding: 60px 24px 80px;
  }

  .experiments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .contact {
    padding: 60px 24px 80px;
  }

  .contact-links {
    gap: 8px;
  }

  .contact-link {
    font-size: 13px;
    padding: 10px 18px;
  }

  .footer {
    padding: 20px 24px 32px;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

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